PaddingExtensionParser extends ExtensionParser<PaddingExtensionMessage> { @Override public void parseExtensionMessageContent(PaddingExtensionMessage msg) { msg.setPaddingBytes(parseByteArrayField(msg.getExtensionLength().getValue())); LOGGER.debug("The padding extension parser parsed the padding bytes " + bytesToHexString(msg.getPaddingBytes())); } PaddingExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(PaddingExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { message = parser.parse(); assertArrayEquals(ExtensionType.PADDING.getValue(), message.getExtensionType().getValue()); assertEquals(extensionLength, (long) message.getExtensionLength().getValue()); assertArrayEquals(extensionPayload, message.getPaddingBytes().getValue()); }