static JobManagerProcessSpec processSpecFromConfig(Configuration config) {
        return createMemoryProcessSpec(PROCESS_MEMORY_UTILS.memoryProcessSpecFromConfig(config));
    }
@Test
    void testOffHeapMemoryDerivedFromJvmHeapAndTotalFlinkMemory() {
        MemorySize jvmHeap = MemorySize.ofMebiBytes(150);
        MemorySize defaultOffHeap = JobManagerOptions.OFF_HEAP_MEMORY.defaultValue();
        MemorySize expectedOffHeap = MemorySize.ofMebiBytes(100).add(defaultOffHeap);
        MemorySize totalFlinkMemory = jvmHeap.add(expectedOffHeap);

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

        JobManagerProcessSpec jobManagerProcessSpec =
                JobManagerProcessUtils.processSpecFromConfig(conf);
        assertThat(jobManagerProcessSpec.getJvmDirectMemorySize()).isEqualTo(expectedOffHeap);
        assertThat(testLoggerResource.getMessages())
                .anyMatch(
                        str ->
                                str.contains(
                                        String.format(
                                                "The Off-Heap Memory size (%s) is derived the configured Total Flink Memory size (%s) minus "
                                                        + "the configured JVM Heap Memory size (%s). The default Off-Heap Memory size (%s) is ignored.",
                                                expectedOffHeap.toHumanReadableString(),
                                                totalFlinkMemory.toHumanReadableString(),
                                                jvmHeap.toHumanReadableString(),
                                                defaultOffHeap.toHumanReadableString())));
    }