### Question:
ProteinSubstitution extends ProteinChange { public static ProteinSubstitution build(boolean onlyPredicted, String sourceAA, int pos, String targetAA) { return new ProteinSubstitution(onlyPredicted, ProteinPointLocation.build(sourceAA, pos), targetAA); } 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 testFactoryMethod() { Assert.assertEquals(sub1, ProteinSubstitution.build(true, "A", 123, "G")); }