InternalRxTransaction extends AbstractRxQueryRunner implements RxTransaction { @Override public <T> Publisher<T> commit() { return close( true ); } InternalRxTransaction( UnmanagedTransaction tx ); @Override RxResult run(Query query); @Override Publisher<T> commit(); @Override Publisher<T> rollback();  }
@Test void commitShouldDelegate() { UnmanagedTransaction tx = mock( UnmanagedTransaction.class ); when( tx.commitAsync() ).thenReturn( Futures.completedWithNull() ); InternalRxTransaction rxTx = new InternalRxTransaction( tx ); Publisher<Void> publisher = rxTx.commit(); StepVerifier.create( publisher ).verifyComplete(); verify( tx ).commitAsync(); }