### Question:
GenomicNucleotideChangeBuilder { public NucleotideChange build() { final String ref; final String alt; if (variant.getGenomeInterval().getStrand() == Strand.FWD) { ref = variant.getRef(); alt = variant.getAlt(); } else { ref = DNAUtils.reverseComplement(variant.getRef()); alt = DNAUtils.reverseComplement(variant.getAlt()); } GenomePosition position = variant.getGenomePos().withStrand(Strand.FWD); final int beginPos = position.getPos(); if (ref.length() == 1 && alt.length() == 1) return NucleotideSubstitution.build(false, beginPos, ref, alt); if (ref.length() == 0) return NucleotideInsertion.buildWithSequence(false, beginPos - 1, beginPos, alt); else if (alt.length() == 0) return NucleotideDeletion.buildWithSequence(false, beginPos, beginPos + ref.length() - 1, ref); else if (ref.length() != alt.length()) return NucleotideIndel.buildWithSequence(false, beginPos, beginPos + ref.length() - 1, ref, alt); StringBuilder altRC = new StringBuilder(alt).reverse(); for (int i = 0; i < altRC.length(); ++i) if (altRC.charAt(i) == 'A') altRC.setCharAt(i, 'T'); else if (altRC.charAt(i) == 'T') altRC.setCharAt(i, 'A'); else if (altRC.charAt(i) == 'C') altRC.setCharAt(i, 'G'); else if (altRC.charAt(i) == 'G') altRC.setCharAt(i, 'C'); if (ref.length() == alt.length() && ref.equals(altRC.toString())) return NucleotideInversion.buildWithoutSeqDescription(false, beginPos, beginPos + ref.length() - 1); else return NucleotideIndel.buildWithSequence(false, beginPos, beginPos + ref.length() - 1, ref, alt); } GenomicNucleotideChangeBuilder(GenomeVariant variant); GenomeVariant getVariant(); NucleotideChange build();  }### Answer:
@Test public void testInsertion() { Assert.assertEquals("100_101insCGAT", new GenomicNucleotideChangeBuilder(varIns).build().toHGVSString()); }
@Test public void testDeletion() { Assert.assertEquals("101_104delCGAT", new GenomicNucleotideChangeBuilder(varDel).build().toHGVSString()); }
@Test public void testSNV() { Assert.assertEquals("101C>T", new GenomicNucleotideChangeBuilder(varSNV).build().toHGVSString()); }
@Test public void testSubstitution() { Assert.assertEquals("101_103delCGAinsTTT", new GenomicNucleotideChangeBuilder(varSub).build().toHGVSString()); }
@Test public void testInversion() { Assert.assertEquals("101_104inv", new GenomicNucleotideChangeBuilder(varInv).build().toHGVSString()); }