Object getFromStep(String stepId, String paramName) {
    try {
      return executor
          .submit(() -> fromStep(stepId, paramName))
          .get(TIMEOUT_IN_MILLIS, TimeUnit.MILLISECONDS);
    } catch (Exception e) {
      throw new MaestroInternalError(
          e, "getFromStep throws an exception for stepId=[%s], paramName=[%s]", stepId, paramName);
    }
  }
@Test
  public void testInvalidGetFromStep() throws Exception {
    StepRuntimeSummary summary = loadObject(TEST_STEP_RUNTIME_SUMMARY, StepRuntimeSummary.class);
    when(allStepOutputData.get("step1"))
        .thenReturn(Collections.singletonMap("maestro_step_runtime_summary", summary));

    AssertHelper.assertThrows(
        "Cannot find the referenced step id",
        MaestroInternalError.class,
        "getFromStep throws an exception",
        () -> paramExtension.getFromStep("step2", "param1"));

    AssertHelper.assertThrows(
        "Cannot find the referenced param name",
        MaestroInternalError.class,
        "getFromStep throws an exception",
        () -> paramExtension.getFromStep("step1", "param2"));

    summary.getParams().get("param1").setEvaluatedTime(null);

    AssertHelper.assertThrows(
        "Referenced param is not evaluated yet.",
        MaestroInternalError.class,
        "getFromStep throws an exception",
        () -> paramExtension.getFromStep("step1", "param1"));
  }