}
}
public void testServer() throws Exception {
ObjectContext context = createContext();
Continent continent = context.newObject(Continent.class);
continent.setName("Europe");
Country country = new Country();
context.registerNewObject(country);
// TODO: setting property before object creation does not work on ROP (CAY-1320)
country.setName("Russia");
country.setContinent(continent);
assertEquals(continent.getCountries().size(), 1);
context.commitChanges();
context.deleteObjects(country);
assertEquals(continent.getCountries().size(), 0);
continent.setName("Australia");
context.commitChanges();
context.performQuery(new RefreshQuery());
assertEquals(context.performQuery(new SelectQuery(Country.class)).size(), 0);