### Question:
VcfGenotypeRecord implements GenotypeRecord { @Override public Alleles getSampleAlleles() { List<Allele> alleles = vcfSample.getAlleles(); if(vcfSample.getAlleles() != null){ return Alleles.createAlleles(alleles); } else { return null; } } VcfGenotypeRecord(VcfMeta vcfMeta, VcfRecord vcfRecord, VcfSample vcfSample); @Override Object getGenotypeRecordData(String recordId); @Override Alleles getSampleAlleles(); @Override float[] getSampleProbs(); @Override float getSampleDosage(); @Override boolean containsGenotypeRecord(String recordId);  }### Answer:
@Test public void getSampleAlleles() { Map<String, String> propertiesGt = new HashMap<String, String>(); propertiesGt.put("ID", "GT"); propertiesGt.put("Number", "1"); propertiesGt.put("Type", "String"); propertiesGt.put("Description", "Genotype"); VcfMetaFormat vcfMetaFormatGt = new VcfMetaFormat(propertiesGt); VcfMeta vcfMeta = new VcfMeta(); vcfMeta.addFormatMeta(vcfMetaFormatGt); String[] recordTokens = new String[]{"x", "x", "x", "G", "A", "x", "x", "x", "GT:DP:EC:CONFS"}; VcfRecord vcfRecord = new VcfRecord(vcfMeta, recordTokens); String[] sampleTokens = new String[]{"1/0", "5", "5", "5.300,5.300,1.000"}; VcfSample vcfSample = new VcfSample(vcfRecord, sampleTokens ); VcfGenotypeRecord vcfGenotypeRecord = new VcfGenotypeRecord(vcfMeta, vcfRecord, vcfSample); List<Allele> alleles = vcfGenotypeRecord.getSampleAlleles().getAlleles(); assertEquals(alleles.get(0).getAlleleAsSnp(), 'A'); assertEquals(alleles.get(1).getAlleleAsSnp(), 'G'); }