assertEquals(sTest.getName(),"setar");
}
@Test
public void testUpdate() throws Exception {
Structure structure = (Structure) addHotel();
Facility f = new Facility();
f.setCode("SWIMMING");
f.setDescription("Has a swimming pool");
structure.addFacility(f);
Facility f2 = new Facility();
f.setCode("FOOD");
f.setDescription("blah blahblha");
structure.addFacility(f2);
localizedStructureManager.add(structure);
Structure sTest = (Structure) localizedStructureManager.get(structure.getId());
assertEquals(2,sTest.getFacilities().size());
Set<Facility> facilities = new HashSet<Facility>();
facilities.add(f);
sTest.setFacilities(facilities);
localizedStructureManager.add(sTest);
Structure sTest2 = (Structure) localizedStructureManager.get(structure.getId());
assertEquals(structure.getId(), sTest2.getId());
assertEquals(1,sTest2.getFacilities().size());
}