fixed spec for throwing exception