### Question:
VariantAggregatedExacStatsCalculator extends VariantAggregatedStatsCalculator { public static void getHeterozygousGenotype(int index, int numAlternativeAlleles, Integer alleles[]) { int cursor = 0; for (int i = 0; i < numAlternativeAlleles; i++) { for (int j = i+1; j < numAlternativeAlleles +1; j++) { if (i != j) { if (cursor == index) { alleles[0] = i; alleles[1] = j; return; } cursor++; } } } } VariantAggregatedExacStatsCalculator();  VariantAggregatedExacStatsCalculator(Properties tagMap); static void getHeterozygousGenotype(int index, int numAlternativeAlleles, Integer alleles[]); static void getHomozygousGenotype(int index, Integer alleles[]);  }### Answer:
@Test public void testGetHeterozygousGenotype() throws Exception { for (int i = 0; i < 11; i++) { Integer alleles[] = new Integer[2]; VariantAggregatedExacStatsCalculator.getHeterozygousGenotype(i, 4, alleles); System.out.println("alleles[" + i + "] = " + alleles[0] + "/" + alleles[1]); } Integer alleles[] = new Integer[2]; VariantAggregatedExacStatsCalculator.getHeterozygousGenotype(3, 3, alleles); assertEquals(alleles[0], new Integer(1)); assertEquals(alleles[1], new Integer(2)); VariantAggregatedExacStatsCalculator.getHeterozygousGenotype(4, 4, alleles); assertEquals(alleles[0], new Integer(1)); assertEquals(alleles[1], new Integer(2)); }