AWSAuthService { public ResponseEntity<String> readClientConfiguration(String token){ Response response = reqProcessor.process("/auth/aws/config/readclientconfig","{}", token); return ResponseEntity.status(response.getHttpstatus()).body(response.getResponse()); }  ResponseEntity<String> authenticateEC2(AWSLogin login); ResponseEntity<String> createRole(String token, AWSLoginRole awsLoginRole, UserDetails userDetails); ResponseEntity<String> updateRole(String token, AWSLoginRole awsLoginRole); ResponseEntity<String> deleteRole(String token, String role, UserDetails userDetails); ResponseEntity<String> fetchRole(String token, String role); ResponseEntity<String> listRoles(String token); ResponseEntity<String> configureClient(AWSClientConfiguration awsClientConfiguration, String token); ResponseEntity<String> readClientConfiguration(String token); ResponseEntity<String> createSTSRole(AWSStsRole awsStsRole, String token); ResponseEntity<String> authenticateIAM(AWSIAMLogin awsiamLogin); ResponseEntity<String> authenticate(AWSAuthType authType, AWSAuthLogin awsAuthLogin); Response configureAWSRole(String roleName,String policies,String token );  }
@Test public void test_readClientConfiguration_successfully() { String token = "5PDrOhsy4ig8L3EpsJZSLAMg"; String responseBody = "{ \"access_key\": \"string\", \"secret_key\": null}"; Response readResponse = getMockResponse(HttpStatus.OK, true, responseBody); ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseBody); when(reqProcessor.process("/auth/aws/config/readclientconfig", "{}", token)).thenReturn(readResponse); ResponseEntity<String> responseEntity = awsAuthService.readClientConfiguration(token); assertEquals(HttpStatus.OK, responseEntity.getStatusCode()); assertEquals(responseEntityExpected, responseEntity); }