@Test
public void testEmbeddedMessage() throws Exception {

    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));
    final NewOrderSingle order = createNewOrderSingle();
    String text = order.toString();
    report.set(new EncodedTextLen(text.length()));
    report.set(new EncodedText(text));
    final Message msg = new Message(report.toString(), DataDictionaryTest.getDictionary());
    assertEquals("embedded order", text, msg.getString(EncodedText.FIELD));
}