conControl.verify();
}
public void testTransactionRollback() throws LookupException, SQLException {
MockControl pbControl = MockControl.createControl(PersistenceBroker.class);
final PersistenceBroker pb = (PersistenceBroker) pbControl.getMock();
MockControl cmControl = MockControl.createControl(ConnectionManagerIF.class);
final ConnectionManagerIF cm = (ConnectionManagerIF) cmControl.getMock();
final Object entity = new Object();
MockControl conControl = MockControl.createControl(Connection.class);
Connection con = (Connection) conControl.getMock();
pb.serviceConnectionManager();
pbControl.setReturnValue(cm, 2);
cm.getConnection();
cmControl.setReturnValue(con, 2);
con.setReadOnly(true);
conControl.setVoidCallable(1);
con.getTransactionIsolation();
conControl.setReturnValue(Connection.TRANSACTION_READ_COMMITTED, 1);
con.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
conControl.setVoidCallable(1);
con.isReadOnly();
conControl.setReturnValue(true, 1);
con.setReadOnly(false);
conControl.setVoidCallable(1);
con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
conControl.setVoidCallable(1);
pb.beginTransaction();
pbControl.setVoidCallable(1);
pb.delete(entity);
pbControl.setVoidCallable(1);
pb.abortTransaction();
pbControl.setVoidCallable(1);
pb.close();
pbControl.setReturnValue(true, 1);
pbControl.replay();
cmControl.replay();
conControl.replay();