@Test
public void exclusiveRange() {

    fdb.run(context -> {
        KeyValueCursor cursor = KeyValueCursor.Builder.withSubspace(subspace)
                .setContext(context)
                .setLow(Tuple.from(3, 3), EndpointType.RANGE_EXCLUSIVE)
                .setHigh(Tuple.from(4, 2), EndpointType.RANGE_EXCLUSIVE)
                .setContinuation(null)
                .setScanProperties(ScanProperties.FORWARD_SCAN)
                .build();
        assertEquals(Arrays.asList(Tuple.from(3L, 4L), Tuple.from(4L, 0L), Tuple.from(4L, 1L)),
                cursor.map(KeyValue::getValue).map(Tuple::fromBytes).asList().join());
        cursor = KeyValueCursor.Builder.withSubspace(subspace)
                .setContext(context)
                .setLow(Tuple.from(3, 3), EndpointType.RANGE_EXCLUSIVE)
                .setHigh(Tuple.from(4, 2), EndpointType.RANGE_EXCLUSIVE)
                .setContinuation(null)
                .setScanProperties(new ScanProperties(ExecuteProperties.newBuilder().setReturnedRowLimit(2).build()))
                .build();
        assertEquals(Arrays.asList(Tuple.from(3L, 4L), Tuple.from(4L, 0L)),
                cursor.map(KeyValue::getValue).map(Tuple::fromBytes).asList().join());
        cursor = KeyValueCursor.Builder.withSubspace(subspace)
                .setContext(context)
                .setLow(Tuple.from(3, 3), EndpointType.RANGE_EXCLUSIVE)
                .setHigh(Tuple.from(4, 2), EndpointType.RANGE_EXCLUSIVE)
                .setContinuation(cursor.getNext().getContinuation().toBytes())
                .setScanProperties(ScanProperties.FORWARD_SCAN)
                .build();
        assertEquals(Collections.singletonList(Tuple.from(4L, 1L)),
                cursor.map(KeyValue::getValue).map(Tuple::fromBytes).asList().join());
        return null;
    });
}