How to test FTP login with Java..

Not much to say..
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPSClient;
 
public class TestClass {
    public static void main(String[] args) throws Exception {
        FTPClient ftp = new FTPSClient();
        ftp.connect("ftp.somedomain.net", 7021);
        final boolean loginSuccess;
        loginSuccess = ftp.login("koray", "pass");
        System.out.println(loginSuccess);
    }
}