def METHOD_NAME(
    self,
    mock_generate_pdf_from_html: mock.MagicMock,
    mock_generate_pdf_from_mail: mock.MagicMock,
):
    """
    GIVEN:
        - Intermediary pdfs to be merged
    WHEN:
        - pdf generation is requested with html file requiring merging of pdfs
    THEN:
        - gotenberg is called to merge files and the resulting file is returned
    """
    mock_generate_pdf_from_mail.return_value = self.SAMPLE_DIR / "first.pdf"
    mock_generate_pdf_from_html.return_value = self.SAMPLE_DIR / "second.pdf"
    msg = self.parser.parse_file_to_message(
        self.SAMPLE_DIR / "html.eml",
    )
    _, pdf_path = util_call_with_backoff(
        self.parser.generate_pdf,
        [msg],
    )
    self.assertIsFile(pdf_path)
    extracted = extract_text(pdf_path)
    expected = (
        "first\tPDF\tto\tbe\tmerged.\n\n\x0csecond\tPDF\tto\tbe\tmerged.\n\n\x0c"
    )
    self.assertEqual(expected, extracted)