public void testPaginatedSearchWithNumResultsAcrossBoundary() throws Exception {
        final DefaultGroupProvider provider = new DefaultGroupProvider();
        for(int i=1; i<=9; i++){ //Create 9 groups
            provider.createGroup("Test Group " + i);
        }

        final Collection<String> result = provider.search("Group", 7, 5); //Index 7 is 8th item

        assertEquals(2, result.size());
        assertTrue(result.contains("Test Group 8"));
        assertTrue(result.contains("Test Group 9"));
    }
Verifies that {@link DefaultGroupProvider#search(String, int, int)} returns sensible results when given a start
index and given a number of results higher than the number of possible results
xmppserver/src/test/java/org/jivesoftware/openfire/group/DefaultGroupProviderTest.java