@Test
public void test_createIAMRole_successfully_admin() throws TVaultValidationException {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    UserDetails userDetails = getMockUser(true);
    AWSIAMRole awsiamRole = new AWSIAMRole();
    awsiamRole.setAuth_type("iam");
    String[] arns = {"arn:aws:iam::123456789012:user/tst"};
    awsiamRole.setBound_iam_principal_arn(arns);
    String[] policies = {"default"};
    awsiamRole.setPolicies(policies);
    awsiamRole.setResolve_aws_unique_ids(true);
    awsiamRole.setRole("string");
    ResponseEntity<String> response = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"AWS IAM Role created successfully \"]}");
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"AWS IAM Role created successfully \"]}");
    when(ControllerUtil.createMetadata(Mockito.any(), eq(token))).thenReturn(true);
    when(awsiamAuthService.createIAMRole(awsiamRole, token, userDetails)).thenReturn(response);
    ResponseEntity<String> responseEntity = selfSupportService.createIAMRole(userDetails, token, awsiamRole,"shared/mysafe01");
    assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}