Fixes failing test due to incorrect exception message