public void insertOrUpdateOutputData(OutputData outputData) {
    final String outputDataStr = validateAndToJson(outputData);
    withMetricLogError(
        () ->
            withRetryableUpdate(UPSERT_OUTPUT_DATA_QUERY, stmt -> stmt.setString(1, outputDataStr)),
        "insertOrUpdateOutputData",
        "Failed updating output data: [{}]",
        outputDataStr);
  }
@Test
  public void testParamsSizeOverLimit() throws Exception {
    ObjectMapper mockMapper = mock(ObjectMapper.class);
    OutputDataDao testDao = new OutputDataDao(dataSource, mockMapper, config);
    when(mockMapper.writeValueAsString(any()))
        .thenReturn(new String(new char[Constants.JSONIFIED_PARAMS_STRING_SIZE_LIMIT + 1]));
    AssertHelper.assertThrows(
        "Output data size is over limit",
        IllegalArgumentException.class,
        "Output data's total size [750001] is larger than system param size limit [750000]",
        () ->
            testDao.insertOrUpdateOutputData(
                new OutputData(
                    JOB_TYPE,
                    EXT_JOB_ID,
                    WORKFLOW_ID,
                    System.currentTimeMillis(),
                    System.currentTimeMillis(),
                    params,
                    new HashMap<>())));
  }