public void testOptionsOnSubresource() throws Exception {
WebClient wc =
WebClient.create("http://localhost:"
+ PORT + "/bookstore/booksubresource/123");
WebClient.getConfig(wc).getRequestContext().put("org.apache.cxf.http.header.split", true);
Response response = wc.options();
List<Object> values = response.getMetadata().get("Allow");
assertNotNull(values);
assertTrue(!values.contains("POST") && values.contains("GET")
&& !values.contains("DELETE") && values.contains("PUT"));
assertEquals(0, ((InputStream)response.getEntity()).available());