### Question:
InventoryPages { public void clearAll() { while (pages.size() != 1) { pages.remove(pages.size() - 1); } this.pages.get(0).clear(); } InventoryPages(PagesList pages, Server server, PageBuilder pageBuilder); void clearAll(); int getTotalPages(); boolean isEmpty(); Inventory getPage(int page); void addNewPage(); void removePage(int page);  }### Answer:
@Test public void clearAll() { addFourPages(); inventoryPages.clearAll(); assertEquals(1, inventoryPages.getTotalPages()); verify(inventories.get(0)).clear(); }