add book test code