public String answer(InvocationOnMock invocation) throws Throwable {
invoked = true;
return null;
}
}).when(activitiProducer).process((Exchange)anyObject());
when(activitiEndpoint.createProducer()).thenReturn(activitiProducer);
// and finally we add the mocked activiti component to the camel context
context.addComponent("activiti", activitiComponent);
return context;
}