FilterReportFactory { private FilterReport makeFrequencyFilterReport(FrequencyFilter filter, List<VariantEvaluation> variantEvaluations) { String message = String.format("Variants filtered for maximum allele frequency of %.2f%%", filter.getMaxFreq()); return makeVariantFilterReport(filter, variantEvaluations, message); } FilterReportFactory(); List<FilterReport> makeFilterReports(Analysis analysis, AnalysisResults analysisResults);  }
@Test public void testMakeFrequencyFilterReport() { Filter filter = new FrequencyFilter(0.0f); FilterType filterType = filter.getFilterType(); VariantEvaluation completelyNovelVariantEval = makePassedVariant(filterType); completelyNovelVariantEval.setFrequencyData(FrequencyData.empty()); variantEvaluations.add(completelyNovelVariantEval); VariantEvaluation mostCommonVariantEvalInTheWorld = makeFailedVariant(filterType); mostCommonVariantEvalInTheWorld.setFrequencyData(FrequencyData.of(RsId.of(123456), Frequency.of(FrequencySource.THOUSAND_GENOMES, 100f), Frequency .of(FrequencySource.ESP_ALL, 100f), Frequency.of(FrequencySource.EXAC_OTHER, 100f))); variantEvaluations.add(mostCommonVariantEvalInTheWorld); ImmutableList<String> messages = ImmutableList.of("Variants filtered for maximum allele frequency of 0.00%"); FilterReport report = new FilterReport(filter.getFilterType(), 1, 1, messages); FilterReport result = instance.makeFilterReport(filter, analysisResults); System.out.println(result); assertThat(result, equalTo(report)); }