Make unit test triggering the exception more specific and expect the
machinery error message as string and not as heredoc.