### Question:
RestartStrategyResolving { public static RestartStrategy resolve( RestartStrategies.RestartStrategyConfiguration clientConfiguration, RestartStrategyFactory serverStrategyFactory, boolean isCheckpointingEnabled) { final RestartStrategy clientSideRestartStrategy = RestartStrategyFactory.createRestartStrategy(clientConfiguration); if (clientSideRestartStrategy != null) { return clientSideRestartStrategy; } else { if (serverStrategyFactory instanceof NoOrFixedIfCheckpointingEnabledRestartStrategyFactory) { return ((NoOrFixedIfCheckpointingEnabledRestartStrategyFactory) serverStrategyFactory) .createRestartStrategy(isCheckpointingEnabled); } else { return serverStrategyFactory.createRestartStrategy(); } } } private  RestartStrategyResolving(); static RestartStrategy resolve(
			RestartStrategies.RestartStrategyConfiguration clientConfiguration,
			RestartStrategyFactory serverStrategyFactory,
			boolean isCheckpointingEnabled);  }### Answer:
@Test public void testClientSideHighestPriority() { RestartStrategy resolvedStrategy = RestartStrategyResolving.resolve(noRestart(), new FixedDelayRestartStrategy.FixedDelayRestartStrategyFactory(2, 1000L), true); assertThat(resolvedStrategy, instanceOf(NoRestartStrategy.class)); }
@Test public void testFixedStrategySetWhenCheckpointingEnabled() { RestartStrategy resolvedStrategy = RestartStrategyResolving.resolve(fallBackRestart(), new NoOrFixedIfCheckpointingEnabledRestartStrategyFactory(), true); assertThat(resolvedStrategy, instanceOf(FixedDelayRestartStrategy.class)); }
@Test public void testServerStrategyIsUsedSetWhenCheckpointingEnabled() { RestartStrategy resolvedStrategy = RestartStrategyResolving.resolve(fallBackRestart(), new FailureRateRestartStrategy.FailureRateRestartStrategyFactory(5, Time.seconds(5), Time.seconds(2)), true); assertThat(resolvedStrategy, instanceOf(FailureRateRestartStrategy.class)); }
@Test public void testServerStrategyIsUsedSetWhenCheckpointingDisabled() { RestartStrategy resolvedStrategy = RestartStrategyResolving.resolve(fallBackRestart(), new FailureRateRestartStrategy.FailureRateRestartStrategyFactory(5, Time.seconds(5), Time.seconds(2)), false); assertThat(resolvedStrategy, instanceOf(FailureRateRestartStrategy.class)); }