use of org.mule.runtime.core.internal.config.ImmutableExpirationPolicy in project mule by mulesoft.
the class DynamicConfigurationProviderTestCase method before.
@Override
@Before
public void before() throws Exception {
mockConfigurationInstance(configurationModel, MODULE_CLASS.newInstance());
mockInterceptors(configurationModel, null);
when(configurationModel.getOperationModels()).thenReturn(asList(operationModel));
when(configurationModel.getSourceModels()).thenReturn(ImmutableList.of());
mockClassLoaderModelProperty(extensionModel, getClass().getClassLoader());
when(extensionModel.getSourceModels()).thenReturn(ImmutableList.of());
when(extensionModel.getOperationModels()).thenReturn(asList(operationModel));
when(extensionModel.getConfigurationModels()).thenReturn(asList(configurationModel));
when(operationModel.requiresConnection()).thenReturn(true);
when(configurationModel.getOperationModels()).thenReturn(asList(operationModel));
when(configurationModel.getSourceModels()).thenReturn(ImmutableList.of());
when(resolverSet.resolve(from(event))).thenReturn(resolverSetResult);
when(resolverSetResult.asMap()).thenReturn(new HashMap<>());
visitableMock(operationModel);
expirationPolicy = new ImmutableExpirationPolicy(5, MINUTES, timeSupplier);
when(connectionProviderResolver.getResolverSet()).thenReturn(empty());
when(connectionProviderResolver.resolve(any())).thenReturn(null);
provider = new DynamicConfigurationProvider(CONFIG_NAME, extensionModel, configurationModel, resolverSet, connectionProviderResolver, expirationPolicy, new ReflectionCache(), muleContext);
super.before();
provider.initialise();
provider.start();
}
Aggregations