* Test updatePriceGuide(...) works with a priceGuide.
*/
@Test
public void testUpdatePriceGuide(){
// Create CommodityImpl to update.
CommodityImpl commodity = new VIP();
// Set commodity's amount.
commodity.setAmount(10);
// Create a priceGuide.
PriceGuide priceGuide = pgs.newPriceGuide();
// Call updatePriceGuide with a PriceGuide.
PriceGuide pg = null;
try {
pg = pgs.updatePriceGuide(priceGuide, commodity);
} catch (CommodityException ex) {
fail();
}
// Did it update the commodity?
assertTrue(pg.getVIP().getAmount() == commodity.getAmount());
// Did it leave other commodities alone?
assertTrue(pg.getFood().getAmount() == 0);
}