### Question:
PhenoSetTimeLineImpl implements PhenoSetTimeLine { @Override public PhenotypeComponent persistDuring(Date start, Date end) { for (PhenotypeComponent component : this.phenosetTimeLine) { if (component.isPersistingDuring(start, end)) { return component; } } return null; } PhenoSetTimeLineImpl(PhenoSet phenoset); @Override PhenoSet phenoset(); @Override List<PhenotypeComponent> getTimeLine(); @Override void insert(PhenotypeComponent newAbnorm); @Override PhenotypeComponent current(Date date); @Override PhenotypeComponent persistDuring(Date start, Date end); @Override List<PhenotypeComponent> occurredDuring(Date start, Date end);  }### Answer:
@Test public void persistDuring() throws Exception { Date date1 = dateFormat.parse("2017-06-20 10:33:33"); Date date2 = dateFormat.parse("2017-06-30 10:33:33"); Date date3 = dateFormat.parse("2017-10-30 10:33:33"); assertNotNull(glucosetimeLine.persistDuring(date1, date2)); assertNull(glucosetimeLine.persistDuring(date2, date3)); assertEquals(hypoglycemia.getId(), glucosetimeLine.persistDuring(date1, date2).abnormality()); }