UserMappingExtensionSerializer extends ExtensionSerializer<UserMappingExtensionMessage> { @Override public byte[] serializeExtensionContent() { appendByte(msg.getUserMappingType().getValue()); return getAlreadySerialized(); } UserMappingExtensionSerializer(UserMappingExtensionMessage message); @Override byte[] serializeExtensionContent();  }
@Test public void testSerializeExtensionContent() { msg.setExtensionType(extensionType.getValue()); msg.setExtensionLength(extensionLength); msg.setUserMappingType(hintType.getValue()); assertArrayEquals(extensionBytes, serializer.serialize()); }