PasswordSaltExtensionSerializer extends ExtensionSerializer<PasswordSaltExtensionMessage> { @Override public byte[] serializeExtensionContent() { LOGGER.debug("Serializing PasswordSaltExtensionMessage"); writeSaltLength(msg); writeSalt(msg); return getAlreadySerialized(); } PasswordSaltExtensionSerializer(PasswordSaltExtensionMessage message); @Override byte[] serializeExtensionContent();  }
@Test public void testSerializeExtensionContent() { msg.setExtensionType(type.getValue()); msg.setExtensionLength(extensionLength); msg.setSalt(salt); msg.setSaltLength(saltLength); assertArrayEquals(expectedBytes, serializer.serialize()); }