### Question:
Alleles implements Iterable<Allele>, Comparable<Alleles> { public boolean contains(Allele queryAllele) { return (alleles.contains(queryAllele)); } private  Alleles(List<Allele> alleles); static Alleles createAlleles(List<Allele> alleleList); static Alleles createAlleles(Allele... allele); static Alleles createBasedOnString(List<String> stringAlleles); static Alleles createBasedOnString(String allele1, String allele2); static Alleles createBasedOnChars(char allele1, char allele2); static Alleles createBasedOnChars(char[] charAlleles); List<Allele> getAlleles(); List<String> getAllelesAsString(); int getAlleleCount(); boolean isSnp(); char[] getAllelesAsChars(); @Override String toString(); Alleles getComplement(); boolean sameAlleles(Alleles other); boolean isAtOrGcSnp(); @Override Iterator<Allele> iterator(); Allele get(int alleleIndex); boolean contains(Allele queryAllele); boolean containsAll(Alleles queryAlleles); @Override int compareTo(Alleles other); @Override int hashCode(); @Override boolean equals(Object obj); Alleles createCopyWithoutDuplicates(); static final Alleles BI_ALLELIC_MISSING; }### Answer:
@Test public void contains() { Alleles alleles = Alleles.createBasedOnString(Arrays.asList("A", "T")); assertEquals(alleles.contains(Allele.A), true); assertEquals(alleles.contains(Allele.T), true); assertEquals(alleles.contains(Allele.C), false); assertEquals(alleles.contains(Allele.create("AA")), false); }