writer.writeMessage(msg);
writer.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
FudgeMsgReader reader = context.createMessageReader(bais);
FudgeMsg rebuiltMsg = reader.nextMessage();
AssertJUnit.assertNotNull(rebuiltMsg);
FudgeField currencyPairField = rebuiltMsg.getByName(CURRENCY_PAIR);
AssertJUnit.assertNotNull(currencyPairField);
AssertJUnit.assertEquals(String.class, currencyPairField.getType().getJavaType());
CurrencyPair currencyPair = rebuiltMsg.getFieldValue(CurrencyPair.class, currencyPairField);