### Question:
AuthResourceRdbmsDao implements AuthResourceDao { @Override public boolean delete(String resourceType, String resource) throws AuthServerException { return transaction((ThrowingFunction<Connection, Boolean, Exception>) connection -> authResourceCrudOperationsDao.deleteResource(connection, resourceType, resource)); } AuthResourceRdbmsDao(DataSource dataSource); @Override void persist(AuthResource authResource); @Override void update(AuthResource authResource); @Override boolean delete(String resourceType, String resource); @Override AuthResource read(String resourceType, String resourceName); @Override List<AuthResource> readAll(String resourceType, String ownerId); @Override List<AuthResource> readAll(String resourceType, String action, String ownerId,
                                      List<String> userGroups); @Override boolean isExists(String resourceType, String resource); @Override boolean updateOwner(String resourceType, String resourceName, String newOwner); @Override boolean addGroups(String resourceType, String resourceName, String action, List<String> groups); @Override boolean removeGroup(String resourceType, String resourceName, String action, String group);  }### Answer:
@Test(dependsOnMethods = "testUpdate") public void testDelete() throws AuthServerException { authResourceDao.delete(ResourceType.EXCHANGE.toString(), "exchange1"); authResourceDao.delete(ResourceType.EXCHANGE.toString(), "exchange1"); List<AuthResource> manager = authResourceDao.readAll(ResourceType.EXCHANGE.toString(), "manager"); List<AuthResource> developer = authResourceDao.readAll(ResourceType.EXCHANGE.toString(), "developer"); Assert.assertEquals(manager.size(), 1); Assert.assertEquals(developer.size(), 0); boolean exchange1 = authResourceDao.isExists(ResourceType.EXCHANGE.toString(), "exchange1"); boolean exchange2 = authResourceDao.isExists(ResourceType.EXCHANGE.toString(), "exchange2"); Assert.assertEquals(exchange1, false); Assert.assertEquals(exchange2, true); }