camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From idioma <>
Subject Mocking rest endpoints for testing new Custom Processor
Date Tue, 11 Oct 2016 13:51:44 GMT
I am trying to mock rest endpoints in order to test a Custom Processor that
validates restpoints against a JSON Schema, but I am totally lost in terms
on how to write the Test and prove that my process is doing the job. I have
easily had this working:

(Mocking endpoints and skip sending to original endpoint) with the example
for "isMockEndpointsAndSkip using camel-test kit"

How can you do the same for rest endpoints? In my camel-route.xml, I have
the following:

{code}<rest path="/say">
			<get uri="/hello">
				<to uri="direct:hello" />
			<get uri="/bye" consumes="application/json">
				<to uri="direct:bye" />
			<post uri="/bye">
				<to uri="mock:update" />
			<from uri="direct:hello" />
				<constant>Hello World</constant>
			<from uri="direct:bye" />
				<constant>Bye World</constant>

How do I modify the example for "isMockEndpointsAndSkip using camel-test
kit" to use rest endpoints?  

Can you please help?



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message