sessionControl.setVoidCallable(1);
if (flushNever) {
session.setFlushMode(FlushMode.NEVER);
sessionControl.setVoidCallable(1);
}
session.disconnect();
sessionControl.setReturnValue(null, 1);
sessionControl.replay();
Synchronization synchronization = transaction.getSynchronization();
assertTrue("JTA synchronization registered", synchronization != null);