@Test
public void login_success() throws Exception {

    String jsonStr = "{  \"username\": \"testusername1\",  \"password\": \"testpassword1\"}";
    CertResponse response = new CertResponse();
    response.setHttpstatus(HttpStatus.OK);
    response.setResponse(jsonStr);
    response.setSuccess(true);
    Map<String, Object> requestMap = new HashMap<>();
    requestMap.put("access_token", "12345");
    requestMap.put("token_type", "type");
    when(ControllerUtil.parseJson(jsonStr)).thenReturn(requestMap);
    CertManagerLoginRequest certManagerLoginRequest = new CertManagerLoginRequest("testusername", "testpassword");
    when(reqProcessor.processCert(Mockito.anyString(), Mockito.anyObject(), Mockito.anyString(),
            Mockito.anyString())).thenReturn(response);
    CertManagerLogin  certManagerLogin= sSLCertificateService.login(certManagerLoginRequest);
    assertNotNull(certManagerLogin);
    assertEquals(certManagerLogin.getAccess_token(),"12345");
}