ResourceUtils.createClassResourceInfo(Orders.class, Orders.class, true, true);
List<ClassResourceInfo> cris = new ArrayList<ClassResourceInfo>();
cris.add(cri1);
cris.add(cri2);
Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, cris);
Response r = wg.handleRequest(m, null);
assertEquals(WadlGenerator.WADL_TYPE.toString(),
r.getMetadata().getFirst(HttpHeaders.CONTENT_TYPE));
String wadl = r.getEntity().toString();
Document doc = StaxUtils.read(new StringReader(wadl));
checkGrammars(doc.getDocumentElement(), "thebook", "books", "thebook2s", "thebook2", "thechapter");
List<Element> els = getWadlResourcesInfo(doc, "http://localhost:8080/baz", 2);
checkBookStoreInfo(els.get(0), "prefix1:thebook", "prefix1:thebook2", "prefix1:thechapter");
Element orderResource = els.get(1);