public void testAddMemberDuplicate() throws Exception {
        final JID needle = new JID("jane@" + Fixtures.XMPP_DOMAIN);
        final DefaultGroupProvider provider = new DefaultGroupProvider();
        provider.createGroup("Test Group A");
        provider.addMember("Test Group A", needle, false);

        try {
            provider.addMember("Test Group A", needle, false);
        } catch (Throwable t) {
            fail("Failed to add a member for a second time. This should succeed as a no-op");
        }
        final Group result = provider.getGroup("Test Group A");

        assertEquals(1, result.getMembers().size());
        assertTrue(result.getMembers().contains(needle));
    }
Verifies that {@link DefaultGroupProvider#addMember(String, JID, boolean)} silently completes when attempting
to add a duplicate user to a group, but does not throw
xmppserver/src/test/java/org/jivesoftware/openfire/group/DefaultGroupProviderTest.java