Yet more test coverage, this time with bonus error handling