HotspotEvidenceVCF { @VisibleForTesting @NotNull VariantContext create(@NotNull final Collection<HotspotEvidence> evidence) { assert (!evidence.isEmpty()); final List<VariantContext> contexts = evidence.stream().map(this::create).sorted(HotspotEvidenceVCF::compareEvidence).collect(Collectors.toList()); return contexts.get(0); } HotspotEvidenceVCF(@NotNull final String normalSample, @NotNull final String tumorSample, final double maxNormalHetLikelihood,
            final int minTumorReads, final double minSnvVAF, final double minIndelVAF, final int minSnvQuality, final int minIndelQuality); void write(@NotNull final String filename, @NotNull final List<HotspotEvidence> evidenceList);  }
@Test public void testCombine() { final HotspotEvidence first = create("G", "A", 0, 19, 1000); final HotspotEvidence second = create("G", "C", 0, 20, 998); final HotspotEvidence third = create("G", "T", 2, 30, 10000); final List<HotspotEvidence> unsorted = Lists.newArrayList(first, third, second); Collections.shuffle(unsorted); final VariantContext context = new HotspotEvidenceVCF("NORMAL", "TUMOR", 0.01, 2, 0, 0, 100, 150).create(unsorted); assertEquals(NORMAL_READS, context.getGenotype("NORMAL").getDP()); assertEquals(NORMAL_REF_COUNT, context.getGenotype("NORMAL").getAD()[0]); assertEquals(0, context.getGenotype("NORMAL").getAD()[1]); assertEquals(TUMOR_READS, context.getGenotype("TUMOR").getDP()); assertEquals(TUMOR_REF_COUNT, context.getGenotype("TUMOR").getAD()[0]); assertEquals(19, context.getGenotype("TUMOR").getAD()[1]); }