Storage extends Observable { public ArrayList<SimpleResource> getList() { return itemList; } Storage(); int addItem(SimpleResource item); int getQuantity(SimpleResource item); ArrayList<SimpleResource> getList(); SimpleResource takeItem(SimpleResource item, int quantity); int getSize(); int getLevel(); void setLevel(int level); int removeItem(SimpleResource item, int quantity); boolean containsItem(SimpleResource item); void swapItem(int position1, int position2); int trackAdd(SimpleResource item); int trackRemove(SimpleResource item);  }
@Test public void testGetList() { Storage storage = new Storage(); storage.setLevel(10); SimpleResource item1 = new SimpleResource("Apple", hashtable, 20); SimpleResource item2 = new SimpleResource("Banana", hashtable, 10); SimpleResource item3 = new SimpleResource("Grape", hashtable, 9); storage.addItem(item1); storage.addItem(item2); storage.addItem(item3); ArrayList<SimpleResource> list = new ArrayList<SimpleResource>(); list.add(item1); list.add(item2); list.add(item3); assertEquals(list, storage.getList()); }