public void validateAndMergeOutputParams(StepRuntimeSummary runtimeSummary) {
    Optional<String> externalJobId = extractExternalJobId(runtimeSummary);
    if (externalJobId.isPresent()) {
      Optional<OutputData> outputDataOpt =
          outputDataDao.getOutputDataForExternalJob(externalJobId.get(), ExternalJobType.TITUS);
      outputDataOpt.ifPresent(
          outputData -> {
            ParamsMergeHelper.mergeOutputDataParams(
                runtimeSummary.getParams(), outputData.getParams());
          });
    }
  }
@Test
  public void testUndefinedOutputParameter() {
    setupOutputDataDao();
    runtimeSummary = runtimeSummaryBuilder().artifacts(artifacts).build();
    AssertHelper.assertThrows(
        "throws validation error if output param not defined",
        MaestroValidationException.class,
        "Invalid output parameter [str_param], not defined in params",
        () -> outputDataManager.validateAndMergeOutputParams(runtimeSummary));
  }