test case and error handler.