### Question:
ProteinSubstitution extends ProteinChange { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProteinSubstitution other = (ProteinSubstitution) obj; if (location == null) { if (other.location != null) return false; } else if (!location.equals(other.location)) return false; if (targetAA == null) { if (other.targetAA != null) return false; } else if (!targetAA.equals(other.targetAA)) return false; return true; } ProteinSubstitution(boolean onlyPredicted, ProteinPointLocation location, String targetAA); static ProteinSubstitution build(boolean onlyPredicted, String sourceAA, int pos, String targetAA); static ProteinSubstitution buildWithOffset(boolean onlyPredicted, String sourceAA, int pos, int offset,
													  String targetAA); static ProteinSubstitution buildDownstreamOfTerminal(boolean onlyPredicted, String sourceAA, int pos,
																String targetAA); ProteinPointLocation getLocation(); String getTargetAA(); @Override String toHGVSString(AminoAcidCode code); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ProteinChange withOnlyPredicted(boolean onlyPredicted);  }### Answer:
@Test public void testEquals() { Assert.assertTrue(sub1.equals(sub2)); Assert.assertTrue(sub2.equals(sub1)); Assert.assertFalse(sub1.equals(sub3)); Assert.assertFalse(sub3.equals(sub1)); }