@Test
public void testParsing() throws Exception {

    // checksum is not verified in these tests
    final Message message = new Message("8=FIX.4.2\0019=40\00135=A\001"
            + "98=0\001384=2\001372=D\001385=R\001372=8\001385=S\00110=96\001",
            DataDictionaryTest.getDictionary());
    assertHeaderField(message, "FIX.4.2", BeginString.FIELD);
    assertHeaderField(message, "40", BodyLength.FIELD);
    assertEquals("wrong field value", 40, message.getHeader().getInt(BodyLength.FIELD));
    assertHeaderField(message, "A", MsgType.FIELD);
    assertBodyField(message, "0", EncryptMethod.FIELD);
    assertTrailerField(message, "96", CheckSum.FIELD);
    final NoMsgTypes valueMessageType = new Logon.NoMsgTypes();
    message.getGroup(1, valueMessageType);
    assertEquals("wrong value", "D", valueMessageType.getString(RefMsgType.FIELD));
    assertEquals("wrong value", "R", valueMessageType.getString(MsgDirection.FIELD));
    message.getGroup(2, valueMessageType);
    assertEquals("wrong value", "8", valueMessageType.getString(RefMsgType.FIELD));
    assertEquals("wrong value", "S", valueMessageType.getString(MsgDirection.FIELD));
}