### Question:
VariantAggregatedStatsCalculator { public static void getGenotype(int index, Integer alleles[]) { int cursor = 0; final int MAX_ALLOWED_ALLELES = 100; for (int i = 0; i < MAX_ALLOWED_ALLELES; i++) { for (int j = 0; j <= i; j++) { if (cursor == index) { alleles[0] = j; alleles[1] = i; return; } cursor++; } } } VariantAggregatedStatsCalculator();  VariantAggregatedStatsCalculator(Properties tagMap); void calculate(List<Variant> variants); void calculate(Variant variant); void calculate(Variant variant, StudyEntry study); static void addGenotypeWithGTS(Map<String, String> fileData, String[] splitsGTC,
                                          String reference, String[] alternateAlleles, int numAllele, VariantStats cohortStats); static Set<String> getCohorts(Properties tagMap); static void getGenotype(int index, Integer alleles[]);  }### Answer:
@Test public void getGenotype() { for (int i = 0; i < 11; i++) { Integer alleles[] = new Integer[2]; VariantAggregatedStatsCalculator.getGenotype(i, alleles); System.out.println("alleles[" + i + "] = " + alleles[0] + "/" + alleles[1]); } Integer alleles[] = new Integer[2]; VariantAggregatedStatsCalculator.getGenotype(0, alleles); assertEquals(alleles[0], alleles[1]); VariantAggregatedStatsCalculator.getGenotype(2, alleles); assertEquals(alleles[0], alleles[1]); VariantAggregatedStatsCalculator.getGenotype(5, alleles); assertEquals(alleles[0], alleles[1]); assertEquals(alleles[0], new Integer(2)); }