Add tests for errors package