@VisibleForTesting
    static void setupAndModifyConfiguration(
            Configuration configuration, String currDir, Map<String, String> variables)
            throws Exception {
        final String localDirs = variables.get(Environment.LOCAL_DIRS.key());
        LOG.info("Current working/local Directory: {}", localDirs);

        BootstrapTools.updateTmpDirectoriesInConfiguration(configuration, localDirs);

        setupConfigurationFromVariables(configuration, currDir, variables);
    }
@Test
    void testTaskManagerNodeIdConfiguration() throws Exception {
        final String resourceDirPath =
                Paths.get("src", "test", "resources").toAbsolutePath().toString();
        Configuration configuration = new Configuration();
        YarnTaskExecutorRunner.setupAndModifyConfiguration(
                configuration,
                resourceDirPath,
                Collections.singletonMap(YarnResourceManagerDriver.ENV_FLINK_NODE_ID, "test"));
        assertThat(configuration.get(TaskManagerOptionsInternal.TASK_MANAGER_NODE_ID))
                .isEqualTo("test");
    }