### Question:
ApplicationMenuDataStore extends CommonDatastore<ApplicationMenuItem, ApplicationMenu> implements DatastoreHasAdd<ApplicationMenuItem>,
DatastoreHasUpdate<ApplicationMenuItem>,
DatastoreHasGet<ApplicationMenuItem>, DatastoreHasSearch<ApplicationMenuItem>, DatastoreHasDelete { @Override public ApplicationMenuItem update(final APIID id, final Map<String, String> attributes) { try { final ApplicationMenu applicationMenu = applicationAPI.updateApplicationMenu(id.toLong(), converter.toApplicationMenuUpdater(attributes)); return converter.toApplicationMenuItem(applicationMenu); } catch (final Exception e) { throw new APIException(e); } } ApplicationMenuDataStore(final APISession engineSession, final ApplicationAPI applicationAPI, final ApplicationMenuItemConverter converter); @Override ApplicationMenuItem add(final ApplicationMenuItem item); @Override ApplicationMenuItem update(final APIID id, final Map<String, String> attributes); @Override ApplicationMenuItem get(final APIID id); @Override void delete(final List<APIID> ids); @Override ItemSearchResult<ApplicationMenuItem> search(final int page, final int resultsByPage, final String search, final String orders,
            final Map<String, String> filters);  }### Answer:
@Test public void should_return_application_menu_updated_by_ApplicationAPI_and_converted_to_ApplicationItem_on_update() throws Exception { final HashMap<String, String> attributesToUpDate = new HashMap<String, String>(); given(converter.toApplicationMenuUpdater(any(Map.class))).willReturn(applicationMenuUpdater); final ApplicationMenuImpl applicationMenu = new ApplicationMenuImpl("menu name", 1L, 1L, 2); given(applicationAPI.updateApplicationMenu(1, applicationMenuUpdater)).willReturn(applicationMenu); final ApplicationMenuItem item = new ApplicationMenuItem(); given(converter.toApplicationMenuItem(applicationMenu)).willReturn(item); final ApplicationMenuItem createdItem = dataStore.update(APIID.makeAPIID(1L), attributesToUpDate); verify(converter, times(1)).toApplicationMenuUpdater(attributesToUpDate); verify(applicationAPI, times(1)).updateApplicationMenu(1, applicationMenuUpdater); verify(converter, times(1)).toApplicationMenuItem(applicationMenu); assertThat(createdItem).isEqualTo(new ApplicationMenuItem()); }