SessionTicketTLSExtensionParser extends ExtensionParser<SessionTicketTLSExtensionMessage> { @Override public void parseExtensionMessageContent(SessionTicketTLSExtensionMessage msg) { if (msg.getExtensionLength().getValue() > 65535) { LOGGER.warn("The SessionTLS ticket length shouldn't exceed 2 bytes as defined in RFC 4507. " + "Length was " + msg.getExtensionLength().getValue()); } msg.setTicket(parseByteArrayField(msg.getExtensionLength().getValue())); LOGGER.debug("The session ticket TLS parser parsed the value " + bytesToHexString(msg.getTicket())); } SessionTicketTLSExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(SessionTicketTLSExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { message = parser.parse(); assertArrayEquals(ExtensionType.SESSION_TICKET.getValue(), message.getExtensionType().getValue()); assertEquals(extensionLength, (long) message.getExtensionLength().getValue()); assertArrayEquals(sessionTicket, message.getTicket().getValue()); }