final long beginProfiles = database.countClusterElements("Profile");
beginCities = database.countClusterElements("City");
Country italy = database.newInstance(Country.class, "Italy");
Profile garibaldi = database.newInstance(Profile.class, "GGaribaldi", "Giuseppe", "Garibaldi", null);
garibaldi.setLocation(database.newInstance(Address.class, "Residence", database.newInstance(City.class, italy, "Rome"),
"Piazza Navona, 1"));
Profile bonaparte = database.newInstance(Profile.class, "NBonaparte", "Napoleone", "Bonaparte", garibaldi);
bonaparte.setLocation(database.newInstance(Address.class, "Residence", garibaldi.getLocation().getCity(),
"Piazza di Spagna, 111"));
database.save(bonaparte);
Assert.assertEquals(database.countClusterElements("Profile"), beginProfiles + 2);
}