### Question:
SoapSecurityService extends AbstractService implements SecurityService { @Override public void deleteGroup(String sid, long groupId) throws Exception { checkAdministrator(sid); if (groupId == 1) throw new Exception("You cannot delete the admin group"); try { GroupDAO dao = (GroupDAO) Context.get().getBean(GroupDAO.class); Group grp = dao.findById(groupId); if (grp.getType() != Group.TYPE_DEFAULT) { throw new Exception("You cannot delete group with id " + grp.getId() + " because it is a system group"); } dao.delete(groupId); } catch (Throwable t) { log.error(t.getMessage(), t); throw new Exception("Unable to delete the group with id " + groupId); } }  @Override WSUser[] listUsers(String sid, String group); @Override WSGroup[] listGroups(String sid); @Override long storeUser(String sid, WSUser user); @Override long storeGroup(String sid, WSGroup group); @Override void deleteUser(String sid, long userId); @Override void deleteGroup(String sid, long groupId); @Override int changePassword(String sid, long userId, String oldPassword, String newPassword); @Override WSUser getUser(String sid, long userId); @Override WSUser getUserByUsername(String sid, String username); @Override WSGroup getGroup(String sid, long groupId);  }### Answer:
@Test public void testDeleteGroup() throws Exception { Group group = groupDao.findById(2); Assert.assertNotNull(group); securityServiceImpl.deleteGroup("", group.getId()); group = groupDao.findById(2); Assert.assertNull(group); }