@Test
public void test_updateMetadata_successfully() {

    String token = "7QPMPIGiyDFlJkrK3jFykUqa";
    String path = "users/safe01";
    Map<String,String> params = new HashMap<>();
    params.put("type", "users");
    params.put("name", "safe01");
    params.put("access", "write");
    params.put("path", path);
    String pathjson ="{\"path\":\"metadata/"+path+"\"}";
    Response metaResponse = getMockResponse(HttpStatus.OK, true, "{\"data\":{\"description\":\"My first safe\",\"name\":\"safe01\",\"owner\":\"youremail@yourcompany.com\",\"ownerid\":\"normaluser\",\"type\":\"\"}}");
    when(reqProcessor.process("/read",pathjson,token)).thenReturn(metaResponse);
    Response response = getMockResponse(HttpStatus.CREATED, true, "");
    when(reqProcessor.process(eq("/write"),Mockito.any(),eq(token))).thenReturn(response);
    Response actualResponse = ControllerUtil.updateMetadata(params, token);
    assertEquals(HttpStatus.CREATED, actualResponse.getHttpstatus());
}