@Deprecated
    public static EnvironmentSettings fromConfiguration(ReadableConfig configuration) {
        return new EnvironmentSettings(
                (Configuration) configuration, Thread.currentThread().getContextClassLoader());
    }
@Test
    void testFromConfiguration() {
        Configuration configuration = new Configuration();
        configuration.setString("execution.runtime-mode", "batch");
        EnvironmentSettings settings =
                EnvironmentSettings.newInstance().withConfiguration(configuration).build();

        assertThat(settings.isStreamingMode()).as("Expect batch mode.").isFalse();
    }