@Test
public void test_createIAMRole() throws Exception {

    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");
    String inputJson =new ObjectMapper().writeValueAsString(awsiamRole);
    String responseMessage = "{\"messages\":[\"AWS IAM Role created successfully \"]}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    UserDetails userDetails = getMockUser(false);
    when(selfSupportService.createIAMRole(eq(userDetails), eq("5PDrOhsy4ig8L3EpsJZSLAMg"), Mockito.any(AWSIAMRole.class), eq("users/mysafe01"))).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.post("/v2/ss/auth/aws/iam/role?path=users/mysafe01").requestAttr("UserDetails", userDetails)
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8")
            .content(inputJson))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}