### Question:
PhenotypeComponentImpl implements PhenotypeComponent { @Override public boolean occurredDuring(Date start, Date end) { return !(start.after(this.end) || end.before(this.start)); } private  PhenotypeComponentImpl(); private  PhenotypeComponentImpl(@NotNull Date start, @Nullable Date end, @NotNull TermId hpoTerm, boolean isNegated); @Override Date effectiveStart(); @Override Date effectiveEnd(); @Override boolean isEffective(Date timepoint); @Override boolean isPersistingDuring(Date start, Date end); @Override boolean occurredDuring(Date start, Date end); @Override TermId abnormality(); @Override boolean isNegated(); @Override void changeEffectiveStart(Date start); @Override void changeEffectiveEnd(Date end);  }### Answer:
@Test public void occurredDuring() throws Exception { Date date00 = dateFormat.parse("2014-09-30 10:33:33"); Date date0 = dateFormat.parse("2016-05-30 10:33:33"); Date date1 = dateFormat.parse("2018-09-30 10:33:33"); Date date2 = dateFormat.parse("2018-10-30 10:33:33"); Date date3 = dateFormat.parse("2018-11-30 10:33:33"); Date date4 = dateFormat.parse("2018-12-30 10:33:33"); testComponent.changeEffectiveEnd(date2); assertFalse(testComponent.occurredDuring(date00, date0)); assertTrue(testComponent.occurredDuring(date0, testComponent.effectiveStart())); assertTrue(testComponent.occurredDuring(date0, date1)); assertTrue(testComponent.occurredDuring(date1, date3)); assertTrue(testComponent.occurredDuring(date2, date3)); assertFalse(testComponent.occurredDuring(date3, date4)); }