### Question:
OF10PacketOutInputMessageFactory implements OFDeserializer<PacketOutInput>, DeserializerRegistryInjector { @Override public PacketOutInput deserialize(ByteBuf rawMessage) { PacketOutInputBuilder builder = new PacketOutInputBuilder(); builder.setVersion((short) EncodeConstants.OF10_VERSION_ID); builder.setXid(rawMessage.readUnsignedInt()); builder.setBufferId(rawMessage.readUnsignedInt()); builder.setInPort(new PortNumber((long) rawMessage.readUnsignedShort())); int actions_len = rawMessage.readShort(); CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF10_VERSION_ID); List<Action> actions = ListDeserializer.deserializeList(EncodeConstants.OF10_VERSION_ID, actions_len, rawMessage, keyMaker, registry); builder.setAction(actions); byte[] data = new byte[rawMessage.readableBytes()]; rawMessage.readBytes(data); if (data != null) { builder.setData(data); } return builder.build(); }  @Override void injectDeserializerRegistry(DeserializerRegistry deserializerRegistry); @Override PacketOutInput deserialize(ByteBuf rawMessage);  }### Answer:
@Test public void test() { ByteBuf bb = BufferHelper.buildBuffer("00 00 01 00 01 01 00 10 00 00 00 08 " + "00 2a 00 32 00 03 00 08 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14"); PacketOutInput deserializedMessage = BufferHelper.deserialize(factory, bb); BufferHelper.checkHeaderV10(deserializedMessage); Assert.assertEquals("Wrong bufferId ", 256L, deserializedMessage.getBufferId().longValue()); Assert.assertEquals("Wrong inPort ", new PortNumber(257L), deserializedMessage.getInPort()); Assert.assertEquals("Wrong action ", createActionList().get(0), deserializedMessage.getAction().get(0)); Assert.assertEquals("Wrong action ", createActionList().get(1), deserializedMessage.getAction().get(1)); Assert.assertArrayEquals("Wrong data ", ByteBufUtils.hexStringToBytes("00 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14"), deserializedMessage.getData()); }