@Test
public void test_addGroupToSafe_failure_400() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    String path = "shared/mysafe01";
    SafeGroup safeGroup = new SafeGroup(path, "group1", "write");
    UserDetails userDetails = getMockUser(false);
    String responseJson = "{\"errors\":[\"Invalid path specified\"]}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body(responseJson);
    when(ControllerUtil.isPathValid(path)).thenReturn(false);
    ResponseEntity<String> responseEntity = selfSupportService.addGroupToSafe(userDetails, token, safeGroup);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}