@JsonIgnore
  public RunPolicy getRestartRunPolicyWithUpstreamRestartMode() {
    if (upstreamRestartMode == UpstreamRestartMode.RESTART_FROM_INLINE_ROOT) {
      return RunPolicy.valueOf(restartPolicy.name());
    } else {
      return RunPolicy.RESTART_FROM_SPECIFIC;
    }
  }
@Test
  public void testGetRestartRunPolicyWithUpstreamRestartMode() {
    StepInstanceRestartRequest request = new StepInstanceRestartRequest();
    request.setRestartPolicy(RestartPolicy.RESTART_FROM_BEGINNING);
    assertEquals(
        RunPolicy.RESTART_FROM_SPECIFIC, request.getRestartRunPolicyWithUpstreamRestartMode());
    request.setUpstreamRestartMode(UpstreamRestartMode.RESTART_FROM_STEP);
    assertEquals(
        RunPolicy.RESTART_FROM_SPECIFIC, request.getRestartRunPolicyWithUpstreamRestartMode());
    request.setUpstreamRestartMode(UpstreamRestartMode.RESTART_FROM_INLINE_ROOT);
    assertEquals(
        RunPolicy.RESTART_FROM_BEGINNING, request.getRestartRunPolicyWithUpstreamRestartMode());
  }