Restlet trace = new Restlet(originContainer.getContext())
Restlet trace = new Restlet()
	public void testRedirect() throws Exception	{		// Create containers		Container clientContainer = new Container();		Container proxyContainer = new Container();		Container originContainer = new Container();		// Create the client connectors		clientContainer.getClients().add(Protocol.HTTP);		proxyContainer.getClients().add(Protocol.HTTP);		// Create the proxy Restlet		String target = "http://localhost:9090${path}#[if query]?${query}#[end]";		RedirectRestlet proxy = new RedirectRestlet(proxyContainer.getContext(), target, 				RedirectRestlet.MODE_CONNECTOR);		// Create a new Restlet that will display some path information.		Restlet trace = new Restlet(originContainer.getContext())		{			public void handle(Call call)			{				// Print the requested URI path				String output = 					     "Resource URI:  " + call.getResourceRef() + '\n'						+ "Base URI:      " + call.getBaseRef() + '\n'						+ "Relative path: " + call.getRelativePart() + '\n'						+ "Query string:  " + call.getResourceRef().getQuery() + '\n'						+ "Method name:   " + call.getMethod() + '\n';				call.setOutput(new StringRepresentation(output, MediaType.TEXT_PLAIN));			}		};		// Set the container roots//		proxyContainer.setRoot(proxy);//		originContainer.setRoot(trace);				// Create the server connectors		proxyContainer.getServers().add(Protocol.HTTP, 8080);		originContainer.getServers().add(Protocol.HTTP, 9090);		// Now, let's start the containers!		originContainer.start();		proxyContainer.start();		clientContainer.start();		// Tests		Context context = clientContainer.getContext();		String uri = "http://localhost:8080/?foo=bar";		testCall(context, Method.GET, uri);		testCall(context, Method.POST, uri);		testCall(context, Method.PUT, uri);		testCall(context, Method.DELETE, uri);		uri = "http://localhost:8080/abcd/efgh/ijkl?foo=bar&foo=beer";		testCall(context, Method.GET, uri);		testCall(context, Method.POST, uri);		testCall(context, Method.PUT, uri);		testCall(context, Method.DELETE, uri);		uri = "http://localhost:8080/v1/client/kwse/CnJlNUQV9%252BNNqbUf7Lhs2BYEK2Y%253D/user/johnm/uVGYTDK4kK4zsu96VHGeTCzfwso%253D/";		testCall(context, Method.GET, uri);		// Stop the containers		clientContainer.stop();		originContainer.stop();		proxyContainer.stop();	}