CatalogFactory cFactory = catalog.getFactory();
WorkspaceInfo ws = cFactory.createWorkspace();
ws.setName( "foo" );
WMSStoreInfo wms1 = cFactory.createWebMapServer();
wms1.setName( "bar" );
wms1.setWorkspace( ws );
wms1.setCapabilitiesURL( "http://fake.host/wms?request=GetCapabilities&service=wms");
ByteArrayOutputStream out = out();
persister.save( wms1, out );
WMSStoreInfo wms2 = persister.load( in( out ), WMSStoreInfo.class );
assertEquals( "bar", wms2.getName() );
//TODO: reenable when resolving proxy commited
assertNotNull( wms2.getWorkspace() );
assertEquals( "foo", wms2.getWorkspace().getId() );
Document dom = dom( in( out ) );
assertEquals( "wmsStore", dom.getDocumentElement().getNodeName() );
}