docstr: Test if the component runs correctly when metadata is read from the ByteStream object and supplied by the user.
  
  There is an overlap between the metadata received.
  
  The component should use the supplied metadata to overwrite the values if there is an overlap between the keys.
docstr_tok: ["Test","if","the","component","runs","correctly","when","metadata","is","read","from","the","ByteStream","object","and","supplied","by","the","user",".","There","is","an","overlap","between","the","metadata","received",".","The","component","should","use","the","supplied","metadata","to","overwrite","the","values","if","there","is","an","overlap","between","the","keys","."]
code: def test_run_bytestream_doc_overlapping_metadata(
      self, test_files_path
  ):
      """
      Test if the component runs correctly when metadata is read from the ByteStream object and supplied by the user.
  
      There is an overlap between the metadata received.
  
      The component should use the supplied metadata to overwrite the values if there is an overlap between the keys.
      """
      converter = HTMLToDocument()
      with open(
          test_files_path / "html" / "what_is_haystack.html", "rb"
      ) as file:
          byte_stream = file.read()
          # ByteStream has "url" present in metadata
          stream = ByteStream(
              byte_stream,
              meta={
                  "content_type": "text/html",
                  "url": "test_url_correct",
              },
          )
  
      # "url" supplied by the user overwrites value present in metadata
      metadata = [
          {"file_name": "what_is_haystack.html", "url": "test_url_new"}
      ]
      results = converter.run(sources=[stream], meta=metadata)
      docs = results["documents"]
  
      assert len(docs) == 1
      assert "Haystack" in docs[0].content
      assert docs[0].meta == {
          "file_name": "what_is_haystack.html",
          "content_type": "text/html",
          "url": "test_url_new",
      }
  
file_path: haystack/test/components/converters/test_html_to_document.py
imports: import logging
  import pytest
  from haystack.components.converters import HTMLToDocument
  from haystack.dataclasses import ByteStream
label_desc: Use image node_id 7 for calling the TestHTMLToDocument obj's underlying member method code with example usage: obj.test_run_bytestream_doc_overlapping_metadata(test_files_path) without return types