ByteKeyRangeTracker implements RangeTracker<ByteKey> { @Override public synchronized String toString() { return toStringHelper(ByteKeyRangeTracker.class) .add("range", range) .add("position", position) .toString(); } 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 testToString() { ByteKeyRangeTracker tracker = ByteKeyRangeTracker.of(INITIAL_RANGE); String expected = String.format("ByteKeyRangeTracker{range=%s, position=null}", INITIAL_RANGE); assertEquals(expected, tracker.toString()); tracker.tryReturnRecordAt(true, INITIAL_START_KEY); tracker.tryReturnRecordAt(true, INITIAL_MIDDLE_KEY); expected = String.format( "ByteKeyRangeTracker{range=%s, position=%s}", INITIAL_RANGE, INITIAL_MIDDLE_KEY); assertEquals(expected, tracker.toString()); }