### Question:
GenotypeDataCompareTool { public static boolean same(GenotypeData gd1, GenotypeData gd2) { if (gd1.getSamples().equals(gd2.getSamples())) { if (gd1.getVariantAnnotations().equals(gd2.getVariantAnnotations())) { Iterator<GeneticVariant> it1 = gd1.iterator(); Iterator<GeneticVariant> it2 = gd2.iterator(); while (it1.hasNext()) { if (!it2.hasNext()) { return false; } GeneticVariant v1 = it1.next(); GeneticVariant v2 = it2.next(); if (!same(v1, v2)) { return false; } } if (it2.hasNext()) { return false; } else { return true; } } } return false; }  static boolean same(GenotypeData gd1, GenotypeData gd2); static boolean same(GeneticVariant v1, GeneticVariant v2);  }### Answer:
@Test public void testPedMap() throws FileNotFoundException, IOException, URISyntaxException { try { GenotypeData genotypeData1 = new PedMapGenotypeData(getTestPed(), getTestMap()); new PedMapGenotypeWriter(genotypeData1).write("pedmapcomparetest"); GenotypeData genotypeData2 = new PedMapGenotypeData("pedmapcomparetest"); assertTrue(GenotypeDataCompareTool.same(genotypeData1, genotypeData2)); } finally { new File("pedmapcomparetest.ped").delete(); new File("pedmapcomparetest.map").delete(); } }