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();