Refactoring old test cases and also added in testListBooks testcase, passing