@Test
public void test_updateSafe_successfully_admin() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    UserDetails userDetails = getMockUser(true);
    SafeBasicDetails safeBasicDetails = new SafeBasicDetails("mysafe01", "youremail@yourcompany.com", null, "My first safe");
    Safe safe = new Safe("shared/mysafe01",safeBasicDetails);
    ResponseEntity<String> readResponse = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"Safe updated \"]}");
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body("{\"messages\":[\"Safe updated \"]}");
    when(safesService.updateSafe(token, safe)).thenReturn(readResponse);
    ResponseEntity<String> responseEntity = selfSupportService.updateSafe(userDetails, token, safe);
    assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}