@SuppressWarnings({"PMD.NullAssignment"})
  public void clearRestartFor(RunPolicy runPolicy) {
    this.currentPolicy = runPolicy;
    this.restartConfig = null;
  }
@Test
  public void testClearRestartFor() {
    RestartConfig config =
        RestartConfig.builder()
            .addRestartNode("foo", 1, "bar")
            .restartPolicy(RunPolicy.RESTART_FROM_BEGINNING)
            .downstreamPolicy(RunPolicy.RESTART_FROM_INCOMPLETE)
            .build();
    RunRequest runRequest =
        RunRequest.builder()
            .initiator(new ManualInitiator())
            .currentPolicy(RunPolicy.RESTART_FROM_INCOMPLETE)
            .restartConfig(config)
            .build();
    runRequest.clearRestartFor(RunPolicy.RESTART_FROM_SPECIFIC);
    Assert.assertNull(runRequest.getRestartConfig());
    Assert.assertEquals(RunPolicy.RESTART_FROM_SPECIFIC, runRequest.getCurrentPolicy());
  }