Add tests for the exceptions that could be thrown.