### Question:
ApplicationMenuItemConverter { public ApplicationMenuCreator toApplicationMenuCreator(final ApplicationMenuItem item) { Long applicationId = null; if (item.getApplicationId() != null) { applicationId = item.getApplicationId().toLong(); } Long applicationPageId = null; if (item.getApplicationPageId() != null) { applicationPageId = item.getApplicationPageId().toLong(); } final ApplicationMenuCreator menuCreator = new ApplicationMenuCreator(applicationId, item.getDisplayName(), applicationPageId); if (item.getParentMenuId() != null) { menuCreator.setParentId(item.getParentMenuId().toLong()); } return menuCreator; }  ApplicationMenuItem toApplicationMenuItem(final ApplicationMenu applicationMenu); ApplicationMenuCreator toApplicationMenuCreator(final ApplicationMenuItem item); ApplicationMenuUpdater toApplicationMenuUpdater(final Map<String, String> attributes);  }### Answer:
@Test public void toApplicationMenuCreator_should_map_all_fields() throws Exception { final ApplicationMenuItem item = new ApplicationMenuItem(); item.setDisplayName(DISPLAY_NAME); item.setApplicationId(APPLICATION_ID); item.setApplicationPageId(APPLICATION_PAGE_ID); item.setMenuIndex(INDEX); item.setParentMenuId(PARENT_MENU_ID); final ApplicationMenuCreator creator = converter.toApplicationMenuCreator(item); assertThat(creator).isNotNull(); final Map<ApplicationMenuField, Serializable> fields = creator.getFields(); assertThat(fields.get(ApplicationMenuField.DISPLAY_NAME)).isEqualTo(DISPLAY_NAME); assertThat(fields.get(ApplicationMenuField.APPLICATION_ID)).isEqualTo(APPLICATION_ID); assertThat(fields.get(ApplicationMenuField.APPLICATION_PAGE_ID)).isEqualTo(APPLICATION_PAGE_ID); assertThat(fields.get(ApplicationMenuField.PARENT_ID)).isEqualTo(PARENT_MENU_ID); }