### Question:
AbstractGeneticVariant implements GeneticVariant { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof GeneticVariant)) { return false; } GeneticVariant other = (GeneticVariant) obj; if (getSequenceName() == null) { if (other.getSequenceName() != null) { return false; } } else if (!getSequenceName().equals(other.getSequenceName())) { return false; } if (getStartPos() != other.getStartPos()) { return false; } if (!other.getClass().equals(obj.getClass())) { return false; } if (getVariantAlleles() == null) { if (other.getVariantAlleles() != null) { return false; } } else if (!getVariantAlleles().equals(other.getVariantAlleles())) { return false; } if (getSampleVariantsProvider() == null) { if (other.getSampleVariantsProvider() != null) { return false; } } else if (!getSampleVariantsProvider().equals(other.getSampleVariantsProvider())) { return false; } return true; }  @Override final int compareTo(GeneticVariant other); @Override int hashCode(); @Override boolean equals(Object obj); @Override boolean isMapped(); @Override double getCallRate(); @Override double getHwePvalue(); @Override boolean isSnp(); @Override boolean isAtOrGcSnp(); @Override Ld calculateLd(GeneticVariant other); @Override boolean isBiallelic(); @Override boolean hasPhasedGenotypes(); @Override double getMachR2();  }### Answer:
@Test public void equals() { assertEquals(variant1.equals(variant1), true); assertEquals(variant1.equals(variant2), true); assertEquals(variant1.equals(variant3), false); assertEquals(variant1.equals(variant4), false); assertEquals(variant1.equals(variant5), false); assertEquals(variant1.equals(variant6), false); assertEquals(variant1.equals(variant7), false); assertEquals(variant1.equals(variant8), false); assertEquals(variant1.equals(variant9), false); assertEquals(variant2.equals(variant3), false); assertEquals(variant5.equals(variant6), false); assertEquals(variant7.equals(variant8), false); }