@VisibleForTesting
  void setTimeout(FTPClient client, Configuration conf) {
    long timeout = conf.getLong(FS_FTP_TIMEOUT, DEFAULT_TIMEOUT);
    client.setControlKeepAliveTimeout(timeout);
  }
@Test
  public void testFTPSetTimeout() {
    Configuration conf = new Configuration();
    FTPClient client = new FTPClient();
    FTPFileSystem ftp = new FTPFileSystem();

    ftp.setTimeout(client, conf);
    assertEquals(client.getControlKeepAliveTimeout(),
        FTPFileSystem.DEFAULT_TIMEOUT);

    long timeout = 600;
    conf.setLong(FTPFileSystem.FS_FTP_TIMEOUT, timeout);
    ftp.setTimeout(client, conf);
    assertEquals(client.getControlKeepAliveTimeout(), timeout);
  }