context.put(JMSSourceConfiguration.PASSWORD_FILE, passwordFile.getAbsolutePath());
events = Lists.newArrayList();
source = new JMSSource();
source.setName("JMSSource-" + UUID.randomUUID());
ChannelProcessor channelProcessor = mock(ChannelProcessor.class);
doAnswer(new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
events.addAll((List<Event>)invocation.getArguments()[0]);
return null;