### Question:
OF10HelloMessageFactory implements OFDeserializer<HelloMessage> { @Override public HelloMessage deserialize(ByteBuf rawMessage) { HelloMessageBuilder builder = new HelloMessageBuilder(); builder.setVersion((short) EncodeConstants.OF10_VERSION_ID); builder.setXid(rawMessage.readUnsignedInt()); if (rawMessage.readableBytes() > 0) { rawMessage.skipBytes(rawMessage.readableBytes()); } return builder.build(); }  @Override HelloMessage deserialize(ByteBuf rawMessage);  }### Answer:
@Test public void testWithoutElements() { ByteBuf bb = BufferHelper.buildBuffer(); HelloMessage builtByFactory = BufferHelper.deserialize( helloFactory, bb); BufferHelper.checkHeaderV10(builtByFactory); Assert.assertNull("Wrong elements", builtByFactory.getElements()); }
@Test public void testWithElements() { ByteBuf bb = BufferHelper.buildBuffer("00 01 " + "00 0c " + "00 00 00 11 " + "00 00 00 00 " + "00 00 00 00" ); HelloMessage builtByFactory = BufferHelper.deserialize( helloFactory, bb); BufferHelper.checkHeaderV10(builtByFactory); Assert.assertNull("Wrong elements", builtByFactory.getElements()); }