Added a bunch of error path tests.