I am updating a few tests. The Before gets the sftp session. For this, the username and password have been hardcoded in the properties file. Due to security reasons, the password cannot be checked in and has to be blanked out. However the unit test fails at
private DefaultSftpSessionFactory sftpClientFactory;
private SftpSession sftpSession;
@Before
public void setup() {
sftpSession = sftpClientFactory.getSession();
}
This step fails with "either a password or private key is required".I would like to get a mock session, so that I dont have to provide a password.