new ClassPathXmlApplicationContext(new String[] {cfgFile});
Object bean = ctx.getBean("bookService.proxyFactory");
assertNotNull(bean);
JAXRSClientFactoryBean cfb = (JAXRSClientFactoryBean) bean;
Bus bus = cfb.getBus();
ClientLifeCycleManager manager = bus.getExtension(ClientLifeCycleManager.class);
TestClientLifeCycleListener listener = new TestClientLifeCycleListener();
manager.registerListener(listener);
BookStore bs = cfb.create(BookStore.class);
assertNotNull(listener.getEp());
assertEquals("{http://service.rs}BookService",
listener.getEp().getEndpointInfo().getName().toString());
assertEquals("https://localhost:" + PORT, WebClient.client(bs).getBaseURI().toString());