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 testMismatchedOutputParameterType() {
    setupOutputDataDao();
    runtimeSummary =
        runtimeSummaryBuilder()
            .artifacts(artifacts)
            .params(
                Collections.singletonMap(
                    "str_param",
                    LongParameter.builder()
                        .name("str_param")
                        .value(1L)
                        .evaluatedResult(1L)
                        .evaluatedTime(System.currentTimeMillis())
                        .build()))
            .build();
    AssertHelper.assertThrows(
        "throws validation error if mismatched types",
        MaestroValidationException.class,
        "ParameterDefinition type mismatch name [str_param] from [STRING] != to [LONG]",
        () -> outputDataManager.validateAndMergeOutputParams(runtimeSummary));
  }