SignedCertificateTimestampExtensionParser extends
        ExtensionParser<SignedCertificateTimestampExtensionMessage> { @Override public void parseExtensionMessageContent(SignedCertificateTimestampExtensionMessage msg) { if (msg.getExtensionLength().getValue() > 65535) { LOGGER.warn("The SingedCertificateTimestamp ticket length shouldn't exceed 2 bytes as defined in RFC 6962. " + "Length was " + msg.getExtensionLength().getValue()); } msg.setSignedTimestamp(parseByteArrayField(msg.getExtensionLength().getValue())); LOGGER.debug("The signed certificate timestamp extension parser parsed the value " + bytesToHexString(msg.getSignedTimestamp())); } SignedCertificateTimestampExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(SignedCertificateTimestampExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { parser = new SignedCertificateTimestampExtensionParser(startPosition, expectedBytes); message = parser.parse(); assertArrayEquals(ExtensionType.SIGNED_CERTIFICATE_TIMESTAMP.getValue(), message.getExtensionType().getValue()); assertEquals(extensionLength, (long) message.getExtensionLength().getValue()); assertArrayEquals(timestamp, message.getSignedTimestamp().getValue()); }