MaxFragmentLengthExtensionParser extends ExtensionParser<MaxFragmentLengthExtensionMessage> { @Override public void parseExtensionMessageContent(MaxFragmentLengthExtensionMessage msg) { LOGGER.debug("Parsing MaxFragmentLengthExtensionMessage"); parseMaxFragmentLength(msg); } MaxFragmentLengthExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(MaxFragmentLengthExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { MaxFragmentLengthExtensionParser parser = new MaxFragmentLengthExtensionParser(start, extension); MaxFragmentLengthExtensionMessage msg = parser.parse(); assertArrayEquals(msg.getExtensionBytes().getValue(), completeExtension); assertArrayEquals(type.getValue(), msg.getExtensionType().getValue()); assertTrue(extensionLength == msg.getExtensionLength().getValue()); assertTrue(maxFragmentLength == msg.getMaxFragmentLength().getValue()); }