### Question:
RoleReplyMessageFactory implements OFDeserializer<RoleRequestOutput> { @Override public RoleRequestOutput deserialize(ByteBuf rawMessage) { RoleRequestOutputBuilder builder = new RoleRequestOutputBuilder(); builder.setVersion((short) EncodeConstants.OF13_VERSION_ID); builder.setXid(rawMessage.readUnsignedInt()); builder.setRole(ControllerRole.forValue((int) rawMessage.readUnsignedInt())); rawMessage.skipBytes(PADDING_IN_ROLE_REPLY_HEADER); byte[] generationID = new byte[8]; rawMessage.readBytes(generationID); builder.setGenerationId(new BigInteger(1, generationID)); return builder.build(); }  @Override RoleRequestOutput deserialize(ByteBuf rawMessage);  }### Answer:
@Test public void test(){ ByteBuf bb = BufferHelper.buildBuffer("00 00 00 02 00 00 00 00 00 01 02 03 04 05 06 07"); RoleRequestOutput builtByFactory = BufferHelper.deserialize(roleFactory, bb); BufferHelper.checkHeaderV13(builtByFactory); Assert.assertEquals("Wrong role", 0x02, builtByFactory.getRole().getIntValue()); Assert.assertEquals("Wrong generationId", 0x01020304050607L, builtByFactory.getGenerationId().longValue()); }