@Test
public void shouldAdvanceVersionWhenRecordIsUpdated(){
deleteAndPopulateTable("watermelons");
Watermelon m = new Watermelon();
m.set("melon_type", "dark_green");
m.saveIt();
m = Watermelon.findById(1);
m.set("melon_type", "red").saveIt();
a(m.get("record_version")).shouldBeEqual(2);// this will ensure that the value is updated in the model itself
m = Watermelon.findById(1);
a(m.get("record_version")).shouldBeEqual(2);
m = Watermelon.findById(1);
m.set("melon_type", "green").saveIt();
m = Watermelon.findById(1);
a(m.get("record_version")).shouldBeEqual(3);
m = Watermelon.findById(1);
m.set("melon_type", "yellow").saveIt();
m = Watermelon.findById(1);
a(m.get("record_version")).shouldBeEqual(4);
}