FlinkJobServerDriver extends JobServerDriver { public static FlinkJobServerDriver fromConfig(FlinkServerConfiguration configuration) { return create( configuration, createJobServerFactory(configuration), createArtifactServerFactory(configuration), () -> FlinkJobInvoker.create(configuration)); } private  FlinkJobServerDriver(
      FlinkServerConfiguration configuration,
      ServerFactory jobServerFactory,
      ServerFactory artifactServerFactory,
      JobInvokerFactory jobInvokerFactory); static void main(String[] args); static FlinkServerConfiguration parseArgs(String[] args); static FlinkJobServerDriver fromParams(String[] args); static FlinkJobServerDriver fromConfig(FlinkServerConfiguration configuration); static FlinkJobServerDriver fromConfig(
      FlinkServerConfiguration configuration, JobInvokerFactory jobInvokerFactory);  }
@Test public void testConfigurationDefaults() { FlinkJobServerDriver.FlinkServerConfiguration config = new FlinkJobServerDriver.FlinkServerConfiguration(); assertThat(config.getHost(), is("localhost")); assertThat(config.getPort(), is(8099)); assertThat(config.getArtifactPort(), is(8098)); assertThat(config.getExpansionPort(), is(8097)); assertThat(config.getFlinkMaster(), is("[auto]")); assertThat(config.isCleanArtifactsPerJob(), is(true)); FlinkJobServerDriver flinkJobServerDriver = FlinkJobServerDriver.fromConfig(config); assertThat(flinkJobServerDriver, is(not(nullValue()))); }
@Test public void testConfigurationFromConfig() { FlinkJobServerDriver.FlinkServerConfiguration config = new FlinkJobServerDriver.FlinkServerConfiguration(); FlinkJobServerDriver driver = FlinkJobServerDriver.fromConfig(config); assertThat(driver.configuration, is(config)); }