assertSame(expectedResult, result);
}
public void testPerformInTransaction_ExistingTx() {
final Transaction tx1 = mock(Transaction.class);
final DataDomain domain = mock(DataDomain.class);
when(domain.createTransaction()).thenReturn(tx1);
DefaultTransactionManager txManager = new DefaultTransactionManager(domain);
final Transaction tx2 = mock(Transaction.class);
Transaction.bindThreadTransaction(tx2);
try {
final Object expectedResult = new Object();
Object result = txManager.performInTransaction(new TransactionalOperation<Object>() {