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 testMutableOnStartOutputParameter() {
    setupOutputDataDao();
    runtimeSummary =
        runtimeSummaryBuilder()
            .artifacts(artifacts)
            .params(
                Collections.singletonMap(
                    "str_param",
                    StringParameter.builder()
                        .name("p1")
                        .value("v1")
                        .evaluatedResult("v1")
                        .mode(ParamMode.MUTABLE_ON_START)
                        .evaluatedTime(System.currentTimeMillis())
                        .build()))
            .build();

    AssertHelper.assertThrows(
        "throws validation error if MUTABLE_ON_START mode",
        MaestroValidationException.class,
        "Cannot modify param with mode [MUTABLE_ON_START] for parameter [str_param]",
        () -> outputDataManager.validateAndMergeOutputParams(runtimeSummary));
  }