Add better error tests