unit test error class