Refactoring BookRepository and writing test for it