IterationActivityGenerator implements ActivityGenerator { @Override public BaseProjectItem enrichModel(BaseProjectItem identifiable) { return new Iteration(iterationService.getById(identifiable.getId())); }  @Override String modelType(); @Override String modelService(); @Override BaseProjectItem enrichModel(BaseProjectItem identifiable); @Override Activity generateCreateActivity(BaseProjectItem item); @Override Activity generateUpdateActivity(BaseProjectItem item, BaseProjectItem modifiedItem); static final SimpleDateFormat dateFormat; static final String START_ITERATION_ACTION; static final String COMPLETE_ITERATION_ACTION; static final String CREATE_ITERATION_SUBJECT; static final String UPDATE_ITERATION_SUBJECT; static final String START_ITERATION_SUBJECT; static final String COMPLETE_ITERATION_SUBJECT; static final String UPDATE_ITERATION_NAME_CONTENT; static final String UPDATE_ITERATION_STARTTIME_CONTENT; static final String UPDATE_ITERATION_ENDTIME_CONTENT; static final String START_ITERATION_CONTENT; }
@Test public void testEnrichModel() { Step step = new Step(); step.setId(ModuleHelper.id); when(iterationService.getById(ModuleHelper.id)).thenReturn(iteration); BaseProjectItem baseProjectItem = iterationActivityGenerator.enrichModel(step); verify(iterationService).getById(ModuleHelper.id); assertEquals((int) baseProjectItem.getId(), ModuleHelper.id); assertEquals((int) baseProjectItem.getProjectId(), ModuleHelper.projectId); }