protected String[] getApplicationContextFiles() {
return new String[]{"org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml"};
}
public void testCxfRsClientFactoryBean() {
SpringJAXRSClientFactoryBean cfb = (SpringJAXRSClientFactoryBean) ctx.getBean("rsClient1");
assertEquals("Get a wrong address", cfb.getAddress(), "http://localhost:9000/router");
assertEquals("Get a wrong beanId", cfb.getBeanId(), "rsClient1");
assertEquals("Get a wrong password", cfb.getPassword(), "passwd");
assertEquals("Get a wrong user name", cfb.getUsername(), "username");
CustomerService customerService = cfb.create(CustomerService.class);
assertNotNull("The customer service should not be null", customerService);
}