@Test
public void test_addUserToSafe_successfully() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    String path = "shared/mysafe01";
    SafeUser safeUser = new SafeUser(path, "testuser1","write");
    UserDetails userDetails = getMockUser(false);
    ResponseEntity<String> response = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"User is successfully associated \"]}");
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"User is successfully associated \"]}");
    when(safeUtils.canAddOrRemoveUser(userDetails, safeUser, "addUser")).thenReturn(true);
    when(safesService.addUserToSafe(token, safeUser, userDetails)).thenReturn(response);
    ResponseEntity<String> responseEntity = selfSupportService.addUserToSafe(userDetails, token, safeUser);
    assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}