@Before public void init() throws Exception { ExtendedProperties config = new ExtendedProperties(); RuntimeServices rsvc = new RuntimeInstance(); config.setProperty("path", "/templates"); config.setProperty("resource.loader", ""); rsvc.setConfiguration(config); rsvc.setProperty(RUNTIME_LOG_LOGSYSTEM, new Slf4jLogChute(log)); rsvc.setApplicationAttribute(SpringResourceLoaderAdapter.SPRING_RESOURCE_LOADER_KEY, factory); rsvc.init(); velocityLoader = new SpringResourceLoaderAdapter(); velocityLoader.commonInit(rsvc, config); velocityLoader.init(config); }