@Override
    protected Configuration getEffectiveConfigurationForResourceManager(
            Configuration configuration) {
        final Configuration copiedConfig = new Configuration(configuration);

        if (copiedConfig.removeConfig(TaskManagerOptions.TOTAL_PROCESS_MEMORY)) {
            logIgnoreTotalMemory(TaskManagerOptions.TOTAL_PROCESS_MEMORY);
        }

        if (copiedConfig.removeConfig(TaskManagerOptions.TOTAL_FLINK_MEMORY)) {
            logIgnoreTotalMemory(TaskManagerOptions.TOTAL_FLINK_MEMORY);
        }

        return copiedConfig;
    }
@Test
    void testGetEffectiveConfigurationForResourceManagerFineGrained() {
        final Configuration config = new Configuration();
        config.set(TaskManagerOptions.TOTAL_FLINK_MEMORY, TOTAL_FLINK_SIZE);
        config.set(TaskManagerOptions.TOTAL_PROCESS_MEMORY, TOTAL_PROCESS_SIZE);

        final Configuration effectiveConfig =
                getFactory().getEffectiveConfigurationForResourceManager(config);

        assertThat(effectiveConfig.contains(TaskManagerOptions.TOTAL_FLINK_MEMORY)).isFalse();
        assertThat(effectiveConfig.contains(TaskManagerOptions.TOTAL_PROCESS_MEMORY)).isFalse();
    }