### Question:
FlowRemovedMessageFactory implements OFDeserializer<FlowRemovedMessage>,
        DeserializerRegistryInjector { @Override public FlowRemovedMessage deserialize(ByteBuf rawMessage) { FlowRemovedMessageBuilder builder = new FlowRemovedMessageBuilder(); builder.setVersion((short) EncodeConstants.OF13_VERSION_ID); builder.setXid(rawMessage.readUnsignedInt()); byte[] cookie = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES]; rawMessage.readBytes(cookie); builder.setCookie(new BigInteger(1, cookie)); builder.setPriority(rawMessage.readUnsignedShort()); builder.setReason(FlowRemovedReason.forValue(rawMessage.readUnsignedByte())); builder.setTableId(new TableId((long)rawMessage.readUnsignedByte())); builder.setDurationSec(rawMessage.readUnsignedInt()); builder.setDurationNsec(rawMessage.readUnsignedInt()); builder.setIdleTimeout(rawMessage.readUnsignedShort()); builder.setHardTimeout(rawMessage.readUnsignedShort()); byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES]; rawMessage.readBytes(packetCount); builder.setPacketCount(new BigInteger(1, packetCount)); byte[] byteCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES]; rawMessage.readBytes(byteCount); builder.setByteCount(new BigInteger(1, byteCount)); OFDeserializer<Match> matchDeserializer = registry.getDeserializer(new MessageCodeKey( EncodeConstants.OF13_VERSION_ID, EncodeConstants.EMPTY_VALUE, Match.class)); builder.setMatch(matchDeserializer.deserialize(rawMessage)); return builder.build(); }  @Override FlowRemovedMessage deserialize(ByteBuf rawMessage); @Override void injectDeserializerRegistry(DeserializerRegistry deserializerRegistry);  }### Answer:
@Test public void test(){ ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 04 05 06 07 00 03 02 04 00 00 00 02" + " 00 00 00 05 00 01 00 03 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07"); FlowRemovedMessage builtByFactory = BufferHelper.deserialize(flowFactory, bb); BufferHelper.checkHeaderV13(builtByFactory); Assert.assertTrue(builtByFactory.getCookie().longValue() == 0x0001020304050607L); Assert.assertTrue(builtByFactory.getPriority() == 0x03); Assert.assertEquals("Wrong reason", 0x02, builtByFactory.getReason().getIntValue()); Assert.assertEquals("Wrong tableId", new TableId(4L), builtByFactory.getTableId()); Assert.assertEquals("Wrong durationSec", 0x02L, builtByFactory.getDurationSec().longValue()); Assert.assertEquals("Wrong durationNsec", 0x05L, builtByFactory.getDurationNsec().longValue()); Assert.assertEquals("Wrong idleTimeout", 0x01, builtByFactory.getIdleTimeout().intValue()); Assert.assertEquals("Wrong hardTimeout", 0x03, builtByFactory.getHardTimeout().intValue()); Assert.assertEquals("Wrong packetCount", 0x0001020304050607L, builtByFactory.getPacketCount().longValue()); Assert.assertEquals("Wrong byteCount", 0x0001020304050607L, builtByFactory.getByteCount().longValue()); }