camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kraythe ." <>
Subject CamelTestSupport Needs a New Method
Date Fri, 27 Sep 2013 06:54:45 GMT
There is a problem with the CamelTestSupport class in that if you call
getMockEndpoint on an endpoint that doesnt exist, it blithely returns you
an endpoint connected to nothing. The problem is you end up chasing endless
test failures when the fact is your endpoint is not even there. So I
suggest a method I added to my subclass of CamelTestSupport which is:

protected MockEndpoint assertAndGetMockEndpoint(final String uri) {


    return getMockEndpoint(uri);


This method will make sure that the endpoint is there before returning it
and it will make tests easier to write.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message