fixed issue with test asserting incorrect exception.