SRPExtensionSerializer extends ExtensionSerializer<SRPExtensionMessage> { @Override public byte[] serializeExtensionContent() { appendInt(message.getSrpIdentifierLength().getValue(), ExtensionByteLength.SRP_IDENTIFIER_LENGTH); appendBytes(message.getSrpIdentifier().getValue()); return getAlreadySerialized(); } SRPExtensionSerializer(SRPExtensionMessage message); @Override byte[] serializeExtensionContent();  }
@Test public void testSerializeExtensionContent() { message.setExtensionType(extensionType.getValue()); message.setExtensionLength(extensionLength); message.setSrpIdentifierLength(srpIdentifierLength); message.setSrpIdentifier(srpIdentifier); assertArrayEquals(extensionBytes, serializer.serialize()); }