fix tests to assert for specific exception