@Test
    public void testUserSpecificListenerWrongUser() throws Exception
    {
        // Setup fixture.
        final JID entity = new JID( "john", "example.org", "mobile" );
        final JID otherEntity = new JID( "jane", "example.com", "desktop" );
        final EntityCapabilities caps = new EntityCapabilities();
        caps.setVerAttribute( "test-ver" );
        caps.setHashAttribute( "test-hash" );
        caps.addFeature( "test-feature" );
        caps.addIdentity( "test-identity" );
        manager.addListener( otherEntity, otherUserSpecific );

        // Execute system under test.
        manager.registerCapabilities( entity, caps );

        // Verify results.
        verify( otherUserSpecific, never() ).entityCapabilitiesChanged( entity, caps, caps.getFeatures(), Collections.emptySet(), caps.getIdentities(), Collections.emptySet() );
    }
Asserts that registering a user-specific listener causes that listener to <em>not</em> receive an event that is
not relevant (but relevant to another user).
xmppserver/src/test/java/org/jivesoftware/openfire/entitycaps/EntityCapabilitiesListenerTest.java