Added error path tests.