### Question:
Alleles implements Iterable<Allele>, Comparable<Alleles> { public boolean sameAlleles(Alleles other) { if (this == other) { return true; } if (this.alleles.size() != other.alleles.size()) { return false; } return this.alleles.containsAll(other.alleles) && other.alleles.containsAll(this.alleles); } 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 sameAlleles() { Alleles variantAlleles = Alleles.createBasedOnChars('A', 'G'); Alleles variantAlleles2 = Alleles.createBasedOnChars('T', 'G'); Alleles variantAlleles3 = Alleles.createBasedOnChars('G', 'A'); Alleles variantAlleles4 = Alleles.createBasedOnChars(new char[] { 'A', 'G', 'T' }); Alleles variantAlleles5 = Alleles.createBasedOnChars(new char[] { 'A' }); Alleles variantAlleles6 = Alleles.createBasedOnChars('A', 'G'); assertEquals(variantAlleles.sameAlleles(variantAlleles2), false); assertEquals(variantAlleles.sameAlleles(variantAlleles3), true); assertEquals(variantAlleles.sameAlleles(variantAlleles4), false); assertEquals(variantAlleles.sameAlleles(variantAlleles5), false); assertEquals(variantAlleles.sameAlleles(variantAlleles6), true); }