use of org.apache.camel.spring.example.DummyBean in project camel by apache.
the class EndpointReferenceTest method testEndpointConfiguration.
public void testEndpointConfiguration() throws Exception {
Endpoint endpoint = getMandatoryBean(Endpoint.class, "endpoint1");
assertEquals("endpoint URI", "direct://start", endpoint.getEndpointUri());
DummyBean dummyBean = getMandatoryBean(DummyBean.class, "mybean");
assertNotNull("The bean should have an endpoint injected", dummyBean.getEndpoint());
assertEquals("endpoint URI", "direct://start", dummyBean.getEndpoint().getEndpointUri());
log.debug("Found dummy bean: " + dummyBean);
MockEndpoint resultEndpoint = getMockEndpoint("mock:end");
resultEndpoint.expectedBodiesReceived(body);
// now lets send a message
template.sendBody("direct:start", body);
resultEndpoint.assertIsSatisfied();
}
Aggregations