### Question:
OF10PortModInputMessageFactory implements OFDeserializer<PortModInput> { @Override public PortModInput deserialize(final ByteBuf rawMessage) { PortModInputBuilder builder = new PortModInputBuilder(); builder.setVersion((short) EncodeConstants.OF10_VERSION_ID); builder.setXid(rawMessage.readUnsignedInt()); builder.setPortNo(new PortNumber((long) rawMessage.readUnsignedShort())); builder.setHwAddress(ByteBufUtils.readIetfMacAddress(rawMessage)); builder.setConfigV10(createPortConfig(rawMessage.readUnsignedInt())); builder.setMaskV10(createPortConfig(rawMessage.readUnsignedInt())); builder.setAdvertiseV10(createPortFeatures(rawMessage.readUnsignedInt())); return builder.build(); }  @Override PortModInput deserialize(final ByteBuf rawMessage);  }### Answer:
@Test public void test() { ByteBuf bb = BufferHelper .buildBuffer("19 e9 08 00 27 00 b0 eb " + "00 00 00 15 00 00 00 62 00 00 02 8c 00 00 00 00 "); PortModInput deserializedMessage = BufferHelper.deserialize(factory, bb); BufferHelper.checkHeaderV10(deserializedMessage); Assert.assertEquals("Wrong port", new PortNumber(6633L), deserializedMessage.getPortNo()); Assert.assertEquals("Wrong hwAddr", new MacAddress("08:00:27:00:b0:eb"), deserializedMessage.getHwAddress()); Assert.assertEquals("Wrong config", new PortConfigV10(true, false, false, true, false, false, true), deserializedMessage.getConfigV10()); Assert.assertEquals("Wrong mask", new PortConfigV10(false, true, true, false, false, true, false), deserializedMessage.getMaskV10()); Assert.assertEquals("Wrong advertise", new PortFeaturesV10(true, true, false, false, false, false, false, true, true, false, false, false), deserializedMessage.getAdvertiseV10()); }