### Question:
XMLGroupDatabase implements GroupDatabase { @Override public Group[] groups() throws WikiSecurityException { buildDOM(); final Collection<Group> groups = m_groups.values(); return groups.toArray( new Group[groups.size()] ); }  @Override void delete( final Group group ); @Override Group[] groups(); @Override void initialize( final Engine engine, final Properties props ); @Override void save( final Group group, final Principal modifier ); static final String PROP_DATABASE; }### Answer:
@Test public void testGroups() throws WikiSecurityException { Group[] groups = m_db.groups(); Assertions.assertEquals( 4, groups.length ); Group group; group = backendGroup( "TV" ); Assertions.assertEquals("TV", group.getName() ); Assertions.assertEquals( 3, group.members().length ); group = backendGroup( "Literature" ); Assertions.assertEquals("Literature", group.getName() ); Assertions.assertEquals( 2, group.members().length ); group = backendGroup( "Art" ); Assertions.assertEquals("Art", group.getName() ); Assertions.assertEquals( 0, group.members().length ); group = backendGroup( "Admin" ); Assertions.assertEquals("Admin", group.getName() ); Assertions.assertEquals( 1, group.members().length ); Assertions.assertEquals( "Administrator", group.members()[0].getName() ); try { group = backendGroup( "Archaeology" ); Assertions.assertTrue(false); } catch (NoSuchPrincipalException e) { Assertions.assertTrue(true); } }