### Question:
PatientSummaryImpl implements PatientSummary { @Override public List<PhenotypeComponent> phenoAt(Date timepoint) { return phenoSetTimeLines.stream() .map(timeLine -> timeLine.current(timepoint)) .collect(Collectors.toList()); } PatientSummaryImpl(Patient patient, UnionFind<TermId> hpoTermUnionFind); @Override Patient patient(); @Override void addTest(LabTest test); @Override void addTest(List<LabTest> tests); @Override List<LabTest> tests(); @Override List<PhenoSetTimeLine> timeLines(); @Override List<PhenotypeComponent> phenoAt(Date timepoint); @Override List<PhenotypeComponent> phenoPersistedDuring(Date start, Date end); @Override List<PhenotypeComponent> phenoOccurredDuring(Date start, Date end); @Override List<PhenotypeComponent> phenoSinceBorn();  }### Answer:
@Test public void phenoAt() throws Exception { LabTest test2 = new LabTestImpl.Builder() .effectiveStart(dateFormat.parse("2017-10-20 10:30:00")) .loincId(new LoincId("15074-7")) .outcome(new HpoTerm4TestOutcome(hypoglycemia.getId(), false)) .patient(patient) .resourceId("unknown resource id") .build(); patientSummary.addTest(test2); assertEquals(3, patientSummary.tests().size()); assertEquals(2, patientSummary.timeLines().size()); }