RxResultCursorImpl implements RxResultCursor { @Override public void cancel() { pullHandler.cancel(); } RxResultCursorImpl(RunResponseHandler runHandler, PullResponseHandler pullHandler );  RxResultCursorImpl(Throwable runError, RunResponseHandler runHandler, PullResponseHandler pullHandler ); @Override List<String> keys(); @Override void installRecordConsumer( BiConsumer<Record,Throwable> recordConsumer ); @Override void request( long n ); @Override void cancel(); @Override CompletionStage<Throwable> discardAllFailureAsync(); @Override CompletionStage<Throwable> pullAllFailureAsync(); @Override CompletionStage<ResultSummary> summaryAsync(); @Override boolean isDone();  }
@Test void shouldCancel() throws Throwable { RunResponseHandler runHandler = newRunResponseHandler(); PullResponseHandler pullHandler = mock( PullResponseHandler.class ); RxResultCursor cursor = new RxResultCursorImpl( runHandler, pullHandler ); cursor.cancel(); verify( pullHandler ).cancel(); }