Writing tests when services throw PDOException