@VisibleForTesting
    static List<String> getJmResourceParams(Configuration configuration) {
        JobManagerProcessSpec jobManagerProcessSpec =
                JobManagerProcessUtils.processSpecFromConfigWithNewOptionToInterpretLegacyHeap(
                        configuration, JobManagerOptions.JVM_HEAP_MEMORY);

        logMasterConfiguration(jobManagerProcessSpec);

        return Arrays.asList(
                JobManagerProcessUtils.generateJvmParametersStr(
                        jobManagerProcessSpec, configuration),
                JobManagerProcessUtils.generateDynamicConfigsStr(jobManagerProcessSpec));
    }
@Test
    void testJmLegacyHeapOptionSetsNewJvmHeap() {
        Configuration configuration = new Configuration();
        MemorySize heapSize = MemorySize.ofMebiBytes(10);
        configuration.set(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY, heapSize);
        String jvmArgsLine = BashJavaUtils.getJmResourceParams(configuration).get(0);
        Map<String, String> jvmArgs = ConfigurationUtils.parseJvmArgString(jvmArgsLine);
        String heapSizeStr = Long.toString(heapSize.getBytes());
        assertThat(jvmArgs.get("-Xmx")).isEqualTo(heapSizeStr);
        assertThat(jvmArgs.get("-Xms")).isEqualTo(heapSizeStr);
    }