### Question:
APICustomUserInfoValue extends ConsoleAPI<CustomUserInfoItem> implements APIHasSearch<CustomUserInfoItem>, APIHasUpdate<CustomUserInfoItem> { @Override public CustomUserInfoItem update(APIID id, Map<String, String> attributes) { check(containsOnly(ATTRIBUTE_VALUE, attributes), new _("Only the value attribute can be updated")); return converter.convert(getClient().setCustomUserInfoValue( id.getPartAsLong(1), id.getPartAsLong(0), attributes.get(ATTRIBUTE_VALUE))); } APICustomUserInfoValue(CustomUserInfoEngineClientCreator engineClientCreator); @Override ItemSearchResult<CustomUserInfoItem> search(int page, int resultsByPage, String search, String orders, Map<String, String> filters); @Override String defineDefaultSearchOrder(); @Override CustomUserInfoItem update(APIID id, Map<String, String> attributes);  }### Answer:
@Test public void should_update_a_given_custom_item_value() throws Exception { CustomUserInfoValueImpl update = new CustomUserInfoValueImpl(); update.setValue("foo"); given(engine.setCustomUserInfoValue(1L, 2L, "foo")).willReturn(update); CustomUserInfoItem value = api.update(APIID.makeAPIID(2L, 1L), Collections.singletonMap("value", "foo")); assertThat(value.getValue()).isEqualTo("foo"); }