FilterReportFactory { private FilterReport makeInheritanceFilterReport(InheritanceFilter filter, List<Gene> genes) { String inheritanceModes = filter.getCompatibleModes() .stream() .map(ModeOfInheritance::toString) .collect(Collectors.joining(", ")); List<String> messages = ImmutableList.of(String.format("Genes filtered for compatibility with %s inheritance.", inheritanceModes)); return makeGeneFilterReport(filter, genes, messages); } FilterReportFactory(); List<FilterReport> makeFilterReports(Analysis analysis, AnalysisResults analysisResults);  }
@Test public void testMakeInheritanceFilterReport() { Filter filter = new InheritanceFilter(ModeOfInheritance.AUTOSOMAL_DOMINANT, ModeOfInheritance.AUTOSOMAL_RECESSIVE); FilterType filterType = FilterType.INHERITANCE_FILTER; ImmutableList<String> messages = ImmutableList.of("Genes filtered for compatibility with AUTOSOMAL_DOMINANT, AUTOSOMAL_RECESSIVE inheritance."); FilterReport report = new FilterReport(filterType, 0, 0, messages); FilterReport result = instance.makeFilterReport(filter, analysisResults); assertThat(result, equalTo(report)); }