PasswordSaltExtensionParser extends ExtensionParser<PasswordSaltExtensionMessage> { @Override public void parseExtensionMessageContent(PasswordSaltExtensionMessage msg) { LOGGER.debug("Parsing PasswordSaltExtensionMessage"); parseSaltLength(msg); parseSalt(msg); } PasswordSaltExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(PasswordSaltExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { PasswordSaltExtensionParser parser = new PasswordSaltExtensionParser(start, expectedBytes); PasswordSaltExtensionMessage msg = parser.parse(); assertArrayEquals(type.getValue(), msg.getExtensionType().getValue()); assertEquals(extensionLength, (long) msg.getExtensionLength().getValue()); assertEquals(saltLength, (long) msg.getSaltLength().getValue()); assertArrayEquals(salt, msg.getSalt().getValue()); }