@Test
public void test_createRole_success() throws Exception {

    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"AWS Role created \"]}");
    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    UserDetails userDetails = getMockUser(false);
    AWSLoginRole awsLoginRole = new AWSLoginRole("ec2", "mytestawsrole", "ami-fce3c696",
            "1234567890123", "us-east-2", "vpc-2f09a348", "subnet-1122aabb",
            "arn:aws:iam::8987887:role/test-role", "arn:aws:iam::877677878:instance-profile/exampleinstanceprofile",
            "\"[prod, dev\"]");
    when(awsAuthService.createRole(token, awsLoginRole, userDetails)).thenReturn(responseEntityExpected);
    when(tokenUtils.getSelfServiceToken()).thenReturn(token);
    ResponseEntity<String> responseEntityActual =  serviceAccountsService.createAWSRole(userDetails, token, awsLoginRole);
    assertEquals(HttpStatus.OK, responseEntityActual.getStatusCode());
    assertEquals(responseEntityExpected, responseEntityActual);
}