m.setXid(0xdeadbeef);
ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
ChannelBuffer bb2 = ChannelBuffers.dynamicBuffer();
m.writeTo(bb);
bb2.writeBytes(bb, bb.readableBytes()-1);
TestCase.assertNull(factory.parseMessage(bb2));
bb2.writeByte(bb.readByte());
List<OFMessage> message = factory.parseMessage(bb2);
TestCase.assertNotNull(message);
TestCase.assertEquals(message.size(), 1);
TestCase.assertTrue(message.get(0).getType() == OFType.ECHO_REQUEST);