ClientConfiguration createClientConfiguration() throws StageException {
    ClientConfiguration clientConfig = new ClientConfiguration();

    clientConfig.setConnectionTimeout(connectionConfigs.getConnectionTimeoutMillis());
    clientConfig.setSocketTimeout(connectionConfigs.getSocketTimeoutMillis());
    clientConfig.withMaxErrorRetry(connectionConfigs.getMaxErrorRetry());

    if (connectionConfigs.isProxyEnabled()) {
      clientConfig.setProxyHost(connectionConfigs.getProxyHost());
      clientConfig.setProxyPort(connectionConfigs.getProxyPort());
      if (connectionConfigs.isProxyAuthenticationEnabled()) {
        clientConfig.setProxyUsername(connectionConfigs.getProxyUser().get());
        clientConfig.setProxyPassword(connectionConfigs.getProxyPassword().get());
      }
    }
    return clientConfig;
  }
ClientConfiguration createClientConfiguration() throws StageException {
    ClientConfiguration clientConfig = new ClientConfiguration();

    clientConfig.setConnectionTimeout(connectionConfigs.getConnectionTimeoutMillis());
    clientConfig.setSocketTimeout(connectionConfigs.getSocketTimeoutMillis());
    clientConfig.withMaxErrorRetry(connectionConfigs.getMaxErrorRetry());

    if (connectionConfigs.isProxyEnabled()) {
      clientConfig.setProxyHost(connectionConfigs.getProxyHost());
      clientConfig.setProxyPort(connectionConfigs.getProxyPort());
      if (connectionConfigs.isProxyAuthenticationEnabled()) {
        clientConfig.setProxyUsername(connectionConfigs.getProxyUser().get());
        clientConfig.setProxyPassword(connectionConfigs.getProxyPassword().get());
      }
    }
    return clientConfig;
  }
ClientConfiguration createClientConfiguration ( ) throws StageException { ClientConfiguration clientConfig = new ClientConfiguration ( ) ; clientConfig . setConnectionTimeout ( connectionConfigs . getConnectionTimeoutMillis ( ) ) ; clientConfig . setSocketTimeout ( connectionConfigs . getSocketTimeoutMillis ( ) ) ; clientConfig . withMaxErrorRetry ( connectionConfigs . getMaxErrorRetry ( ) ) ; if ( connectionConfigs . isProxyEnabled ( ) ) { clientConfig . setProxyHost ( connectionConfigs . getProxyHost ( ) ) ; clientConfig . setProxyPort ( connectionConfigs . getProxyPort ( ) ) ; if ( connectionConfigs . isProxyAuthenticationEnabled ( ) ) { clientConfig . setProxyUsername ( connectionConfigs . getProxyUser ( ) . get ( ) ) ; clientConfig . setProxyPassword ( connectionConfigs . getProxyPassword ( ) . get ( ) ) ; } } return clientConfig ; }
visible for testing
visible for testing