### Question:
JschSftpProcessor { public void upload() { process(uploadQueue); }  static JschSftpProcessor getProcessor(final FtpProduct product); void download(); void queueDownload(final FileRequest request); void queueUpload(final FileRequest request, final boolean ignoreChmodErrors, final int permissions); abstract Connection getConnection(); void upload();  }### Answer:
@Test public void testUpload() throws Exception { final File unitDirectory = new File("target/unit"); FileUtils.forceMkdir(unitDirectory); final File sourceFile = new File(unitDirectory, "not.exists"); final File targetFile = new File(unitDirectory, "does.exist"); final FileRequest request = createMockFileRequest(sourceFile.toURI(), targetFile.toURI()); final StubbedJschSftpProcessor processor = new StubbedJschSftpProcessor(); processor.setConnection(conn); processor.queueUpload(request, false, Uploader.GOD_PERMISSIONS); processor.upload(); verify(channel, times(1)).put(sourceFile.getAbsolutePath(), targetFile.toURI().getPath()); }