@Test
    public void testEventListenerInvokedGroupDeleted() throws Exception
    {
        // Setup test fixture.
        final String groupName = "unit-test-group-q";
        final Group group = groupManager.createGroup(groupName);
        final RecordingGroupEventListener listener = new RecordingGroupEventListener();
        GroupEventDispatcher.addListener(listener);

        // Execute system under test.
        groupManager.deleteGroup(group);

        // Verify results.
        assertEquals(groupName, listener.lastGroupDeleted);
    }
Verifies that the corresponding event listener has been invoked after a group has been deleted.
xmppserver/src/test/java/org/jivesoftware/openfire/group/GroupTest.java