camel unit test with cametestsupport, template is always null
问题 I am doing a simple unit test with camel. All I want to do is to read a json from a file (under resources), send it to a java class for validation - this is the route that I am trying to test. Whatever I do, the template (which I use to sendBody(json) is always null. Here is my code public class RouteTests extends CamelTestSupport { @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @Produce(uri = "direct:start") protected ProducerTemplate template; @Autowired