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