    @Test
    public void testExecuteN1qlQuery() {

        AsyncN1qlQueryRow mockRow = mock(AsyncN1qlQueryRow.class);

        when(mockResult.rows()).thenReturn(Observable.just(mockRow));
        when(mockResult.finalSuccess()).thenReturn(Observable.just(true));

        TestSubscriber<AsyncN1qlQueryRow> subscriber = new TestSubscriber<>();

        executeN1qlQuery(mockBucket, mockQuery)
                .subscribe(subscriber);

        subscriber.assertCompleted();
        subscriber.assertNoErrors();
        subscriber.assertValueCount(1);

        assertThat(subscriber.getOnNextEvents()).containsExactlyInAnyOrder(mockRow);

        verify(mockResult, never()).errors();
    }