ResultsWriterUtils { public static List<FilterReport> makeFilterReports(Analysis analysis, AnalysisResults analysisResults) { return filterReportFactory.makeFilterReports(analysis, analysisResults); } private  ResultsWriterUtils(); static String makeOutputFilename(Path vcfPath, String outputPrefix, OutputFormat outputFormat, ModeOfInheritance modeOfInheritance); static List<VariantEffectCount> makeVariantEffectCounters(List<String> sampleNames, List<VariantEvaluation> variantEvaluations); static List<FilterReport> makeFilterReports(Analysis analysis, AnalysisResults analysisResults); static List<Gene> getMaxPassedGenes(List<Gene> genes, int maxGenes);  }
@Test public void canMakeFilterReportsFromAnalysisReturnsEmptyListWhenNoFiltersAdded(){ Analysis analysis = Analysis.builder().build(); AnalysisResults analysisResults = AnalysisResults.builder().build(); List<FilterReport> results = ResultsWriterUtils.makeFilterReports(analysis, analysisResults); assertThat(results.isEmpty(), is(true)); }
@Test public void canMakeFilterReportsFromAnalysis(){ Analysis analysis = Analysis.builder() .addStep(new PassAllVariantEffectsFilter()) .build(); AnalysisResults analysisResults = AnalysisResults.builder().build(); List<FilterReport> results = ResultsWriterUtils.makeFilterReports(analysis, analysisResults); for (FilterReport result : results) { System.out.println(result); } assertThat(results.isEmpty(), is(false)); }