InternalRxSession extends AbstractRxQueryRunner implements RxSession { public Publisher<Void> reset() { return createEmptyPublisher( session::resetAsync ); } InternalRxSession( NetworkSession session ); @Override Publisher<RxTransaction> beginTransaction(); @Override Publisher<RxTransaction> beginTransaction( TransactionConfig config ); @Override Publisher<T> readTransaction( RxTransactionWork<? extends Publisher<T>> work ); @Override Publisher<T> readTransaction( RxTransactionWork<? extends Publisher<T>> work, TransactionConfig config ); @Override Publisher<T> writeTransaction( RxTransactionWork<? extends Publisher<T>> work ); @Override Publisher<T> writeTransaction( RxTransactionWork<? extends Publisher<T>> work, TransactionConfig config ); @Override RxResult run(String query, TransactionConfig config ); @Override RxResult run(String query, Map<String,Object> parameters, TransactionConfig config ); @Override RxResult run(Query query); @Override RxResult run(Query query, TransactionConfig config ); @Override Bookmark lastBookmark(); Publisher<Void> reset(); @Override Publisher<T> close();  }
@Test void shouldDelegateReset() throws Throwable { NetworkSession session = mock( NetworkSession.class ); when( session.resetAsync() ).thenReturn( completedWithNull() ); InternalRxSession rxSession = new InternalRxSession( session ); Publisher<Void> mono = rxSession.reset(); StepVerifier.create( mono ).verifyComplete(); verify( session ).resetAsync(); verifyNoMoreInteractions( session ); }