@Test
public void limitNotReached() {

    fdb.run(context -> {
        RecordScanLimiter limiter = RecordScanLimiterFactory.enforce(4);
        KeyValueCursor cursor = KeyValueCursor.Builder.withSubspace(subspace)
                .setContext(context)
                .setLow(Tuple.from(3, 3), EndpointType.RANGE_EXCLUSIVE)
                .setHigh(Tuple.from(4, 2), EndpointType.RANGE_EXCLUSIVE)
                .setScanProperties(forwardScanWithLimiter(limiter))
                .build();
        assertEquals(3, (int) cursor.getCount().join());
        RecordCursorResult<?> result = cursor.getNext();
        assertThat("no next reason should be SOURCE_EXHAUSTED", result.getNoNextReason(),
                equalTo(RecordCursor.NoNextReason.SOURCE_EXHAUSTED));
        return null;
    });
}