Implementation of InventoryService with tests