@Test public void shouldNotThrowErrorOnValidateForAPeriodWithNoScheduleId() { ProcessingPeriod processingPeriod = make(a(defaultProcessingPeriod)); processingPeriod.setScheduleId(null); exException.expect(dataExceptionMatcher("error.period.without.schedule")); processingPeriod.validate(); }