SRPExtensionParser extends ExtensionParser<SRPExtensionMessage> { @Override public void parseExtensionMessageContent(SRPExtensionMessage msg) { msg.setSrpIdentifierLength(parseIntField(ExtensionByteLength.SRP_IDENTIFIER_LENGTH)); if (msg.getSrpIdentifierLength().getValue() > 32) { LOGGER.warn("The SRP Identifier should not exceed 32 bytes."); } msg.setSrpIdentifier(parseByteArrayField(msg.getSrpIdentifierLength().getValue())); } SRPExtensionParser(int startposition, byte[] array); @Override void parseExtensionMessageContent(SRPExtensionMessage msg);  }
@Test public void testParseExtensionMessageContent() { message = parser.parse(); assertArrayEquals(extensionType.getValue(), message.getExtensionType().getValue()); assertEquals(extensionLength, (long) message.getExtensionLength().getValue()); assertEquals(srpIdentifierLength, (long) message.getSrpIdentifierLength().getValue()); assertArrayEquals(srpIdentifier, message.getSrpIdentifier().getValue()); }