Error code checking added to test class.