@Test
public void testEmbeddedMessage() throws Exception {

    final NewOrderSingle order = createNewOrderSingle();
    final ExecutionReport report = new ExecutionReport(new OrderID("ORDER"),
            new ExecID("EXEC"), new ExecType(ExecType.FILL), new OrdStatus(OrdStatus.FILLED),
            new Side(Side.BUY), new LeavesQty(100), new CumQty(100), new AvgPx(50));
    report.set(new EncodedTextLen(order.toString().length()));
    report.set(new EncodedText(order.toString()));
    final Message msg = new Message(report.toString(), DataDictionaryTest.getDictionary());
    assertEquals("embedded order", order.toString(), msg.getString(EncodedText.FIELD));
}