@Before public void before() { when(muleContext.getNotificationManager()).thenReturn(eventNotificationHandler); when(event.getMessage()).thenReturn(message); initMocks(eventNotificationHandler); helper = new NotificationHelper(eventNotificationHandler, TestServerNotification.class, false); }
@Inject public void setMuleContext(MuleContext context) { this.muleContext = context; this.notificationHelper = new NotificationHelper(muleContext.getNotificationManager(), ConnectorMessageNotification.class, false); } }
/** * @param muleContext application's context * @param scheduler the scheduler */ public DefaultSchedulerMessageSource(MuleContext muleContext, PeriodicScheduler scheduler, boolean disallowConcurrentExecution) { this.muleContext = muleContext; this.scheduler = scheduler; this.disallowConcurrentExecution = disallowConcurrentExecution; this.notificationHelper = new NotificationHelper(muleContext.getNotificationManager(), ConnectorMessageNotification.class, false); }
@Before public void before() { when(muleContext.getNotificationManager()).thenReturn(eventNotificationHandler); when(event.getMessage()).thenReturn(message); when(message.getPayload()).thenReturn(new TypedValue("", DataType.STRING)); initMocks(eventNotificationHandler); helper = new NotificationHelper(eventNotificationHandler, TestServerNotification.class, false); }