Make sure that required errors are indeed thrown