TaskPriorityMapper { public static TaskPriorityModel transform(TaskPriorityEntity taskPriorityEntity) { TaskPriorityModel taskPriorityModel = null; if (taskPriorityEntity != null) { taskPriorityModel = new TaskPriorityModel(taskPriorityEntity.getId(), taskPriorityEntity.getLabel()); taskPriorityModel.setId(taskPriorityEntity.getId()); taskPriorityModel.setLabel(taskPriorityEntity.getLabel()); } return taskPriorityModel; }  static TaskPriorityModel transform(TaskPriorityEntity taskPriorityEntity);  }
@Test public void testTransformEntity() { TaskPriorityEntity taskPriorityEntity = createEntity(); TaskPriorityModel taskPriorityModel = TaskPriorityMapper.transform(taskPriorityEntity); assertThat(taskPriorityModel, is(instanceOf(TaskPriorityModel.class))); assertThat(taskPriorityModel.getId(), is(FAKE_PRIORITY_ID)); assertThat(taskPriorityModel.getLabel(), is(FAKE_PRIORITY_LABEL)); }