List<LayerInfo> layers = catalog.getLayers();
WorkspaceInfo sf = catalog.getWorkspaceByName("sf");
WorkspaceInfo cite = catalog.getWorkspaceByName("cite");
CatalogFactory factory = catalog.getFactory();
DataStoreInfo citeStore = factory.createDataStore();
citeStore.setEnabled(true);
citeStore.setName("globalStore");
citeStore.setWorkspace(cite);
catalog.add(citeStore);
FeatureTypeInfo citeFeatureType = factory.createFeatureType();
citeFeatureType.setName("citeLayer");
citeFeatureType.setStore(citeStore);
citeFeatureType.setNamespace(catalog.getNamespaceByPrefix("cite"));
catalog.add(citeFeatureType);
LayerInfo citeLayer = factory.createLayer();
citeLayer.setResource(citeFeatureType);
citeLayer.setEnabled(true);
//citeLayer.setName("citeLayer");
catalog.add(citeLayer);
assertNotNull(catalog.getLayerByName("citeLayer"));
assertEquals("cite:citeLayer", catalog.getLayerByName("citeLayer").prefixedName());
DataStoreInfo sfStore = factory.createDataStore();
sfStore.setEnabled(true);
sfStore.setName("localStore");
sfStore.setWorkspace(sf);
catalog.add(sfStore);
FeatureTypeInfo sfFeatureType = factory.createFeatureType();
sfFeatureType.setName("sfLayer");
sfFeatureType.setStore(sfStore);
sfFeatureType.setNamespace(catalog.getNamespaceByPrefix("sf"));
catalog.add(sfFeatureType);
LayerInfo sfLayer = factory.createLayer();
sfLayer.setResource(sfFeatureType);
sfLayer.setEnabled(true);
//sfLayer.setName("sfLayer");
catalog.add(sfLayer);