public static Configuration loadConfiguration() {
        return loadConfiguration(new Configuration());
    }
@Test
    // We do not allow malformed YAML files if loaded standard yaml
    void testInvalidStandardYamlFile() throws IOException {
        final File confFile = new File(tmpDir.getPath(), GlobalConfiguration.FLINK_CONF_FILENAME);

        try (PrintWriter pw = new PrintWriter(confFile)) {
            pw.append("invalid");
        }

        // We do not allow malformed YAML files if loaded standard yaml
        assertThatThrownBy(() -> GlobalConfiguration.loadConfiguration(tmpDir.getAbsolutePath()))
                .isInstanceOf(RuntimeException.class)
                .hasCauseInstanceOf(ClassCastException.class)
                .satisfies(
                        e -> {
                            Throwable cause = e.getCause();
                            assertThat(cause).isNotNull();
                            assertThat(cause).hasMessageContaining("java.lang.String");
                            assertThat(cause).hasMessageContaining("java.util.Map");
                        });
    }