code: public void addVariantDatasetMetadata(VariantStudyMetadata variantStudyMetadata) {
          if (variantStudyMetadata != null) {
              VariantStudyMetadata found = getVariantStudyMetadata(variantStudyMetadata.getId());
              // if there is not any study with that ID then we add the new one
              // TODO we need to think what to do when it exists, should we throw an exception?
              if (found == null) {
                  if (variantMetadata.getStudies() == null) {
                      variantMetadata.setStudies(new ArrayList<>());
                  }
                  variantMetadata.getStudies().add(variantStudyMetadata);
              } else {
                  logger.error("Study ID already exists");
              }
          }
      }
docs: Add a variant study metadata. Study ID must not exist.
  
  @param variantStudyMetadata    Variant study metadata to add