String address = "http://localhost:" + PORT;
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
bean.setProvider(new BookStore.PrimitiveDoubleArrayReaderWriter());
bean.setAddress(address);
bean.setResourceClass(BookStore.class);
BookStore store = bean.create(BookStore.class);
WebClient.getConfig(store).getHttpConduit().getClient().setReceiveTimeout(1000000L);
double[] arr = store.getBookIndexAsDoubleArray();
assertEquals(3, arr.length);
assertEquals(1, arr[0], 0.0);
assertEquals(2, arr[1], 0.0);