public static RestartBackoffTimeStrategy.Factory createRestartBackoffTimeStrategyFactory(
            final RestartStrategies.RestartStrategyConfiguration jobRestartStrategyConfiguration,
            final Configuration jobConfiguration,
            final Configuration clusterConfiguration,
            final boolean isCheckpointingEnabled) {

        checkNotNull(jobRestartStrategyConfiguration);
        checkNotNull(jobConfiguration);
        checkNotNull(clusterConfiguration);

        return getJobRestartStrategyFactory(jobRestartStrategyConfiguration)
                .orElse(
                        getRestartStrategyFactoryFromConfig(jobConfiguration)
                                .orElse(
                                        (getRestartStrategyFactoryFromConfig(clusterConfiguration)
                                                .orElse(
                                                        getDefaultRestartStrategyFactory(
                                                                isCheckpointingEnabled)))));
    }
@Test
    void testInvalidStrategySpecifiedInClusterConfig() {
        final Configuration conf = new Configuration();
        conf.set(RestartStrategyOptions.RESTART_STRATEGY, "invalid-strategy");

        assertThatThrownBy(
                        () ->
                                RestartBackoffTimeStrategyFactoryLoader
                                        .createRestartBackoffTimeStrategyFactory(
                                                DEFAULT_JOB_LEVEL_RESTART_CONFIGURATION,
                                                new Configuration(),
                                                conf,
                                                false))
                .isInstanceOf(IllegalArgumentException.class);
    }