### Question:
JschDownloader implements Downloader { @Override public void download(final Collection<? extends FileRequest> requests) { final EtmPoint point = MONITOR.createPoint(getClass().getName() + ": download(Collection)"); try { if (requests.isEmpty()) { return; } for (final FileRequest request : requests) { processor.queueDownload(request); } processor.download(); } finally { point.collect(); } } JschDownloader(final JschSftpProcessor processor); @Override void download(final Collection<? extends FileRequest> requests);  }### Answer:
@Test public void testDownload() { final JschSftpProcessor processor = mock(StubbedJschSftpProcessor.class); final FileRequest request = mock(FileRequest.class); new JschDownloader(processor).download(Arrays.asList(request)); verify(processor, times(1)).queueDownload(request); verify(processor, times(1)).download(); }
@Test public void testDownloadEmptyRequests() { final JschSftpProcessor processor = mock(StubbedJschSftpProcessor.class); final Collection<FileRequest> requests = Collections.<FileRequest> emptyList(); new JschDownloader(processor).download(requests); verify(processor, never()).download(); }