Implemented getBooksInDemand and some tests for it.