factory.getCacheContainerInjector().inject(cacheContainer);
factory.getCacheConfigurationInjector().inject(jvmRouteCache.getCacheConfiguration());
factory.getRegistryInjector().inject(registry);
factory.getLockManagerInjector().inject(((ExtendedCacheManager) cacheContainer).getLockManager());
Engine engine = new MockEngine();
engine.setName("jboss.web");
engine.setJvmRoute(jvmRoute);
Host host = new MockHost();
host.setName("localhost");
engine.addChild(host);
StandardContext context = new StandardContext();
context.setName(warName);
context.setDomain(jvmRoute);
host.addChild(context);