@Test
    public void testEventListenerInvokedAdminRemoved() throws Exception
    {
        // Setup test fixture.
        final String groupName = "unit-test-group-e";
        final Group group = groupManager.createGroup(groupName);
        final JID testUser = new JID("unit-test-user-e", "example.org", null);
        group.getAdmins().add(testUser);
        final RecordingGroupEventListener listener = new RecordingGroupEventListener();
        GroupEventDispatcher.addListener(listener);

        // Execute system under test.
        group.getAdmins().remove(testUser);

        // Verify results.
        assertEquals(groupName, listener.lastGroupAdminRemoved);
        assertEquals(testUser.toString(), listener.lastParams.get("admin"));
    }
Verifies that the corresponding event listener has been invoked after a user that was an admin has been removed from a group.
xmppserver/src/test/java/org/jivesoftware/openfire/group/GroupTest.java