}
@Test
public void testPostGetBookFastinfoset() throws Exception {
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
bean.setAddress("http://localhost:9092/test/services/rest3/bookstore/fastinfoset");
bean.getOutInterceptors().add(new FIStaxOutInterceptor());
bean.getInInterceptors().add(new FIStaxInInterceptor());
JAXBElementProvider p = new JAXBElementProvider();
p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
p.setProduceMediaTypes(Collections.singletonList("application/fastinfoset"));
bean.setProvider(p);
Map<String, Object> props = new HashMap<String, Object>();
props.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE);
bean.setProperties(props);
WebClient client = bean.createWebClient();
Book b = new Book("CXF", 1L);
Book b2 = client.type("application/fastinfoset").accept("application/fastinfoset")
.post(b, Book.class);
assertEquals(b2.getName(), b.getName());
assertEquals(b2.getId(), b.getId());