@Override
  public <T> T loadObject(String accountName, ObjectType objectType, String objectKey)
      throws IllegalArgumentException, NotFoundException {
    if (objectType.equals(ObjectType.CANARY_RESULT_ARCHIVE)) {
      var record =
          sqlCanaryArchiveRepo
              .findById(objectKey)
              .orElseThrow(() -> new NotFoundException("Not found object for id: " + objectKey));

      return mapToObject(record.getContent(), objectType);
    }

    if (objectType.equals(ObjectType.CANARY_CONFIG)) {
      var record =
          sqlCanaryConfigRepo
              .findById(objectKey)
              .orElseThrow(() -> new NotFoundException("Not found object for id: " + objectKey));

      return mapToObject(record.getContent(), objectType);
    }

    if (objectType.equals(ObjectType.METRIC_SET_PAIR_LIST)) {
      var record =
          sqlMetricSetPairsRepo
              .findById(objectKey)
              .orElseThrow(() -> new NotFoundException("Not found object for id: " + objectKey));

      return mapToObject(record.getContent(), objectType);
    }

    if (objectType.equals(ObjectType.METRIC_SET_LIST)) {
      var record =
          sqlMetricSetsRepo
              .findById(objectKey)
              .orElseThrow(() -> new NotFoundException("Not found object for id: " + objectKey));

      return mapToObject(record.getContent(), objectType);
    }

    throw new IllegalArgumentException("Unsupported object type: " + objectType);
  }
@Test
  public void testLoadObjectWhenMetricSetsNotFound() {
    var testAccountName = UUID.randomUUID().toString();
    var testObjectType = ObjectType.METRIC_SET_LIST;
    var testObjectKey = UUID.randomUUID().toString();

    assertThrows(
        NotFoundException.class,
        () -> sqlStorageService.loadObject(testAccountName, testObjectType, testObjectKey));
  }