MockControl dsControl = MockControl.createControl(DataSource.class);
final DataSource ds = (DataSource) dsControl.getMock();
MockControl conControl = MockControl.createControl(Connection.class);
Connection con = (Connection) conControl.getMock();
JtaTransactionManager ptm = new JtaTransactionManager(ut) {
protected void doRegisterAfterCompletionWithJtaTransaction(
JtaTransactionObject txObject, final List synchronizations) {
Thread async = new Thread() {
public void run() {
invokeAfterCompletion(synchronizations, TransactionSynchronization.STATUS_COMMITTED);