@Test
public void testUpdate() throws Exception {

    final URIBuilder uriBuilder = createGetUrl(ROOT_URI + "/" + param.getCode());
    JsonObject request = createJson()
            .add("code", param.getCode())
            .add("categoryCode", param.getCategoryCode())
            .add("dataType", param.getDataType().name())
            .add("currentValue", 222)
            .add("defaultValue", 10)
            .build();
    // performs PUT: /api/config-params/ohf.async.concurrentConsumers
    mockMvc.perform(put(toUrl(uriBuilder))
            .content(request.toString())
            .contentType(MediaType.APPLICATION_JSON)
            .accept(MediaType.APPLICATION_JSON)
            .with(SecurityMockMvcRequestPostProcessors.authentication(mockAuthentication("ADMIN"))))
            .andExpect(status().isNoContent())
            .andExpect(content().string(isEmptyString()));
    // check updated property
    DbConfigurationParam dbParam = paramService.getParameter(param.getId());
    assertThat(Integer.valueOf(dbParam.getCurrentValue()), is(222));
    assertThat(Integer.valueOf(dbParam.getDefaultValue()), is(10));
    assertThat(param.getDataType(), is(DataTypeEnum.INT));
    assertThat(param.isMandatory(), is(true));
}