Added tests to the errors package
Fix error in test