### Question:
BatchDataRequester { private void requestMoreBlocks(final Batch batch, final Consumer<Batch> requestCompleteCallback) { batch.requestMoreBlocks(() -> eventThread.execute(() -> requestCompleteCallback.accept(batch))); } BatchDataRequester(
      final EventThread eventThread,
      final BatchChain activeBatches,
      final BatchFactory batchFactory,
      final UInt64 batchSize,
      final int maxPendingBatches); void fillRetrievingQueue(
      final TargetChain targetChain,
      final UInt64 commonAncestorSlot,
      final Consumer<Batch> requestCompleteCallback);  }### Answer:
@Test void shouldRequestAdditionalDataFromBatchesThatAreNotYetComplete() { final Batch batch = batchFactory.createBatch(targetChain, UInt64.valueOf(6), UInt64.valueOf(10)); batch.requestMoreBlocks(() -> {}); batchFactory.receiveBlocks(batch, dataStructureUtil.randomSignedBeaconBlock(8)); batchChain.add(batch); fillQueue(ZERO); assertThatBatch(batch).isAwaitingBlocks(); assertThat(batchChain.stream()).hasSize(MAX_PENDING_BATCHES); }
@Test void shouldIncludeNonEmptyIncompleteBatchesInThePendingBatchCount() { final Batch batch = batchFactory.createBatch(targetChain, UInt64.valueOf(6), UInt64.valueOf(10)); batch.requestMoreBlocks(() -> {}); batchFactory.receiveBlocks( batch, dataStructureUtil.randomSignedBeaconBlock(batch.getLastSlot())); batchChain.add(batch); fillQueue(ZERO); assertThatBatch(batch).isNotAwaitingBlocks(); assertThat(batchChain.stream()).hasSize(MAX_PENDING_BATCHES); }