SpringParamEngineFactory implements FactoryBean<ParamEngine>, ApplicationContextAware { @Override public ParamEngine getObject() { ParamEngineConfigBuilder configBuilder = ParamEngineConfigBuilder.paramEngineConfig(); if (paramRepository != null) { configBuilder.withParameterRepositories(paramRepository); } configBuilder.withPackagesToScan(new PackageList(packagesToScan)); if (!scanAnnotations) { configBuilder.withAnnotationScanDisabled(); } configBuilder.registerModule(new SpringModule(appContext)); return new ParamEngineFactory().createParamEngine(configBuilder.build()); }  @Override ParamEngine getObject(); @Override Class<?> getObjectType(); @Override boolean isSingleton(); void setParamRepository(ParamRepository paramRepository); void setScanAnnotations(boolean scanAnnotations); void setPackagesToScan(List<String> packagesToScan); @Override void setApplicationContext(ApplicationContext appContext);  }
@Test public void shouldCreateNewConfigObjectIfNoneSpecified() throws Exception { ParamEngine paramEngine = springParamEngineFactory.getObject(); assertThat(paramEngine.runtimeConfiguration()).hasParamCache().hasFunctionCache(); }