prop.addListener(l);
// to test that a listener is only added once
prop.addListener(l);
URL id = layer.getID();
ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
IGeoResource resource = localCatalog.getById(IGeoResource.class, new ID(id), new NullProgressMonitor());
IService parent = resource.service(new NullProgressMonitor());
localCatalog.replace(parent.getID(), parent);
assertEquals(0, changed[0]);
assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
localCatalog.replace(parent.getID(), parent);
assertEquals(1, changed[0]);
parent=CatalogTests.createResource(null, "ResolveTo").service(new NullProgressMonitor()); //$NON-NLS-1$
localCatalog.replace(parent.getID(), parent);
changed[0]=0;
assertEquals(0, changed[0]);
}