docstr: Test if the component runs correctly when metadata is supplied by the user.
docstr_tok: ["Test","if","the","component","runs","correctly","when","metadata","is","supplied","by","the","user","."]
code: def test_run_doc_metadata(self, test_files_path):
      """
      Test if the component runs correctly when metadata is supplied by the user.
      """
      converter = HTMLToDocument()
      sources = [test_files_path / "html" / "what_is_haystack.html"]
      metadata = [{"file_name": "what_is_haystack.html"}]
      results = converter.run(sources=sources, 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"
  
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 3 for calling the TestHTMLToDocument obj's underlying member method code with example usage: obj.test_run_doc_metadata(test_files_path) without return types