@@ -0,0 +1,652 @@
+package test.com.cjpowered.learn.inventory;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0Aimport com.cjpowered.learn.inventory.InventoryDatabase;%0Aimport com.cjpowered.learn.inventory.Item;%0A%0Apublic class FakeDatabase implements InventoryDatabase%7B%0A%0A%09private final Map%3CItem, Integer%3E dataStore;%0A%09%0A%09public FakeDatabase(final Map%3CItem, Integer%3E dataStore)%7B%0A%09%09this.dataStore = dataStore;%0A%09%7D%0A%09%0A%09@Override%0A%09public int onHand(Item item) %7B%0A%09%09return dataStore.get(item);%0A%09%7D%0A%0A%09@Override%0A%09public List%3CItem%3E stockItems() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09final Set%3CItem%3E keys = dataStore.keySet();%0A%09%09return new ArrayList%3C%3E(keys);%0A%09%7D%0A%0A%7D%0A

create fake database