@Test
public void test_readSvcAccPassword_success() {

    UserDetails userDetails = getMockUser(true);
    String token = userDetails.getClientToken();
    String svcAccName = "testacc03";
    ADServiceAccountCreds adServiceAccountCreds = new ADServiceAccountCreds();
    adServiceAccountCreds.setCurrent_password("current_password");
    adServiceAccountCreds.setLast_password("last_password");
    adServiceAccountCreds.setUsername(svcAccName);
    String expectedOutput = getJSON(adServiceAccountCreds);
    Response pwdReadResponse = getMockResponse(HttpStatus.OK, true,expectedOutput);
    when(JSONUtil.getJSON(Mockito.any(ADServiceAccountCreds.class))).thenReturn(expectedOutput);
    when(reqProcessor.process("/ad/serviceaccount/readpwd","{\"role_name\":\""+svcAccName+"\"}",token)).thenReturn(pwdReadResponse);
    when(JSONUtil.getJSON(Mockito.any(ADServiceAccountCreds.class))).thenReturn(expectedOutput);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(expectedOutput);
    when(reqProcessor.process(eq("/sdb"),Mockito.any(),eq(token))).thenReturn(getMockResponse(HttpStatus.OK, true, "{\"data\":{\"initialPasswordReset\":true,\"managedBy\":\"normaluser\",\"name\":\"svc_vault_test5\",\"users\":{\"normaluser\":\"sudo\"}}}"));
    ResponseEntity<String> responseEntity = serviceAccountsService.readSvcAccPassword(token, svcAccName, userDetails);
    assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}