Object resource = new MyResource2();
MethodResponse methodResponse = null;
Map<String, String> parameters = new HashMap<String, String>();
new RootResourceExecutorImpl().execute(request, resource, "", parameters);
parameters = new HashMap<String, String>();
new RootResourceExecutorImpl().execute(request, resource, "two", parameters);
parameters = new HashMap<String, String>();
parameters.put("paramOfPrevSegment", "paramXY");
new RootResourceExecutorImpl().execute(request, resource,
"three/myID", parameters);
parameters = new HashMap<String, String>();
methodResponse = new RootResourceExecutorImpl().execute(request, resource, "four", parameters);
return methodResponse;
}