Add error-case tests.