@Test(dataProvider = "assemblyResults") public void testAddManyHaplotypes( final java.util.List<AssemblyResult> assemblyResults, final java.util.List<java.util.List<Haplotype>> haplotypes) { final AssemblyResultSet subject = new AssemblyResultSet(); for (int i = 0; i < haplotypes.size(); i++) { final int haplotypeCountBefore = subject.getHaplotypeCount(); final java.util.List<Haplotype> haplos = haplotypes.get(i); final AssemblyResult ar = assemblyResults.get(i); for (final Haplotype h : haplos) { Assert.assertTrue(subject.add(h, ar)); Assert.assertFalse(subject.add(h, ar)); if (h.isReference()) Assert.assertEquals(subject.getReferenceHaplotype(), h); } final int haplotypeCountAfter = subject.getHaplotypeCount(); Assert.assertEquals(haplos.size(), haplotypeCountAfter - haplotypeCountBefore); Assert.assertTrue(subject.getMaximumKmerSize() >= ar.getKmerSize()); Assert.assertTrue(subject.getMinimumKmerSize() <= ar.getKmerSize()); Assert.assertEquals( subject.getUniqueReadThreadingGraph(ar.getKmerSize()), ar.getThreadingGraph()); } }