ByteKeyRangeTracker implements RangeTracker<ByteKey> { public synchronized long getSplitPointsConsumed() { if (position == null) { return 0; } else if (isDone()) { return splitPointsSeen; } else { checkState( splitPointsSeen > 0, "A started rangeTracker should have seen > 0 split points (is %s)", splitPointsSeen); return splitPointsSeen - 1; } } private  ByteKeyRangeTracker(ByteKeyRange range); static ByteKeyRangeTracker of(ByteKeyRange range); synchronized boolean isDone(); @Override synchronized ByteKey getStartPosition(); @Override synchronized ByteKey getStopPosition(); synchronized ByteKeyRange getRange(); @Override synchronized boolean tryReturnRecordAt(boolean isAtSplitPoint, ByteKey recordStart); @Override synchronized boolean trySplitAtPosition(ByteKey splitPosition); @Override synchronized double getFractionConsumed(); synchronized long getSplitPointsConsumed(); synchronized boolean markDone(); @Override synchronized String toString();  }
@Test public void testGetSplitPointsConsumed() { ByteKeyRangeTracker tracker = ByteKeyRangeTracker.of(INITIAL_RANGE); assertEquals(0, tracker.getSplitPointsConsumed()); assertTrue(tracker.tryReturnRecordAt(true, INITIAL_START_KEY)); assertEquals(0, tracker.getSplitPointsConsumed()); assertTrue(tracker.tryReturnRecordAt(true, AFTER_START_KEY)); assertEquals(1, tracker.getSplitPointsConsumed()); assertTrue(tracker.tryReturnRecordAt(false, INITIAL_MIDDLE_KEY)); assertEquals(1, tracker.getSplitPointsConsumed()); assertTrue(tracker.tryReturnRecordAt(true, BEFORE_END_KEY)); assertEquals(2, tracker.getSplitPointsConsumed()); tracker.markDone(); assertEquals(3, tracker.getSplitPointsConsumed()); }