final MessageConsumer consumer = session.createConsumer(destination);
sendMessage(session, destination, numberOfMessages);
receiveMessagesWithoutCommit(consumer, numberOfMessages);
final ManagedConnection mBean = getConnectionMBean();
final CompositeDataSupport row = getTheOneChannelRow(mBean);
boolean flowBlocked = false;
assertChannelRowData(row, numberOfMessages, transactional, flowBlocked);
// check that commit advances the lastIoTime
final Date initialLastIOTime = mBean.getLastIoTime();
session.commit();
assertTrue("commit should have caused last IO time to advance", mBean.getLastIoTime().after(initialLastIOTime));
// check that channels() now returns one session with no unacknowledged messages
final CompositeDataSupport rowAfterCommit = getTheOneChannelRow(mBean);
final Number unackCountAfterCommit = (Number) rowAfterCommit.get(ManagedConnection.UNACKED_COUNT);
assertEquals("Unexpected number of unacknowledged messages", 0, unackCountAfterCommit);