### Question:
NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation lastPost); static NucleotideRange build(int firstPos, int firstPosOffset, int lastPos, int lastPosOffset); static NucleotideRange buildWithoutOffset(int firstPos, int lastPos); NucleotidePointLocation getFirstPos(); NucleotidePointLocation getLastPos(); @Override String toHGVSString(); @Override String toHGVSString(AminoAcidCode code); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testToHGVSStringRange() { NucleotideRange range = new NucleotideRange(firstLoc, lastLoc); Assert.assertEquals("124_235-1", range.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("124_235-1", range.toHGVSString(AminoAcidCode.THREE_LETTER)); }
@Test public void testToHGVSStringSinglePos() { NucleotideRange range = new NucleotideRange(firstLoc, firstLoc2); Assert.assertEquals("124", range.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("124", range.toHGVSString(AminoAcidCode.THREE_LETTER)); }