### Question:
ApplicationItemConverter { public ApplicationCreator toApplicationCreator(final ApplicationItem appItem) { final ApplicationCreator creator = new ApplicationCreator(appItem.getToken(), appItem.getDisplayName(), appItem.getVersion()); creator.setDescription(appItem.getDescription()); creator.setProfileId(appItem.getProfileId().toLong()); creator.setIconPath(appItem.getIconPath()); return creator; }  ApplicationItem toApplicationItem(final Application application); ApplicationCreator toApplicationCreator(final ApplicationItem appItem); ApplicationUpdater toApplicationUpdater(final Map<String, String> attributes);  }### Answer:
@Test public void toApplicationCreator_should_map_all_fields() throws Exception { final ApplicationItem item = new ApplicationItem(); item.setToken(TOKEN); item.setDisplayName(DISPLAY_NAME); item.setVersion(VERSION); item.setDescription(DESCRIPTION); item.setIconPath(ICON_PATH); item.setProfileId(PROFILE_ID); final ApplicationCreator creator = converter.toApplicationCreator(item); assertThat(creator).isNotNull(); final Map<ApplicationField, Serializable> fields = creator.getFields(); assertThat(fields.get(ApplicationField.TOKEN)).isEqualTo(TOKEN); assertThat(fields.get(ApplicationField.DISPLAY_NAME)).isEqualTo(DISPLAY_NAME); assertThat(fields.get(ApplicationField.VERSION)).isEqualTo(VERSION); assertThat(fields.get(ApplicationField.DESCRIPTION)).isEqualTo(DESCRIPTION); assertThat(fields.get(ApplicationField.ICON_PATH)).isEqualTo(ICON_PATH); assertThat(fields.get(ApplicationField.PROFILE_ID)).isEqualTo(PROFILE_ID); }