Search in sources :

Example 1 with AllStatistics

use of org.mule.runtime.core.api.management.stats.AllStatistics in project mule by mulesoft.

the class PipelineMessageNotificationTestCase method createMocks.

@Before
public void createMocks() throws Exception {
    muleContext.dispose();
    muleContext = mockContextWithServices();
    when(muleContext.getStatistics()).thenReturn(new AllStatistics());
    when(muleContext.getConfiguration()).thenReturn(new DefaultMuleConfiguration());
    notificationFirer = ((MuleContextWithRegistries) muleContext).getRegistry().lookupObject(NotificationDispatcher.class);
    when(muleContext.getDefaultErrorHandler(empty())).thenReturn(new ErrorHandlerFactory().createDefault(notificationFirer));
    mockErrorTypeLocator();
    when(muleContext.getTransformationService()).thenReturn(new ExtendedTransformationService(muleContext));
}
Also used : ExtendedTransformationService(org.mule.runtime.core.privileged.transformer.ExtendedTransformationService) AllStatistics(org.mule.runtime.core.api.management.stats.AllStatistics) DefaultMuleConfiguration(org.mule.runtime.core.api.config.DefaultMuleConfiguration) MuleContextWithRegistries(org.mule.runtime.core.internal.context.MuleContextWithRegistries) NotificationDispatcher(org.mule.runtime.api.notification.NotificationDispatcher) ErrorHandlerFactory(org.mule.runtime.core.internal.exception.ErrorHandlerFactory) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 NotificationDispatcher (org.mule.runtime.api.notification.NotificationDispatcher)1 DefaultMuleConfiguration (org.mule.runtime.core.api.config.DefaultMuleConfiguration)1 AllStatistics (org.mule.runtime.core.api.management.stats.AllStatistics)1 MuleContextWithRegistries (org.mule.runtime.core.internal.context.MuleContextWithRegistries)1 ErrorHandlerFactory (org.mule.runtime.core.internal.exception.ErrorHandlerFactory)1 ExtendedTransformationService (org.mule.runtime.core.privileged.transformer.ExtendedTransformationService)1