SignedCertificateTimestampExtensionSerializer extends
        ExtensionSerializer<SignedCertificateTimestampExtensionMessage> { @Override public byte[] serializeExtensionContent() { appendBytes(message.getSignedTimestamp().getValue()); LOGGER.debug("Serialized SignedCertificateTimestampExtension with timestamp of length " + message.getSignedTimestamp().getValue().length); return getAlreadySerialized(); } SignedCertificateTimestampExtensionSerializer(SignedCertificateTimestampExtensionMessage message); @Override byte[] serializeExtensionContent();  }
@Test public void testSerializeExtensionContent() { message = new SignedCertificateTimestampExtensionMessage(); message.setExtensionType(extensionType.getValue()); message.setExtensionLength(extensionLength); message.setSignedTimestamp(timestamp); SignedCertificateTimestampExtensionSerializer serializer = new SignedCertificateTimestampExtensionSerializer( message); assertArrayEquals(expectedBytes, serializer.serialize()); }