Adding test for error class