@Test
public void test_updateSafe_failure_invalidInput() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    SafeBasicDetails safeBasicDetails = new SafeBasicDetails("mysafe01", "youremail@yourcompany.com", null, "My first safe");
    Safe safe = new Safe("shared/mysafe01",safeBasicDetails);
    String jsonStr = "{\"path\":\"shared/mysafe01\",\"data\":{\"name\":\"mysafe01\",\"owner\":\"youremail@yourcompany.com\",\"type\":\"\",\"description\":\"My first safe\"}}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body("{\"errors\":[\"Invalid input values\"]}");
    Map<String,Object> reqparams = null;
    try {
        reqparams = new ObjectMapper().readValue(jsonStr, new TypeReference<Map<String, Object>>(){});
    } catch (IOException e) {
        e.printStackTrace();
    }
    when(ControllerUtil.parseJson(any())).thenReturn(reqparams);
    when(ControllerUtil.areSDBInputsValid(reqparams)).thenReturn(false);
    ResponseEntity<String> responseEntity = safesService.updateSafe(token, safe);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}