final Object spy = spy(invocation.callRealMethod());
mockConnection = (Connection) spy;
return spy;
}
}).when(dataSource).getConnection();
UnitOfWork uow = DefaultUnitOfWork.startAndGet(new SpringTransactionManager(transactionManager));
Connection connection = connectionProvider.getConnection();
assertNotSame(connection, mockConnection);
connection.commit();
verify(mockConnection, never()).commit();