// add a store and a wms layer into the catalog
Catalog catalog = getCatalog();
// setup the wms store, resource and layer
CatalogBuilder cb = new CatalogBuilder(catalog);
WMSStoreInfo wms = cb.buildWMSStore("demo");
wms.setCapabilitiesURL(RemoteOWSTestSupport.WMS_SERVER_URL
+ "service=WMS&request=GetCapabilities");
catalog.save(wms);
cb.setStore(wms);
WMSLayerInfo states = cb.buildWMSLayer("topp:states");
states.setName("rstates");