### Question:
ProteinExtension extends ProteinChange { @Override public String toHGVSString(AminoAcidCode code) { String targetAA = this.targetAA; if (code == AminoAcidCode.THREE_LETTER) targetAA = Translator.getTranslator().toLong(targetAA); if (isNoTerminalExtension()) return wrapIfOnlyPredicted(Joiner.on("").join(position.toHGVSString(code), targetAA, "ext*?")); else return wrapIfOnlyPredicted(Joiner.on("").join(position.toHGVSString(code), targetAA, "ext*", shift)); } ProteinExtension(boolean onlyPredicted, ProteinPointLocation position, String targetAA, int shift); static ProteinExtension build(boolean onlyPredicted, String wtAA, int pos, String targetAA, int shift); static ProteinExtension build(boolean onlyPredicted, ProteinPointLocation position, String targetAA,
										 int shift); static ProteinExtension buildWithoutTerminal(boolean onlyPredicted, String wtAA, int pos, String targetAA); static ProteinExtension buildWithoutTerminal(boolean onlyPredicted, ProteinPointLocation position,
														String targetAA); ProteinPointLocation getPosition(); String getTargetAA(); int getShift(); boolean isNoTerminalExtension(); @Override String toHGVSString(AminoAcidCode code); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ProteinChange withOnlyPredicted(boolean onlyPredicted); static final int LEN_NO_TER; }### Answer:
@Test public void testNormalExtensionToHGVSString() { Assert.assertEquals("A124Text*23", normalExtension.toHGVSString()); Assert.assertEquals("Ala124Thrext*23", normalExtension.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("A124Text*23", normalExtension.toHGVSString(AminoAcidCode.ONE_LETTER)); }
@Test public void testNoTerExtensionToHGVSString() { Assert.assertEquals("A124Text*?", noTerExtension.toHGVSString()); Assert.assertEquals("Ala124Thrext*?", noTerExtension.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("A124Text*?", noTerExtension.toHGVSString(AminoAcidCode.ONE_LETTER)); }