@Test public void test_listIAMRole_successfully() { String token = "5PDrOhsy4ig8L3EpsJZSLAMg"; String jsonGetStr = "{ \"keys\": [ \"mytestawsrole\" ]}"; Response listResponse = getMockResponse(HttpStatus.OK, true, jsonGetStr); ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(jsonGetStr); when(reqProcessor.process("/auth/aws/iam/roles/list","{}",token)).thenReturn(listResponse); ResponseEntity<String> responseEntity = awsIamAuthService.listIAMRoles(token); assertEquals(HttpStatus.OK, responseEntity.getStatusCode()); assertEquals(responseEntityExpected, responseEntity); }
public ResponseEntity<String> listIAMRoles(String token){ Response response = reqProcessor.process("/auth/aws/iam/roles/list","{}",token); return ResponseEntity.status(response.getHttpstatus()).body(response.getResponse()); }
AWSIAMAuthService { public ResponseEntity<String> listIAMRoles(String token){ Response response = reqProcessor.process("/auth/aws/iam/roles/list","{}",token); return ResponseEntity.status(response.getHttpstatus()).body(response.getResponse()); } }
AWSIAMAuthService { public ResponseEntity<String> listIAMRoles(String token){ Response response = reqProcessor.process("/auth/aws/iam/roles/list","{}",token); return ResponseEntity.status(response.getHttpstatus()).body(response.getResponse()); }  }
AWSIAMAuthService { public ResponseEntity<String> listIAMRoles(String token){ Response response = reqProcessor.process("/auth/aws/iam/roles/list","{}",token); return ResponseEntity.status(response.getHttpstatus()).body(response.getResponse()); }  ResponseEntity<String> createIAMRole(AWSIAMRole awsiamRole, String token, UserDetails userDetails); ResponseEntity<String> updateIAMRole(String token, AWSIAMRole awsiamRole); ResponseEntity<String> fetchIAMRole(String token, String role); ResponseEntity<String> listIAMRoles(String token); ResponseEntity<String> deleteIAMRole(String token, String role); Response configureAWSIAMRole(String roleName,String policies,String token ); }
AWSIAMAuthService { public ResponseEntity<String> listIAMRoles(String token){ Response response = reqProcessor.process("/auth/aws/iam/roles/list","{}",token); return ResponseEntity.status(response.getHttpstatus()).body(response.getResponse()); }  ResponseEntity<String> createIAMRole(AWSIAMRole awsiamRole, String token, UserDetails userDetails); ResponseEntity<String> updateIAMRole(String token, AWSIAMRole awsiamRole); ResponseEntity<String> fetchIAMRole(String token, String role); ResponseEntity<String> listIAMRoles(String token); ResponseEntity<String> deleteIAMRole(String token, String role); Response configureAWSIAMRole(String roleName,String policies,String token );  }