Mailer test fails with Call to a member function getSubject() on null

In a Symfony 5.0.2 project a test of the new Mailer fails with Error: Call to a member function getSubject() on null The email service and test are based on symfonycast tutorials. Adding var_dump($email); in the service immediately after $email = …; shows object(Symfony\Bridge\Twig\Mime\TemplatedEmail)#24 (11) {…, which says there is a real object created in…

Details