public static TaskExecutorProcessSpec processSpecFromConfig(final Configuration config) {
        try {
            return createMemoryProcessSpec(
                    config, PROCESS_MEMORY_UTILS.memoryProcessSpecFromConfig(config));
        } catch (IllegalConfigurationException e) {
            throw new IllegalConfigurationException(
                    "TaskManager memory configuration failed: " + e.getMessage(), e);
        }
    }
@Test
    public void testExceptionShouldContainRequiredConfigOptions() {
        assertThatThrownBy(
                        () -> TaskExecutorProcessUtils.processSpecFromConfig(new Configuration()))
                .isInstanceOf(IllegalConfigurationException.class)
                .hasMessageContaining(TaskManagerOptions.TASK_HEAP_MEMORY.key())
                .hasMessageContaining(TaskManagerOptions.MANAGED_MEMORY_SIZE.key())
                .hasMessageContaining(TaskManagerOptions.TOTAL_FLINK_MEMORY.key())
                .hasMessageContaining(TaskManagerOptions.TOTAL_PROCESS_MEMORY.key());
    }