@SuppressFBWarnings("NP_NULL_ON_SOME_PATH")
  public static RestartConfig.RestartNode getCurrentNode(RestartConfig config) {
    Checks.checkTrue(
        config != null && !ObjectHelper.isCollectionEmptyOrNull(config.getRestartPath()),
        "Cannot get restart info in empty restart configuration");
    return config.getRestartPath().get(config.getRestartPath().size() - 1);
  }
@Test
  public void testExtractCurrentNodeFromRestartConfig() {
    AssertHelper.assertThrows(
        "Invalid get",
        IllegalArgumentException.class,
        "Cannot get restart info in empty restart configuration",
        () -> RunRequest.getCurrentNode(RestartConfig.builder().build()));
    RestartConfig config = RestartConfig.builder().addRestartNode("foo", 1, "bar").build();
    Assert.assertEquals(
        new RestartConfig.RestartNode("foo", 1, "bar"), RunRequest.getCurrentNode(config));
  }