### Question:
RoleRequestInputMessageFactory implements OFDeserializer<RoleRequestInput> { @Override public RoleRequestInput deserialize(ByteBuf rawMessage) { RoleRequestInputBuilder builder = new RoleRequestInputBuilder(); builder.setVersion((short) EncodeConstants.OF13_VERSION_ID); builder.setXid((rawMessage.readUnsignedInt())); builder.setRole(ControllerRole.forValue(rawMessage.readInt())); rawMessage.skipBytes(PADDING); byte[] generationId = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES]; rawMessage.readBytes(generationId); builder.setGenerationId(new BigInteger(1, generationId)); return builder.build(); }  @Override RoleRequestInput deserialize(ByteBuf rawMessage);  }### Answer:
@Test public void test() { ByteBuf bb = BufferHelper.buildBuffer("00 00 00 02 00 00 00 00 ff 01 01 01 01 01 01 01"); RoleRequestInput deserializedMessage = BufferHelper.deserialize(factory, bb); BufferHelper.checkHeaderV13(deserializedMessage); Assert.assertEquals("Wrong role", ControllerRole.forValue(2), deserializedMessage.getRole()); byte[] generationId = new byte[] { (byte) 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }; Assert.assertEquals("Wrong generation Id", new BigInteger(1, generationId), deserializedMessage.getGenerationId()); }