StockItem loadedItem = (StockItem) session.get( StockItem.class, item.getId() );
assertNotNull( "Cannot load persisted object", loadedItem );
loadedItem.setCount( 24 );
transaction.commit();
session.clear();
transaction = session.beginTransaction();
// delete
loadedItem = (StockItem) session.get( StockItem.class, item.getId() );
assertNotNull( "Cannot load persisted object", loadedItem );