@Test public void should_map_none_trigger_type_as_simple_one() throws Exception { JobForm.Builder formBuilder = formFactory.givenJobFormBuilderWithValues(); JobFormEntity jobFormEntity = formFactory.givenJobFormEntityWithValues(); JobSimpleTriggerEntity simpleTrigger = new JobSimpleTriggerEntity(); simpleTrigger.setOccurrenceCount(1); simpleTrigger.setStartDate(formFactory.provideStartDateSrc()); simpleTrigger.setTimezone(formFactory.provideTimeZone().getID()); jobFormEntity.setSimpleTrigger(simpleTrigger); mapperUnderTest.mapEntityOnForm(formBuilder, jobFormEntity); JobForm expected = formBuilder.build(); assertThat(expected.getStartDate(), is(formFactory.provideStartDate())); assertThat(expected.getTimeZone(), is(formFactory.provideTimeZone())); assertThat(expected.getTrigger(), is(nullValue())); }
@Override public void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity) { mapCommonEntityTriggerFieldsOnEntity(form, entity); }
JobNoneTriggerMapper extends BaseTriggerMapper { @Override public void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity) { mapCommonEntityTriggerFieldsOnEntity(form, entity); } }
JobNoneTriggerMapper extends BaseTriggerMapper { @Override public void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity) { mapCommonEntityTriggerFieldsOnEntity(form, entity); }  }
JobNoneTriggerMapper extends BaseTriggerMapper { @Override public void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity) { mapCommonEntityTriggerFieldsOnEntity(form, entity); }  @Override void mapFormOnEntity(JobForm form, JobFormEntity entity); @Override void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity); }
JobNoneTriggerMapper extends BaseTriggerMapper { @Override public void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity) { mapCommonEntityTriggerFieldsOnEntity(form, entity); }  @Override void mapFormOnEntity(JobForm form, JobFormEntity entity); @Override void mapEntityOnForm(JobForm.Builder form, JobFormEntity entity);  }