for (Object m : received)
{
final BytesMessage bytesMessage = (BytesMessage) m;
final long bodyLength = bytesMessage.getBodyLength();
byte[] data = new byte[(int) bodyLength];
bytesMessage.readBytes(data);
FieldTable actual = FieldTableFactory.newFieldTable(new DataInputStream(new ByteArrayInputStream(data)), bodyLength);
for (String key : _expected.keys())
{
assertEquals("Values for " + key + " did not match", _expected.getObject(key), actual.getObject(key));
}