package camelinaction;
import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.junit.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* How to configure a custom thread pool profile in Spring XML
*/
public class SpringCustomThreadPoolProfileTest extends CamelSpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("META-INF/spring/CustomThreadPoolProfileTest.xml");
}
@Test
public void testCustomThreadPoolProfile() throws Exception {
getMockEndpoint("mock:result").expectedMessageCount(1);
template.sendBody("direct:start", "Hello Camel");
assertMockEndpointsSatisfied();
}
}