HttpServerHelper hsh = (HttpServerHelper) server.getContext()
.getAttributes().get("org.restlet.engine.helper");
Connection<Server> c = hsh.getConnectionPool().checkout();
HttpInboundRequest hir = new HttpInboundRequest(server.getContext(), c,
"GET",
"/control/accounts/netdev/subscriptions/emily/preferences",
"HTTP/1.1");
Form headers = new Form();
headers.add("Accept", "application/json");
headers.add("Content-Type", "application/json");
headers.add("X-Requested-With", "XMLHttpRequest");
headers.add("User-Agent", "");
hir.setHeaders(headers);
assertEquals("Target URI",
"/control/accounts/netdev/subscriptions/emily/preferences", hir
.getResourceRef().getPath());
}