BaseWroManagerFactory implements WroManagerFactory { protected WroModelFactory newModelFactory() { try { LOG.debug("Trying to use SmartWroModelFactory as default model factory"); final Class<? extends WroModelFactory> smartFactoryClass = Class.forName( "ro.isdc.wro.extensions.model.factory.SmartWroModelFactory").asSubclass(WroModelFactory.class); return smartFactoryClass.getDeclaredConstructor().newInstance(); } catch (final Exception e) { LOG.debug("SmartWroModelFactory is not available. Using default model factory."); LOG.debug("Reason: {}", e.getMessage()); } return new XmlModelFactory(); }  final WroManager create(); BaseWroManagerFactory setNamingStrategy(final NamingStrategy namingStrategy); void onCachePeriodChanged(final long period); void onModelPeriodChanged(final long period); BaseWroManagerFactory setGroupExtractor(final GroupExtractor groupExtractor); BaseWroManagerFactory setModelFactory(final WroModelFactory modelFactory); BaseWroManagerFactory setHashStrategy(final HashStrategy hashStrategy); void setCacheKeyFactory(final CacheKeyFactory cacheKeyFactory); BaseWroManagerFactory setModelTransformers(final List<Transformer<WroModel>> modelTransformers); BaseWroManagerFactory addModelTransformer(final Transformer<WroModel> modelTransformer); BaseWroManagerFactory setCacheStrategy(final CacheStrategy<CacheKey, CacheValue> cacheStrategy); BaseWroManagerFactory setUriLocatorFactory(final UriLocatorFactory uriLocatorFactory); BaseWroManagerFactory setProcessorsFactory(final ProcessorsFactory processorsFactory); BaseWroManagerFactory setResourceAuthorizationManager(final ResourceAuthorizationManager authorizationManager); void setMetaDataFactory(final MetaDataFactory metaDataFactory); BaseWroManagerFactory setResourceWatcher(final ResourceWatcher resourceWatcher); void destroy();  }
@Test public void defaultModelFactoryIsXml() { new BaseWroManagerFactory() { @Override protected WroModelFactory newModelFactory() { final WroModelFactory modelFactory = super.newModelFactory(); Assert.assertEquals(XmlModelFactory.class, modelFactory.getClass()); return modelFactory; } }; }