Added error tests for add method.