TestNetworkConnection conn = new TestNetworkConnection();
engine.setNetworkConnection(conn, conn.getSender());
assertEquals("ID did not increment as expected", expectedID, engine.getConnectionId());
//actually feed in the AMQP header for this protocol version, and ensure the ID remains consistent
engine.received(ByteBuffer.wrap(header));
assertEquals("ID was not as expected following receipt of the AMQP version header", expectedID, engine.getConnectionId());
previousId = expectedID;
engine.closed();
}