return loader;
}
public Catalog createCatalog(MockTestData testData) throws Exception {
GeoServerResourceLoader loader = createResourceLoader(testData);
final Catalog catalog = createMock(Catalog.class);
expect(catalog.getFactory()).andReturn(new CatalogFactoryImpl(catalog)).anyTimes();
expect(catalog.getResourceLoader()).andReturn(loader).anyTimes();
catalog.removeListeners((Class)EasyMock.anyObject());
expectLastCall().anyTimes();
catalog.addListener((CatalogListener) EasyMock.anyObject());
expectLastCall().anyTimes();
expect(catalog.getResourcePool()).andAnswer(new IAnswer<ResourcePool>() {
@Override
public ResourcePool answer() throws Throwable {
return ResourcePool.create(catalog);
}
}).anyTimes();
MockCatalogBuilder b = new MockCatalogBuilder(catalog, loader.getBaseDirectory() );
b.setCallback(this);
b.style(DEFAULT_VECTOR_STYLE);
createWorkspace(DEFAULT_PREFIX, DEFAULT_URI, null, b);