public void testGetBookWithConfigInHttpConduit() throws Exception {
doTestGetBook123Proxy(KERBEROS_CONFIG_FILE);
}
private void doTestGetBook123Proxy(String configFile) throws Exception {
BookStore bs = JAXRSClientFactory.create("http://localhost:" + PORT, BookStore.class,
configFile);
WebClient.getConfig(bs).getOutInterceptors().add(new LoggingOutInterceptor());
// just to verify the interface call goes through CGLIB proxy too
assertEquals("http://localhost:" + PORT, WebClient.client(bs).getBaseURI().toString());
Book b = bs.getBook("123");
assertEquals(b.getId(), 123);
b = bs.getBook("123");
assertEquals(b.getId(), 123);
}