@Override
  // Suppress build error that prevents this from being nullable. For some reason it
  // believes GrowableOffsetRangeTracker trySplit is NonNull even though it is nullable
  @SuppressWarnings("override.return")
  public @Nullable SplitResult<OffsetRange> trySplit(double fractionOfRemainder) {
    // Refuse to split because we only ever want one active restriction for DNP
    if (fractionOfRemainder != 0) {
      return null;
    }
    return super.trySplit(fractionOfRemainder);
  }
@Test
  public void testTrySplit() {
    final DetectNewPartitionsTracker tracker = new DetectNewPartitionsTracker(0);
    assertNull(tracker.trySplit(.7));
    assertThrows(IllegalStateException.class, tracker::checkDone);

    assertTrue(tracker.tryClaim(tracker.currentRestriction().getFrom()));
    SplitResult<OffsetRange> checkpointResult = tracker.trySplit(0);
    tracker.checkDone(); // should not throw exception
    assertEquals(0L, checkpointResult.getPrimary().getFrom());
    assertEquals(1L, checkpointResult.getPrimary().getTo());
    assertEquals(1L, checkpointResult.getResidual().getFrom());
    assertEquals(Long.MAX_VALUE, checkpointResult.getResidual().getTo());
  }