static JobManagerProcessSpec processSpecFromConfig(Configuration config) {
        return createMemoryProcessSpec(PROCESS_MEMORY_UTILS.memoryProcessSpecFromConfig(config));
    }
@Test
    void testDeriveFromRequiredFineGrainedOptions() {
        MemorySize jvmHeap = MemorySize.ofMebiBytes(150);
        MemorySize offHeap = MemorySize.ofMebiBytes(50);
        MemorySize totalFlinkMemory = MemorySize.ofMebiBytes(200);
        MemorySize expectedOffHeap = MemorySize.ofMebiBytes(50);

        Configuration conf = new Configuration();
        conf.set(JobManagerOptions.TOTAL_FLINK_MEMORY, totalFlinkMemory);
        conf.set(JobManagerOptions.OFF_HEAP_MEMORY, offHeap);
        conf.set(JobManagerOptions.JVM_HEAP_MEMORY, jvmHeap);

        JobManagerProcessSpec jobManagerProcessSpec =
                JobManagerProcessUtils.processSpecFromConfig(conf);
        assertThat(jobManagerProcessSpec.getJvmDirectMemorySize()).isEqualTo(expectedOffHeap);
    }