### Question:
XMLGroupDatabase implements GroupDatabase { @Override public void delete( final Group group ) throws WikiSecurityException { final String index = group.getName(); final boolean exists = m_groups.containsKey( index ); if ( !exists ) { throw new NoSuchPrincipalException( "Not in database: " + group.getName() ); } m_groups.remove( index ); saveDOM(); }  @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 testDelete() throws WikiException { int oldUserCount = m_db.groups().length; String name = "TestGroup" + String.valueOf( System.currentTimeMillis() ); Group group = new Group( name, m_wiki ); Principal al = new WikiPrincipal( "Al" ); Principal bob = new WikiPrincipal( "Bob" ); group.add( al ); group.add( bob ); m_db.save(group, new WikiPrincipal( "Tester") ); group = backendGroup( name ); Assertions.assertEquals( name, group.getName() ); Assertions.assertEquals( oldUserCount+1, m_db.groups().length ); m_db.delete( group ); Assertions.assertEquals( oldUserCount, m_db.groups().length ); }