public void setUp() throws Exception
    {
        // Ensure that DB-Unit's setUp is called!
        super.setUp();

        // Initialize Openfire's cache framework.
        CacheFactory.initialize();

        // Mock the XMPPServer implementation that's used internally.
        Fixtures.clearExistingProperties();
        XMPPServer.setInstance(Fixtures.mockXMPPServer());

        // Ensure that Openfire caches are reset before each test to avoid tests to affect each-other.
        Arrays.stream(CacheFactory.getAllCaches()).forEach(Map::clear);

        // Wire the database connection provider used by the GroupProvider.
        final DefaultConnectionProvider conProvider = new DefaultConnectionProvider();
        conProvider.setDriver(DRIVER);
        conProvider.setServerURL(URL);
        conProvider.setUsername(USERNAME);
        conProvider.setPassword(PASSWORD);
        DbConnectionManager.setConnectionProvider(conProvider);
    }
Unit tests that verify the functionality of {@link GroupManager}.

Implementation-wise, this class extends for DBTestCase, which is as JUnit 3 derivative. Practically, this means that
Junit 4 annotations in this class will be ignored.

@author Guus der Kinderen, guus.der.kinderen@gmail.com
xmppserver/src/test/java/org/jivesoftware/openfire/group/GroupManagerNoMockTest.java