import static org.junit.Assert.fail;\r
import static org.mockito.Matchers.anyString;\r
\r
+import java.io.ByteArrayInputStream;\r
import java.io.FileInputStream;\r
\r
//import static org.mockito.Matchers.anyString;\r
public void testCallCreateMirrorMaker() throws DMaaPAccessDeniedException, CambriaApiException, IOException,\r
TopicExistsException, JSONException, ConfigDbException {\r
prepareForTestCommon();\r
+ \r
+ String sampleJson = "{\"test\":\"test\"}";\r
+ InputStream inputSteam = new ByteArrayInputStream(sampleJson.getBytes());\r
mmRestService.callCreateMirrorMaker(iStream);\r
assertTrue(true);\r
}\r
public void testCallListAllMirrorMaker() throws DMaaPAccessDeniedException, CambriaApiException, IOException,\r
TopicExistsException, JSONException, ConfigDbException {\r
prepareForTestCommon();\r
- mmRestService.callListAllMirrorMaker(iStream);\r
+ \r
+ String sampleJson = "{\"test\":\"test\"}";\r
+ InputStream inputSteam = new ByteArrayInputStream(sampleJson.getBytes());\r
+ mmRestService.callListAllMirrorMaker(inputSteam);\r
assertTrue(true);\r
}\r
\r
@Test\r
public void testCallUpdateMirrorMaker() throws ConfigDbException, CambriaApiException {\r
prepareForTestCommon();\r
+ \r
+ \r
mmRestService.callUpdateMirrorMaker(iStream);\r
assertTrue(true);\r
}\r
@Test\r
public void testListWhiteList() throws ConfigDbException {\r
prepareForTestCommon();\r
- mmRestService.listWhiteList(iStream);\r
+ \r
+ String sampleJson = "{\"test\":\"test\"}";\r
+ InputStream inputSteam = new ByteArrayInputStream(sampleJson.getBytes());\r
+ mmRestService.listWhiteList(inputSteam);\r
assertTrue(true);\r
}\r
\r
@Test\r
public void testCreateWhiteList() throws ConfigDbException {\r
prepareForTestCommon();\r
- mmRestService.createWhiteList(iStream);\r
+ String sampleJson = "{\"test\":\"test\"}";\r
+ InputStream inputSteam = new ByteArrayInputStream(sampleJson.getBytes());\r
+ \r
+ mmRestService.createWhiteList(inputSteam);\r
assertTrue(true);\r
}\r
\r
@Test\r
public void testDeleteWhiteList() throws ConfigDbException {\r
prepareForTestCommon();\r
- mmRestService.deleteWhiteList(iStream);\r
+ \r
+ String sampleJson = "{\"test\":\"test\"}";\r
+ InputStream inputSteam = new ByteArrayInputStream(sampleJson.getBytes());\r
+ mmRestService.deleteWhiteList(inputSteam);\r
assertTrue(true);\r
}\r
-\r
+ \r
private void prepareForTestCommon() throws ConfigDbException {\r
Assert.assertNotNull(mmRestService);\r
PowerMockito.when(dmaapContext.getRequest()).thenReturn(httpServReq);\r