### Question:
StockItem implements Serializable { public void reduceQuantityBy(int quantityToReduceBy) { quantity -= quantityToReduceBy; } StockItem();  StockItem(Commodity commodity, int quantity); int getQuantity(); void reduceQuantityBy(int quantityToReduceBy); boolean isFinished(); void increaseQuantityBy(int quantityToIncreaseBy); Commodity getCommodity();  }### Answer:
@Test public void testReduceQuantityBy() throws Exception { StockItem item = new StockItem(new Commodity("item"), 10); item.reduceQuantityBy(5); assertThat(item.getQuantity(), is(5)); }