Mocking Sftp class skip method call
问题 public class SFTP { public Map<Report, TransferStatus> transfer(List<Report> reports) { //testing logic here } private ChannelSftp channelSftp; private Session session; private TransferStatus send(File file) { connect(); send(stream, file.getName()); } private void send(FileInputStream stream, String name) throws SftpException, IOException { channelSftp.put(stream, fileNameWithId, new SftpLogMonitor(), ChannelSftp.OVERWRITE); stream.close(); } private void connect() throws JSchException { if