public static ExecutionEnvironment createBatchExecutionEnvironment(FlinkPipelineOptions options) {
    return createBatchExecutionEnvironment(
        options,
        MoreObjects.firstNonNull(options.getFilesToStage(), Collections.emptyList()),
        options.getFlinkConfDir());
  }
@Test
  public void shouldParsePortForRemoteEnvironmentBatch() {
    FlinkPipelineOptions options = getDefaultPipelineOptions();
    options.setRunner(FlinkRunner.class);
    options.setFlinkMaster("host:1234");

    ExecutionEnvironment bev = FlinkExecutionEnvironments.createBatchExecutionEnvironment(options);

    assertThat(bev, instanceOf(RemoteEnvironment.class));
    checkHostAndPort(bev, "host", 1234);
  }