@Test
public void addVariant() throws Exception {

    AlleleRegionCalculator calculator = new AlleleRegionCalculator("1", snToSid, 10, 20);
    calculator.addVariant(varA);
    calculator.addVariant(varB);
    AlleleRegionStore store = calculator.getStore();
    List<Region<AlleleInfo>> reglst = store.getVariation(new RegionImpl(null, 10,20));
    assertEquals(1, reglst.size());
    Region<AlleleInfo> areg = reglst.get(0);
    assertEquals(varA.getStart().intValue(), areg.getStart());
    AlleleInfo ai = areg.getData();
    assertEquals(varA.getReference(), ai.getId()[0]);
    assertEquals(varA.getAlternate(), ai.getId()[1]);
    assertEquals(1, ai.getSampleIds().size());
    assertEquals(2, store.getReference(new PointRegion(0, 13)).size());
    assertEquals(1, store.getAll(new PointRegion(0, 12)).size());
    assertEquals(3, store.getAll(new PointRegion(0, 13)).size());
    calculator.addVariant(varC);
    calculator.addVariant(varD);
    assertEquals(3,store.getVariation(new RegionImpl(null, 10,20)).size());
    assertEquals(3,store.getVariation(new PointRegion(null, 13)).size());
    assertEquals(4, store.getReference(new PointRegion(0, 13)).size());
    calculator.addVariant(varC2);
    assertEquals(4,store.getVariation(new PointRegion(null, 13)).size());
}