@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(); }
@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 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 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); }
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); }
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);  }