public void testAddToShoppingCart() { try { localVends.get(2).addItem(itemName, 2.00, Calendar.getInstance(), 2, 2, 2); customerManager.addToShoppingCart(2, 2, 2, 1); assertEquals( "Current amount of item in stock should be 1.", localVends.get(2).getTotalStock().get(new XYPair(2, 2)), (Integer) 1); } catch (Exception e) { e.printStackTrace(); } }