code: private boolean matchMetadata(MetaData metadata)
      {
          boolean match;
  
          if (this.metadataValue != null) {
              Object value = metadata.getMetaData(this.metadataKey);
              match = value != null && value.equals(this.metadataValue);
          } else {
              match = metadata.contains(this.metadataKey);
          }
  
          return match;
      }
docs: Matches the {@link MetaData} for provided key and value.
  
  @param metadata the {@link MetaData} to analyze
  @return true is the {@link MetaData} is matched, false otherwise