}
@Test(dependsOnMethods = "testInsertRollback")
public void testUpdateCommit() {
String initialCountryName = "updateCommit";
Country country = new Country(initialCountryName);
database.save(country);
Assert.assertNotNull(country.getId());
Assert.assertNotNull(country.getVersion());
Integer initVersion = (Integer) country.getVersion();
database.begin();
Country loaded = (Country) database.load((ORecordId) country.getId());
Assert.assertEquals(loaded, country);
String newName = "ShouldBeChanged";
loaded.setName(newName);
database.save(loaded);
database.commit();
loaded = (Country) database.load((ORecordId) country.getId());
Assert.assertTrue(loaded.equals(country));
Assert.assertEquals(loaded.getId(), country.getId());
Assert.assertEquals(loaded.getVersion(), new Integer(initVersion + 1));
Assert.assertEquals(loaded.getName(), newName);
}