ExtendedRandomExtensionParser extends ExtensionParser<ExtendedRandomExtensionMessage> { @Override public void parseExtensionMessageContent(ExtendedRandomExtensionMessage msg) { parseExtendedRandomLength(msg); msg.setExtendedRandom(parseByteArrayField(msg.getExtendedRandomLength().getValue())); LOGGER.debug("The extended Random TLS parser parsed the value " + bytesToHexString(msg.getExtendedRandom())); } ExtendedRandomExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(ExtendedRandomExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { message = parser.parse(); assertArrayEquals(ExtensionType.EXTENDED_RANDOM.getValue(), message.getExtensionType().getValue()); assertEquals(extensionLength, (long) message.getExtensionLength().getValue()); assertArrayEquals(extendedRandom, message.getExtendedRandom().getValue()); }