assertEquals(0, item.getId()); // this should not be changed from above
}
public void testInsertPreKey() throws SQLException {
LineItem item = new LineItem();
item.setId(10);
item.setItemCode("blah");
item.setOrderId(333);
item.setPrice(new BigDecimal("44.00"));
item.setQuantity(1);
Object key = sqlMap.insert("insertLineItemPreKey", item);
assertEquals(new Integer(99), key);
assertEquals(99, item.getId());
Map param = new HashMap();
param.put("orderId", new Integer(333));
param.put("lineId", new Integer(99));
LineItem testItem = (LineItem) sqlMap.queryForObject("getSpecificLineItem", param);
assertNotNull(testItem);
assertEquals(99, testItem.getId());
}