@Test
public void shouldAdvanceVersionWhenRecordIsUpdated(){
deleteAndPopulateTable("items");
Item m = new Item();
m.set("item_number", 1);
m.set("item_description", "descr 1");
m.saveIt();
m = Item.findById(1);
m.set("item_description", "descr 2").saveIt();
a(m.get("lock_version")).shouldBeEqual(2);// this will ensure that the value is updated in the model itself
m = Item.findById(1);
a(m.get("lock_version")).shouldBeEqual(2);
m = Item.findById(1);
m.set("item_description", "descr 3").saveIt();
m = Item.findById(1);
a(m.get("lock_version")).shouldBeEqual(3);
}