@Test
void shouldFailRxResultWhenRunFailed() throws Throwable
{

    // Given
    Throwable error = new RuntimeException( "Hi there" );
    ResultCursorFactory cursorFactory = newResultCursorFactory( failedFuture( error ), true );
    // When & Then
    CompletionStage<RxResultCursor> rxCursorFuture = cursorFactory.rxResult();
    CompletionException actual = assertThrows( CompletionException.class, () -> getNow( rxCursorFuture ) );
    assertThat( actual.getCause(), equalTo( error ) );
}