> I don't really understand yet how mock endpoints work, I am seeking a simple
> example to help get me over this.

You can test your processor with Mock endpoint by using the latter to
catch exchange processed by the former.

// Fixtures
from("direct:test").process(new testProc()).to("mock:test");

// Given
MockEndpoint resultEndpoint = getMockEndpoint("mock:test");
resultEndpoint.expectedMessageCount(1);
resultEndpoint.message(0).header("myHeader").isEqualTo("Yay");

// When
template.sendBody("direct:test", "Test");

// Then
resultEndpoint.assertIsSatisfied();

Cheers.

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com

Reply via email to