@Test
public void test_getTargetSystemServiceList_success()throws Exception{

    String token = "12345";
    String jsonStr = "{\"targetsystemservices\": [ {\n" +
            "  \"name\" : \"testservice1\",\n" +
            "  \"description\" : \"\",\n" +
            "  \"targetSystemServiceId\" : \"1234\",\n" +
            "  \"hostname\" : \"testhostname\",\n" +
            "  \"monitoringEnabled\" : false,\n" +
            "  \"multiIpMonitoringEnabled\" : false,\n" +
            "  \"port\" : 22\n" +
            "} ]}";
    CertResponse response = new CertResponse();
    response.setHttpstatus(HttpStatus.OK);
    response.setResponse(jsonStr);
    response.setSuccess(true);
    String jsonStrUser = "{  \"username\": \"testusername1\",  \"password\": \"testpassword1\"}";
    CertResponse responseUser = new CertResponse();
    responseUser.setHttpstatus(HttpStatus.OK);
    responseUser.setResponse(jsonStrUser);
    responseUser.setSuccess(true);
    Map<String, Object> requestMap = new HashMap<>();
    requestMap.put("access_token", "12345");
    requestMap.put("token_type", "type");
    when(ControllerUtil.parseJson(jsonStrUser)).thenReturn(requestMap);
    when(reqProcessor.processCert(eq("/auth/certmanager/login"), Mockito.anyObject(), Mockito.anyString(),
            Mockito.anyString())).thenReturn(responseUser);
    when(reqProcessor.processCert(eq( "/certmanager/targetsystemservicelist"), Mockito.anyObject(), Mockito.anyString(),
            Mockito.anyString())).thenReturn(response);
    when(JSONUtil.getJSONasDefaultPrettyPrint(Mockito.any())).thenReturn(jsonStr);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body("{\"data\": "+jsonStr+"}");
    ResponseEntity<String> responseEntityActual = sSLCertificateService.getTargetSystemServiceList(token, getMockUser(true), "123");
    assertEquals(HttpStatus.OK, responseEntityActual.getStatusCode());
    assertEquals(responseEntityExpected.getBody(), responseEntityActual.getBody());
}