public long rangeSize() {
        long result = 0;
        Sequence sequence = getHead();
        while (sequence != null) {
            result += sequence.range();
            sequence = sequence.getNext();
        }
        return result;
    }
@Test
    public void testRangeSize() {
        SequenceSet set = new SequenceSet();
        set.add(1);
        assertEquals(1, set.rangeSize());
        set.add(10);
        set.add(20);
        assertEquals(3, set.rangeSize());
        set.clear();
        assertEquals(0, set.rangeSize());
    }