### Question:
DownloadCall extends NamedRunnable implements Comparable<DownloadCall> { void start(final DownloadCache cache, BreakpointInfo info) throws InterruptedException { final int blockCount = info.getBlockCount(); final List<DownloadChain> blockChainList = new ArrayList<>(info.getBlockCount()); final List<Integer> blockIndexList = new ArrayList<>(); for (int i = 0; i < blockCount; i++) { final BlockInfo blockInfo = info.getBlock(i); if (Util.isCorrectFull(blockInfo.getCurrentOffset(), blockInfo.getContentLength())) { continue; } Util.resetBlockIfDirty(blockInfo); final DownloadChain chain = DownloadChain.createChain(i, task, info, cache, store); blockChainList.add(chain); blockIndexList.add(chain.getBlockIndex()); } if (canceled) { return; } cache.getOutputStream().setRequireStreamBlocks(blockIndexList); startBlocks(blockChainList); } private  DownloadCall(DownloadTask task, boolean asyncExecuted, @NonNull DownloadStore store);   DownloadCall(DownloadTask task, boolean asyncExecuted,
                 @NonNull ArrayList<DownloadChain> runningBlockList,
                 @NonNull DownloadStore store); static DownloadCall create(DownloadTask task, boolean asyncExecuted,
                                      @NonNull DownloadStore store); boolean cancel(); boolean isCanceled(); boolean isFinishing(); @Override void execute(); boolean equalsTask(@NonNull DownloadTask task); @Nullable File getFile(); @SuppressFBWarnings(value = "Eq", justification = "This special case is just for task priority") @Override int compareTo(@NonNull DownloadCall o); final DownloadTask task; final boolean asyncExecuted; }### Answer:
@Test public void start() throws InterruptedException { final DownloadCache cache = mock(DownloadCache.class); final MultiPointOutputStream outputStream = mock(MultiPointOutputStream.class); doNothing().when(call).startBlocks(ArgumentMatchers.<DownloadChain>anyList()); when(cache.getOutputStream()).thenReturn(outputStream); call.start(cache, info); ArgumentCaptor<List<DownloadChain>> captor = ArgumentCaptor.forClass(List.class); verify(call).startBlocks(captor.capture()); final List<DownloadChain> chainList = captor.getValue(); assertThat(chainList.size()).isEqualTo(3); assertThat(chainList.get(0).getBlockIndex()).isEqualTo(0); assertThat(chainList.get(1).getBlockIndex()).isEqualTo(1); assertThat(chainList.get(2).getBlockIndex()).isEqualTo(2); ArgumentCaptor<List<Integer>> setRequireStreamBlocksCaptor = ArgumentCaptor.forClass(List.class); verify(outputStream).setRequireStreamBlocks(setRequireStreamBlocksCaptor.capture()); final List<Integer> blockIndexList = setRequireStreamBlocksCaptor.getValue(); assertThat(blockIndexList.size()).isEqualTo(3); assertThat(blockIndexList.get(0)).isEqualTo(0); assertThat(blockIndexList.get(1)).isEqualTo(1); assertThat(blockIndexList.get(2)).isEqualTo(2); }