SummaryChapter implements ReportChapter { @NotNull @VisibleForTesting static Set<String> sortGenes(@NotNull Set<String> driverVariantGenes) { List<String> genesList = Lists.newArrayList(driverVariantGenes); Collections.sort(genesList); return Sets.newHashSet(genesList); } SummaryChapter(@NotNull final AnalysedPatientReport patientReport); @NotNull @Override String name(); @Override boolean isFullWidth(); @Override boolean hasCompleteSidebar(); @Override void render(@NotNull Document reportDocument);  }
@Test public void canSortSummaryOfGenesCorrectly() { Set<String> genes = Sets.newHashSet("A", "C", "B"); Set<String> sortedGenes = SummaryChapter.sortGenes(genes); Set<String> correctGenes = Sets.newHashSet("A", "B", "C"); assertEquals(correctGenes, sortedGenes); }