Add tests for book generation