control.makeThreadSafe(true);
}
@Test
public void testWadlInJsonFormat() throws Exception {
WadlGenerator wg = new WadlGenerator();
wg.setUseJaxbContextForQnames(false);
wg.setIgnoreMessageWriters(false);
wg.setExternalLinks(Collections.singletonList("json.schema"));
ClassResourceInfo cri =
ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
Map<String, List<String>> headers = new HashMap<String, List<String>>();
headers.put("Accept", Collections.singletonList("application/json"));
m.put(Message.PROTOCOL_HEADERS, headers);
Response r = wg.handleRequest(m, cri);
assertEquals("application/json",
r.getMetadata().getFirst("Content-Type").toString());
ByteArrayOutputStream os = new ByteArrayOutputStream();