Adding error tests