@Test
    public void testEncodingOfResult() throws Exception
    {
        // Setup test fixture.
        final String input = "pubsub/pep//<server/im//Openfire Server<http://jabber.org/protocol/address<http://jabber.org/protocol/caps<http://jabber.org/protocol/commands<http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/offline<http://jabber.org/protocol/pubsub<http://jabber.org/protocol/pubsub#access-open<http://jabber.org/protocol/pubsub#auto-create<http://jabber.org/protocol/pubsub#auto-subscribe<http://jabber.org/protocol/pubsub#collections<http://jabber.org/protocol/pubsub#config-node<http://jabber.org/protocol/pubsub#create-and-configure<http://jabber.org/protocol/pubsub#create-nodes<http://jabber.org/protocol/pubsub#delete-items<http://jabber.org/protocol/pubsub#delete-nodes<http://jabber.org/protocol/pubsub#filtered-notifications<http://jabber.org/protocol/pubsub#get-pending<http://jabber.org/protocol/pubsub#instant-nodes<http://jabber.org/protocol/pubsub#item-ids<http://jabber.org/protocol/pubsub#manage-subscriptions<http://jabber.org/protocol/pubsub#meta-data<http://jabber.org/protocol/pubsub#modify-affiliations<http://jabber.org/protocol/pubsub#multi-items<http://jabber.org/protocol/pubsub#multi-subscribe<http://jabber.org/protocol/pubsub#outcast-affiliation<http://jabber.org/protocol/pubsub#persistent-items<http://jabber.org/protocol/pubsub#presence-notifications<http://jabber.org/protocol/pubsub#publish<http://jabber.org/protocol/pubsub#publish-options<http://jabber.org/protocol/pubsub#publisher-affiliation<http://jabber.org/protocol/pubsub#purge-nodes<http://jabber.org/protocol/pubsub#retract-items<http://jabber.org/protocol/pubsub#retrieve-affiliations<http://jabber.org/protocol/pubsub#retrieve-default<http://jabber.org/protocol/pubsub#retrieve-items<http://jabber.org/protocol/pubsub#retrieve-subscriptions<http://jabber.org/protocol/pubsub#subscribe<http://jabber.org/protocol/pubsub#subscription-options<http://jabber.org/protocol/rsm<jabber:iq:last<jabber:iq:privacy<jabber:iq:private<jabber:iq:register<jabber:iq:roster<jabber:iq:version<msgoffline<urn:xmpp:archive:auto<urn:xmpp:archive:manage<urn:xmpp:blocking<urn:xmpp:bookmarks-conversion:0<urn:xmpp:carbons:2<urn:xmpp:extdisco:1<urn:xmpp:extdisco:2<urn:xmpp:fulltext:0<urn:xmpp:mam:0<urn:xmpp:mam:1<urn:xmpp:mam:2<urn:xmpp:ping<urn:xmpp:push:0<urn:xmpp:raa:0<urn:xmpp:raa:0#embed-message <urn:xmpp:raa:0#embed-presence-directed<urn:xmpp:raa:0#embed-presence-sub<urn:xmpp:serverinfo:0<urn:xmpp:time<vcard-temp<http://jabber.org/network/serverinfo<admin-addresses<mailto:benjamin@holyarmy.org<mailto:dan.caseley@surevine.com<mailto:greg.d.thomas@gmail.com<mailto:guus.der.kinderen@gmail.com<mailto:robincollier@hotmail.com<xmpp:akrherz@igniterealtime.org<xmpp:benjamin@igniterealtime.org<xmpp:csh@igniterealtime.org<xmpp:dan.caseley@igniterealtime.org<xmpp:dwd@dave.cridland.net<xmpp:flow@igniterealtime.org<xmpp:gdt@igniterealtime.org<xmpp:guus.der.kinderen@igniterealtime.org<xmpp:lg@igniterealtime.org<xmpp:rcollier@igniterealtime.org<urn:xmpp:dataforms:softwareinfo<os<Linux<os_version<4.14.355-276.618.amzn2.x86_64 amd64 - Java 17.0.14<software<Openfire<software_version<5.0.0 Alpha<";

        // Execute system under test.
        final String hash = EntityCapabilitiesManager.generateHash(input, "SHA-1");
        final String result = EntityCapabilitiesManager.encodeHash(hash);

        // Verify results.
        assertEquals("89D/mEGBT1K0RtY28gEkGRbV2rc=", result);
    }
Tests the CAPS verification string generation based on the
"Complex Generation Example" provided in section 5.3 of XEP-0115 (version
1.4 and later).
xmppserver/src/test/java/org/jivesoftware/util/EntityCapabilitiesManagerTest.java