}
List<ManagedConnection> connections = _jmxUtils.getManagedConnections("test");
assertNotNull("Connection MBean is not found", connections);
assertEquals("Unexpected number of connection mbeans", 1, connections.size());
final ManagedConnection mBean = connections.get(0);
assertNotNull("Connection MBean is null", mBean);
TabularData channelsData = mBean.channels();
assertNotNull("Channels data are null", channelsData);
assertEquals("Unexpected number of rows in channel table", 1, channelsData.size());
final Iterator<CompositeDataSupport> rowItr = (Iterator<CompositeDataSupport>) channelsData.values().iterator();
final CompositeDataSupport row = rowItr.next();
Number unackCount = (Number) row.get(ManagedConnection.UNACKED_COUNT);
final Boolean transactional = (Boolean) row.get(ManagedConnection.TRANSACTIONAL);
final Boolean flowBlocked = (Boolean) row.get(ManagedConnection.FLOW_BLOCKED);
assertNotNull("Channel should have unacknowledged messages", unackCount);
assertEquals("Unexpected number of unacknowledged messages", 2, unackCount.intValue());
assertNotNull("Channel should have transaction flag", transactional);
assertTrue("Unexpected transaction flag", transactional);
assertNotNull("Channel should have flow blocked flag", flowBlocked);
assertFalse("Unexpected value of flow blocked flag", flowBlocked);
final Date initialLastIOTime = mBean.getLastIoTime();
session.commit();
assertTrue("Last IO time should have been updated", mBean.getLastIoTime().after(initialLastIOTime));
channelsData = mBean.channels();
assertNotNull("Channels data are null", channelsData);
assertEquals("Unexpected number of rows in channel table", 1, channelsData.size());
final Iterator<CompositeDataSupport> rowItr2 = (Iterator<CompositeDataSupport>) channelsData.values().iterator();
final CompositeDataSupport row2 = rowItr2.next();