### Question:
RunnerDao extends Dao { public boolean delete( String runnerUrl ) { DeleteResponse response = elasticSearchClient.getClient() .prepareDelete( DAO_INDEX_KEY, DAO_TYPE_KEY, runnerUrl ) .setRefresh( true ) .execute() .actionGet(); return response.isFound(); } @Inject  RunnerDao( IElasticSearchClient elasticSearchClient ); boolean save( Runner runner, String user, String commitId, String moduleId ); List<Runner> getRunners( String user, String commitId, String moduleId ); Map<RunnerGroup, List<Runner>> getRunnersGrouped(); boolean delete( String runnerUrl ); static final String DAO_INDEX_KEY; static final String DAO_TYPE_KEY; }### Answer:
@Test public void delete() throws Exception { LOG.info( "\n===RunnerDaoTest.delete===\n" ); LOG.info( "Runners before delete: " ); List<Runner> runners = ESSuiteTest.runnerDao.getRunners( ESSuiteTest.USER_2, ESSuiteTest.COMMIT_ID_2, ESSuiteTest.MODULE_ID_2 ); for( Runner runner : runners ) { LOG.info( runner.toString() ); ESSuiteTest.runnerDao.delete( runner.getUrl() ); } List<Runner> runnersAfter = ESSuiteTest.runnerDao.getRunners( ESSuiteTest.USER_2, ESSuiteTest.COMMIT_ID_2, ESSuiteTest.MODULE_ID_2 ); assertEquals( 0, runnersAfter.size() ); for ( Runner runner: runners ) { ESSuiteTest.runnerDao.save( runner, ESSuiteTest.USER_2, ESSuiteTest.COMMIT_ID_2, ESSuiteTest.MODULE_ID_2 ); } }