### Question:
PerAlleleCollection { public X get(Allele allele){ if (allele == null){ throw new IllegalArgumentException("allele is null"); } if (allele.isReference()){ if (allele.equals(this.refAllele.get())){ return(getRef()); } else { throw new IllegalArgumentException("Requested ref allele does not match the stored ref allele"); } } else { return(getAlt(allele)); } } private  PerAlleleCollection(boolean altOnly); static PerAlleleCollection createPerAltAlleleCollection(); static PerAlleleCollection createPerRefAndAltAlleleCollection(); void set(Allele allele, X newValue); void setRef(Allele refAllele, X newValue); void setAlt(Allele altAllele, X newValue); X get(Allele allele); X getRef(); X getAlt(Allele allele); Set<Allele> getAltAlleles();  }### Answer:
@Test public void testGet() throws Exception { PerAlleleCollection<Integer> alleleCounts = PerAlleleCollection.createPerRefAndAltAlleleCollection(); Allele refA = Allele.create("A", true); Allele altT = Allele.create("T", false); alleleCounts.set(refA, 40); alleleCounts.set(altT, 10); assertEquals((int)alleleCounts.get(refA), 40); assertEquals((int)alleleCounts.get(altT), 10); }