TransactionalEntity extends AbstractEntity<I, S> { @VisibleForTesting final boolean isTransactionInProgress() { Transaction<?, ?, ?, ?> tx = this.transaction; boolean result = tx != null && tx.isActive(); return result; } protected  TransactionalEntity(); protected  TransactionalEntity(I id); @Internal final boolean changed(); @Override final LifecycleFlags getLifecycleFlags();  }
@Test @DisplayName("have transaction in progress when transaction is active") void haveTxInProgress() { TransactionalEntity entity = entityWithActiveTx(false); assertTrue(entity.isTransactionInProgress()); }