### Question:
StockItem implements Serializable { public boolean isFinished() { return quantity <= 0; } StockItem();  StockItem(Commodity commodity, int quantity); int getQuantity(); void reduceQuantityBy(int quantityToReduceBy); boolean isFinished(); void increaseQuantityBy(int quantityToIncreaseBy); Commodity getCommodity();  }### Answer:
@Test public void testIsFinished() throws Exception { StockItem item = new StockItem(new Commodity("item"), 0); assertTrue(item.isFinished()); StockItem item2 = new StockItem(new Commodity("item"), 10); assertFalse(item2.isFinished()); }