private static final Log LOG =
LogFactory.getLog(TestSortedRanges.class);
public void testAdd() {
SortedRanges sr = new SortedRanges();
sr.add(new Range(2,9));
assertEquals(9, sr.getIndicesCount());
sr.add(new SortedRanges.Range(3,5));
assertEquals(9, sr.getIndicesCount());
sr.add(new SortedRanges.Range(7,1));
assertEquals(9, sr.getIndicesCount());
sr.add(new Range(1,12));
assertEquals(12, sr.getIndicesCount());
sr.add(new Range(7,9));
assertEquals(15, sr.getIndicesCount());
sr.add(new Range(31,10));
sr.add(new Range(51,10));
sr.add(new Range(66,10));
assertEquals(45, sr.getIndicesCount());
sr.add(new Range(21,50));
assertEquals(70, sr.getIndicesCount());
LOG.debug(sr);
Iterator<Long> it = sr.skipRangeIterator();