added unit tests and implementation for canReturnBook()