final Module module = new ResourceConfiguredModule(moduleDescriptor,
new ModuleDeploymentProperties());
final TestMessageBus messageBus = new TestMessageBus();
final JobEventsListenerPlugin eventsListenerPlugin = new JobEventsListenerPlugin(messageBus);
final SubscribableChannel jobExecutionEventsChannel = new PublishSubscribeChannel();
final SubscribableChannel stepExecutionEventsChannel = new PublishSubscribeChannel();
final SubscribableChannel chunkEventsChannel = new PublishSubscribeChannel();
final SubscribableChannel itemEventsChannel = new PublishSubscribeChannel();
final SubscribableChannel skipEventsChannel = new PublishSubscribeChannel();
final SubscribableChannel aggregatedEventsChannel = new PublishSubscribeChannel();
final Module spiedModule = spy(module);
doReturn(messageBus).when(spiedModule).getComponent(MessageBus.class);
doReturn(jobExecutionEventsChannel).when(spiedModule).getComponent("xd.job.jobExecutionEvents",