### Question:
SingleAlleleNucleotideVariant extends NucleotideVariant { @Override public String toHGVSString() { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":", seqType.getPrefix(), getChange().toHGVSString()); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":"); parts.add(seqType.getPrefix()); if (hasOnlyOneChange()) { parts.add(getChange().toHGVSString()); } else { parts.add("["); boolean first = true; for (NucleotideChange change : allele) { if (first) first = false; else parts.add(sep); parts.add(change.toHGVSString()); } parts.add("]"); } return Joiner.on("").join(parts); } SingleAlleleNucleotideVariant(SequenceType seqType, String seqID, VariantConfiguration varConfig,
										 Collection<? extends NucleotideChange> changes);  SingleAlleleNucleotideVariant(SequenceType seqType, String refID, String proteinID, int transcriptVersion,
										 NucleotideChangeAllele allele);  SingleAlleleNucleotideVariant(SequenceType seqType, String seqID, NucleotideChangeAllele allele); static SingleAlleleNucleotideVariant makeSingleChangeVariant(SequenceType seqType, String seqID,
																		NucleotideChange change); static SingleAlleleNucleotideVariant build(SequenceType seqType, String seqID,
													  VariantConfiguration varConfig, NucleotideChange... changes); boolean hasOnlyOneChange(); NucleotideChange getChange(); NucleotideChangeAllele getAllele(); @Override String toHGVSString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testToHGVSStringSingleChange() { Assert.assertEquals("REF:c.100A>G", singleChangeVariant.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("REF:c.100A>G", singleChangeVariant.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("REF:c.100A>G", singleChangeVariant.toHGVSString()); }
@Test public void testToHGVSStringMultiChange() { Assert.assertEquals("REF:c.[100C>T;301A>G]", multiChangeVariant.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("REF:c.[100C>T;301A>G]", multiChangeVariant.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("REF:c.[100C>T;301A>G]", multiChangeVariant.toHGVSString()); }