updated unittest and implementation of canReturnBook()