Added unit test for Error