UPDATED added new tests to check expected error codes in the book function.