### Question:
BatchProcessingTraverserWorker extends AbstractTraverserWorker implements TraverserWorker { @Override public void poll() { logger.info("polling entries from queue " + pollRequest.getQueue()); try { timeLimiter.callWithTimeout(new ProcessingFunction(), timeout, timeunit); } catch (Exception e) { logger.log(Level.WARNING, "[" + name + "] Error executing poll request " + pollRequest, e); } } BatchProcessingTraverserWorker(
      TraverserConfiguration conf, IndexingService indexingService); @Override void poll();  }### Answer:
@Test public void testPool() throws IOException, InterruptedException{ BatchProcessingTraverserWorker worker = new BatchProcessingTraverserWorker( conf, indexingService); List<Item> entries = Arrays.asList( (new Item()).setName("id-1").setQueue("custom"), (new Item()).setName("id-2").setQueue("custom"), (new Item()).setName("id-3").setQueue("custom")); when(indexingService.poll(any(PollItemsRequest.class))).thenReturn(entries); worker.poll(); verify(batchItemRetriever).processBatch(entries); }