@Test
public void test_addAwsRoleToSafe_failure_400() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    String path = "shared/mysafe01";
    AWSRole awsRole = new AWSRole(path,"iam","read");
    String jsonStr = "{  \"access\": \"read\",  \"path\": \"shared/mysafe01\",  \"role\": \"iam\"}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body("{\"errors\":[\"Invalid input values\"]}");
    when(JSONUtil.getJSON(awsRole)).thenReturn(jsonStr);
    when(ControllerUtil.areAWSRoleInputsValid(any(Map.class))).thenReturn(false);
    //when(ControllerUtil.canAddPermission(path, token)).thenReturn(true);
    ResponseEntity<String> responseEntity = safesService.addAwsRoleToSafe(token, awsRole);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}