def METHOD_NAME(question_generator, reader):
    p = QuestionAnswerGenerationPipeline(question_generator, reader)
    results = p.run(documents=[document])
    assert "queries" in results
    assert "answers" in results
    assert len(results["queries"]) == len(results["answers"])
    assert len(results["answers"]) > 0
    assert results["answers"][0][0].answer is not None