refactor in the add_book test