### Question:
Allele implements Comparable<Allele> { public Allele getComplement() { if (isSnpAllele()) { return complement; } else { throw new RuntimeException("Complement currently only supported for SNPs"); } } private  Allele(String allele); private  Allele(char allele); boolean isSnpAllele(); String getAlleleAsString(); char getAlleleAsSnp(); Allele getComplement(); static Allele create(String alleleString); static Allele create(char alleleChar); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(Allele other); final static Allele A; final static Allele C; final static Allele G; final static Allele T; final static Allele ZERO; }### Answer:
@Test public void getComplement() { assertEquals(Allele.A.getComplement().getAlleleAsString(), "T"); }