http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/OnPostCallResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/OnPostCallResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OnPostCallResource.java
new file mode 100755
index 0000000..c09dbee
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OnPostCallResource.java
@@ -0,0 +1,93 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ * Validates that headers
+ */
+@RestResource(
+       path="/testOnPostCall",
+       serializers=OnPostCallResource.TestSerializer.class,
+       properties={
+               @Property(name="p1",value="sp1"), // Unchanged servlet-level 
property.
+               @Property(name="p2",value="sp2"), // Servlet-level property 
overridden by onPostCall.
+               @Property(name="p3",value="sp3"), // Servlet-level property 
overridded by method.
+               @Property(name="p4",value="sp4")  // Servlet-level property 
overridden by method then onPostCall.
+       }
+)
+public class OnPostCallResource extends RestServlet {
+       private static final long serialVersionUID = 1L;
+
+       @Produces({"text/s1","text/s2","text/s3"})
+       public static class TestSerializer extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
+                       ObjectMap p = session.getProperties();
+                       
session.getWriter().write("p1="+p.get("p1")+",p2="+p.get("p2")+",p3="+p.get("p3")+",p4="+p.get("p4")+",p5="+p.get("p5")+",contentType="+session.getProperties().getString("mediaType"));
+               }
+               @Override /* Serializer */
+               public ObjectMap getResponseHeaders(ObjectMap properties) {
+                       if (properties.containsKey("Override-Content-Type"))
+                               return new ObjectMap().append("Content-Type", 
properties.get("Override-Content-Type"));
+                       return null;
+               }
+       }
+
+       @Override /* RestServlet */
+       protected void onPostCall(RestRequest req, RestResponse res) {
+               ObjectMap properties = req.getProperties();
+               properties.put("p2", "xp2");
+               properties.put("p4", "xp4");
+               properties.put("p5", "xp5"); // New property
+               String overrideAccept = req.getHeader("Override-Accept");
+               if (overrideAccept != null)
+                       req.setHeader("Accept", overrideAccept);
+               String overrideContentType = 
req.getHeader("Override-Content-Type");
+               if (overrideContentType != null)
+                       properties.put("Override-Content-Type", 
overrideContentType);
+       }
+
+
+       
//====================================================================================================
+       // Test1 - Properties overridden via properties annotation.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testPropertiesOverridenByAnnotation",
+               properties={
+                       @Property(name="p3",value="mp3"),
+                       @Property(name="p4",value="mp4")
+               },
+               defaultRequestHeaders="Accept: text/s2"
+       )
+       public String testPropertiesOverridenByAnnotation() {
+               return "";
+       }
+
+       
//====================================================================================================
+       // Test2 - Properties overridden programmatically.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testPropertiesOverriddenProgramatically")
+       public String testPropertiesOverriddenProgramatically(RestRequest req, 
@Properties ObjectMap properties) throws Exception {
+               properties.put("p3", "pp3");
+               properties.put("p4", "pp4");
+               String accept = req.getHeader("Accept");
+               if (accept == null || accept.isEmpty())
+                       req.setHeader("Accept", "text/s2");
+               return "";
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/OnPreCallResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/OnPreCallResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OnPreCallResource.java
new file mode 100755
index 0000000..62a0bdc
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OnPreCallResource.java
@@ -0,0 +1,84 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.plaintext.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ * Validates that headers
+ */
+@RestResource(
+       path="/testOnPreCall",
+       parsers=OnPreCallResource.TestParserA.class,
+       serializers=PlainTextSerializer.class,
+       properties={
+               @Property(name="p1",value="sp1"), // Unchanged servlet-level 
property.
+               @Property(name="p2",value="sp2"), // Servlet-level property 
overridden by onPreCall.
+               @Property(name="p3",value="sp3"), // Servlet-level property 
overridded by method.
+               @Property(name="p4",value="sp4")  // Servlet-level property 
overridden by method then onPreCall.
+       }
+)
+public class OnPreCallResource extends RestServlet {
+       private static final long serialVersionUID = 1L;
+
+       @Consumes({"text/a1","text/a2","text/a3"})
+       public static class TestParserA extends ReaderParser {
+               @SuppressWarnings("unchecked")
+               @Override /* Parser */
+               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
+                       ObjectMap p = session.getProperties();
+                       String matchingContentType = 
session.getProperties().getString("mediaType");
+                       return 
(T)("p1="+p.get("p1")+",p2="+p.get("p2")+",p3="+p.get("p3")+",p4="+p.get("p4")+",p5="+p.get("p5")+",contentType="+matchingContentType);
+               }
+       }
+
+       @Override /* RestServlet */
+       protected void onPreCall(RestRequest req) {
+               ObjectMap properties = req.getProperties();
+               properties.put("p2", "xp2");
+               properties.put("p4", "xp4");
+               properties.put("p5", "xp5"); // New property
+               String overrideContentType = 
req.getHeader("Override-Content-Type");
+               if (overrideContentType != null)
+                       req.setHeader("Content-Type", overrideContentType);
+       }
+
+
+       
//====================================================================================================
+       // Properties overridden via properties annotation.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testPropertiesOverriddenByAnnotation",
+               properties={
+                       @Property(name="p3",value="mp3"),
+                       @Property(name="p4",value="mp4")
+               }
+       )
+       public String testPropertiesOverriddenByAnnotation(@Content String in) {
+               return in;
+       }
+
+       
//====================================================================================================
+       // Properties overridden programmatically.
+       
//====================================================================================================
+       @RestMethod(name="PUT", 
path="/testPropertiesOverriddenProgrammatically")
+       public String testPropertiesOverriddenProgrammatically(RestRequest req, 
@Properties ObjectMap properties) throws Exception {
+               properties.put("p3", "pp3");
+               properties.put("p4", "pp4");
+               return req.getInput(String.class);
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/OptionsWithoutNlsResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/OptionsWithoutNlsResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OptionsWithoutNlsResource.java
new file mode 100755
index 0000000..8cff70c
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OptionsWithoutNlsResource.java
@@ -0,0 +1,43 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.server.annotation.*;
+import org.apache.juneau.server.labels.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testOptionsWithoutNls"
+)
+public class OptionsWithoutNlsResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Should get to the options page without errors
+       
//====================================================================================================
+       @RestMethod(name="OPTIONS", path="/testOptions/*")
+       public ResourceOptions testOptions(RestRequest req) {
+               return new ResourceOptions(this, req);
+       }
+
+       
//====================================================================================================
+       // Missing resource bundle should cause {!!x} string.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testMissingResourceBundle")
+       public String test(RestRequest req) {
+               return req.getMessage("bad", 1, 2, 3);
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/OverlappingMethodsResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/OverlappingMethodsResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OverlappingMethodsResource.java
new file mode 100755
index 0000000..1da85c4
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/OverlappingMethodsResource.java
@@ -0,0 +1,145 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.plaintext.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testOverlappingMethods",
+       serializers=PlainTextSerializer.class
+)
+public class OverlappingMethodsResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Overlapping guards
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testOverlappingGuards1", 
guards=Test1Guard.class)
+       public String testOverlappingGuards1() {
+               return "test1_doGet";
+       }
+
+       
//====================================================================================================
+       // Overlapping guards
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testOverlappingGuards2", 
guards={Test1Guard.class, Test2Guard.class})
+       public String testOverlappingGuards2() {
+               return "test2_doGet";
+       }
+
+       public static class Test1Guard extends RestGuard {
+               @Override /* RestGuard */
+               public boolean isRequestAllowed(RestRequest req) {
+                       return req.getParameter("t1","").equals("1");
+               }
+       }
+
+       public static class Test2Guard extends RestGuard {
+               @Override /* RestGuard */
+               public boolean isRequestAllowed(RestRequest req) {
+                       return req.getParameter("t2","").equals("2");
+               }
+       }
+
+       
//====================================================================================================
+       // Overlapping matchers
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testOverlappingMatchers1", 
matchers=Test3aMatcher.class)
+       public String testOverlappingMatchers1() {
+               return "test3a";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingMatchers1", 
matchers=Test3bMatcher.class)
+       public String test3b_doGet() {
+               return "test3b";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingMatchers1")
+       public String test3c_doGet() {
+               return "test3c";
+       }
+
+       public static class Test3aMatcher extends RestMatcher {
+               @Override /* RestMatcher */
+               public boolean matches(RestRequest req) {
+                       return req.getParameter("t1","").equals("1");
+               }
+       }
+
+       public static class Test3bMatcher extends RestMatcher {
+               @Override /* RestMatcher */
+               public boolean matches(RestRequest req) {
+                       return req.getParameter("t2","").equals("2");
+               }
+       }
+
+       
//====================================================================================================
+       // Overlapping matchers
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testOverlappingMatchers2")
+       public String test4a_doGet() {
+               return "test4a";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingMatchers2", 
matchers={Test3aMatcher.class, Test3bMatcher.class})
+       public String test4b_doGet() {
+               return "test4b";
+       }
+
+       
//====================================================================================================
+       // Overlapping URL patterns
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns")
+       public String testOverlappingUrlPatterns1() {
+               return "test5a";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/*")
+       public String testOverlappingUrlPatterns2() {
+               return "test5b";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/foo")
+       public String testOverlappingUrlPatterns3() {
+               return "test5c";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/foo/*")
+       public String testOverlappingUrlPatterns4() {
+               return "test5d";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/{id}")
+       public String testOverlappingUrlPatterns5() {
+               return "test5e";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/{id}/*")
+       public String testOverlappingUrlPatterns6() {
+               return "test5f";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/{id}/foo")
+       public String testOverlappingUrlPatterns7() {
+               return "test5g";
+       }
+
+       @RestMethod(name="GET", path="/testOverlappingUrlPatterns/{id}/foo/*")
+       public String testOverlappingUrlPatterns8() {
+               return "test5h";
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/ParamsResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/ParamsResource.java 
b/juneau-server-test/src/main/java/org/apache/juneau/server/ParamsResource.java
new file mode 100755
index 0000000..d195704
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/ParamsResource.java
@@ -0,0 +1,292 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import static org.apache.juneau.server.RestServletContext.*;
+import static org.apache.juneau.urlencoding.UrlEncodingContext.*;
+
+import java.util.*;
+
+import javax.servlet.http.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.plaintext.*;
+import org.apache.juneau.samples.addressbook.*;
+import org.apache.juneau.server.annotation.*;
+import org.apache.juneau.transforms.*;
+import org.apache.juneau.urlencoding.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testParams",
+       serializers=PlainTextSerializer.class,
+       properties={
+               @Property(name=REST_allowMethodParam, value="*")
+       }
+)
+public class ParamsResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Basic tests
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/")
+       public void doGet(RestResponse res) {
+               res.setOutput("GET");
+       }
+
+       @RestMethod(name="GET", path="/get1")
+       public String doGet1() {
+               return "GET /get1";
+       }
+
+       @RestMethod(name="GET", path="/get1/{foo}")
+       public void doGet1a(RestResponse res, String foo) {
+               res.setOutput("GET /get1a " + foo);
+       }
+
+       @RestMethod(name="GET", path="/get1/{foo}/{bar}")
+       public void doGet1b(RestResponse res, String foo, String bar) {
+               res.setOutput("GET /get1b " + foo + "," + bar);
+       }
+
+       @RestMethod(name="GET", path="/get3/{foo}/{bar}/*")
+       public void doGet3(HttpServletRequest reqx, HttpServletResponse resx, 
String foo, int bar) {
+               RestRequest req = (RestRequest)reqx;
+               RestResponse res = (RestResponse)resx;
+               res.setOutput("GET /get3/"+foo+"/"+bar+" 
remainder="+req.getPathRemainder());
+       }
+
+       // Test method name with overlapping name, remainder allowed.
+       @RestMethod(name="GET2")
+       public void get2(RestRequest req, RestResponse res) {
+               res.setOutput("GET2 remainder="+req.getPathRemainder());
+       }
+
+       // Default POST
+       @RestMethod(name="POST")
+       public void doPost(RestRequest req, RestResponse res) {
+               res.setOutput("POST remainder="+req.getPathRemainder());
+       }
+
+       // Bean parameter
+       @RestMethod(name="POST", path="/person/{person}")
+       public void doPost(RestRequest req, RestResponse res, Person p) {
+               res.setOutput("POST 
/person/{name="+p.name+",birthDate.year="+p.birthDate.get(Calendar.YEAR)+"} 
remainder="+req.getPathRemainder());
+       }
+
+       // Various primitive types
+       @RestMethod(name="PUT", 
path="/primitives/{xInt}/{xShort}/{xLong}/{xChar}/{xFloat}/{xDouble}/{xByte}/{xBoolean}")
+       public void doPut1(RestResponse res, int xInt, short xShort, long 
xLong, char xChar, float xFloat, double xDouble, byte xByte, boolean xBoolean) {
+               res.setOutput("PUT 
/primitives/"+xInt+"/"+xShort+"/"+xLong+"/"+xChar+"/"+xFloat+"/"+xDouble+"/"+xByte+"/"+xBoolean);
+       }
+
+       // Various primitive objects
+       @RestMethod(name="PUT", 
path="/primitiveObjects/{xInt}/{xShort}/{xLong}/{xChar}/{xFloat}/{xDouble}/{xByte}/{xBoolean}")
+       public void doPut2(RestResponse res, Integer xInt, Short xShort, Long 
xLong, Character xChar, Float xFloat, Double xDouble, Byte xByte, Boolean 
xBoolean) {
+               res.setOutput("PUT 
/primitiveObjects/"+xInt+"/"+xShort+"/"+xLong+"/"+xChar+"/"+xFloat+"/"+xDouble+"/"+xByte+"/"+xBoolean);
+       }
+
+       // Object with forString(String) method
+       @RestMethod(name="PUT", path="/uuid/{uuid}")
+       public void doPut1(RestResponse res, UUID uuid) {
+               res.setOutput("PUT /uuid/"+uuid);
+       }
+
+       @Override /* RestServlet */
+       public Class<?>[] createTransforms() {
+               return new Class[]{CalendarSwap.Medium.class};
+       }
+
+       
//====================================================================================================
+       // @Param annotation - GET
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testParamGet/*")
+       public String testParamGet(RestRequest req, @Param("p1") String p1, 
@Param("p2") int p2) throws Exception {
+               return 
"p1=["+p1+","+req.getParameter("p1")+","+req.getParameter("p1", 
String.class)+"],p2=["+p2+","+req.getParameter("p2")+","+req.getParameter("p2", 
int.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @Param annotation - POST
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testParamPost/*")
+       public String testParamPost(RestRequest req, @Param("p1") String p1, 
@Param("p2") int p2) throws Exception {
+               return 
"p1=["+p1+","+req.getParameter("p1")+","+req.getParameter("p1", 
String.class)+"],p2=["+p2+","+req.getParameter("p2")+","+req.getParameter("p2", 
int.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @QParam annotation - GET
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testQParamGet/*")
+       public String testQParamGet(RestRequest req, @QParam("p1") String p1, 
@QParam("p2") int p2) throws Exception {
+               return 
"p1=["+p1+","+req.getQueryParameter("p1")+","+req.getQueryParameter("p1", 
String.class)+"],p2=["+p2+","+req.getQueryParameter("p2")+","+req.getQueryParameter("p2",
 int.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @QParam annotation - POST
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testQParamPost/*")
+       public String testQParamPost(RestRequest req, @QParam("p1") String p1, 
@QParam("p2") int p2) throws Exception {
+               return 
"p1=["+p1+","+req.getQueryParameter("p1")+","+req.getQueryParameter("p1", 
String.class)+"],p2=["+p2+","+req.getQueryParameter("p2")+","+req.getQueryParameter("p2",
 int.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @Param(format=PLAIN) annotation - GET
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testPlainParamGet/*")
+       public String testPlainParamGet(RestRequest req, 
@Param(value="p1",format="PLAIN") String p1) throws Exception {
+               return 
"p1=["+p1+","+req.getParameter("p1")+","+req.getParameter("p1", 
String.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @Param(format=PLAIN) annotation - POST
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testPlainParamPost/*")
+       public String testPlainParamPost(RestRequest req, 
@Param(value="p1",format="PLAIN") String p1) throws Exception {
+               return 
"p1=["+p1+","+req.getParameter("p1")+","+req.getParameter("p1", 
String.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @QParam(format=PLAIN) annotation - GET
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testPlainQParamGet/*")
+       public String testPlainQParamGet(RestRequest req, 
@QParam(value="p1",format="PLAIN") String p1) throws Exception {
+               return 
"p1=["+p1+","+req.getQueryParameter("p1")+","+req.getQueryParameter("p1", 
String.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @QParam(format=PLAIN) annotation - POST
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testPlainQParamPost/*")
+       public String testPlainQParamPost(RestRequest req, 
@QParam(value="p1",format="PLAIN") String p1) throws Exception {
+               return 
"p1=["+p1+","+req.getQueryParameter("p1")+","+req.getQueryParameter("p1", 
String.class)+"]";
+       }
+
+       
//====================================================================================================
+       // @HasParam annotation - GET
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testHasParamGet/*")
+       public String testHasParamGet(RestRequest req, @HasParam("p1") boolean 
p1, @HasParam("p2") Boolean p2) throws Exception {
+               return 
"p1=["+p1+","+req.hasParameter("p1")+"],p2=["+p2+","+req.hasParameter("p2")+"]";
+       }
+
+       
//====================================================================================================
+       // @HasParam annotation - POST
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testHasParamPost/*")
+       public String testHasParamPost(RestRequest req, @HasParam("p1") boolean 
p1, @HasParam("p2") Boolean p2) throws Exception {
+               return 
"p1=["+p1+","+req.hasParameter("p1")+"],p2=["+p2+","+req.hasParameter("p2")+"]";
+       }
+
+       
//====================================================================================================
+       // @HasQParam annotation - GET
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testHasQParamGet/*")
+       public String testHasQParamGet(RestRequest req, @HasQParam("p1") 
boolean p1, @HasQParam("p2") Boolean p2) throws Exception {
+               return 
"p1=["+p1+","+req.hasQueryParameter("p1")+"],p2=["+p2+","+req.hasQueryParameter("p2")+"]";
+       }
+
+       
//====================================================================================================
+       // @HasQParam annotation - POST
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testHasQParamPost/*")
+       public String testHasQParamPost_post(RestRequest req, @HasQParam("p1") 
boolean p1, @HasQParam("p2") Boolean p2) throws Exception {
+               return 
"p1=["+p1+","+req.hasQueryParameter("p1")+"],p2=["+p2+","+req.hasQueryParameter("p2")+"]";
+       }
+
+       
//====================================================================================================
+       // Form POSTS with @Content parameter
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/testFormPostAsContent/*")
+       public String testFormPostAsContent(@Content Test6Bean bean,
+                       @HasQParam("p1") boolean hqp1, @HasQParam("p2") boolean 
hqp2,
+                       @QParam("p1") String qp1, @QParam("p2") int qp2) throws 
Exception {
+               return 
"bean=["+JsonSerializer.DEFAULT_LAX.toString(bean)+"],qp1=["+qp1+"],qp2=["+qp2+"],hqp1=["+hqp1+"],hqp2=["+hqp2+"]";
+       }
+
+       public static class Test6Bean {
+               public String p1;
+               public int p2;
+       }
+
+       
//====================================================================================================
+       // Test @Param and @QParam annotations when using multi-part parameters 
(e.g. &key=val1,&key=val2).
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testMultiPartParams")
+       public String testMultiPartParams(
+                       @QParam(value="p1",multipart=true) String[] p1,
+                       @QParam(value="p2",multipart=true) int[] p2,
+                       @QParam(value="p3",multipart=true) List<String> p3,
+                       @QParam(value="p4",multipart=true) List<Integer> p4,
+                       @Param(value="p5",multipart=true) String[] p5,
+                       @Param(value="p6",multipart=true) int[] p6,
+                       @Param(value="p7",multipart=true) List<String> p7,
+                       @Param(value="p8",multipart=true) List<Integer> p8,
+                       @QParam(value="p9",multipart=true) A[] p9,
+                       @QParam(value="p10",multipart=true) List<A> p10,
+                       @Param(value="p11",multipart=true) A[] p11,
+                       @Param(value="p12",multipart=true) List<A> p12) throws 
Exception {
+               ObjectMap m = new ObjectMap()
+                       .append("p1", p1)
+                       .append("p2", p2)
+                       .append("p3", p3)
+                       .append("p4", p4)
+                       .append("p5", p5)
+                       .append("p6", p6)
+                       .append("p7", p7)
+                       .append("p8", p8)
+                       .append("p9", p9)
+                       .append("p10", p10)
+                       .append("p11", p11)
+                       .append("p12", p12);
+               return JsonSerializer.DEFAULT_LAX.toString(m);
+       }
+
+       public static class A {
+               public String a;
+               public int b;
+               public boolean c;
+       }
+
+       
//====================================================================================================
+       // Test multi-part parameter keys on bean properties of type 
array/Collection (i.e. &key=val1,&key=val2)
+       // using URLENC_expandedParams property.
+       // A simple round-trip test to verify that both serializing and parsing 
works.
+       
//====================================================================================================
+       @RestMethod(name="POST", 
path="/testFormPostsWithMultiParamsUsingProperty",
+               properties={
+                       @Property(name=URLENC_expandedParams, value="true"),
+                       @Property(name=UonSerializerContext.UON_simpleMode, 
value="true")
+               }
+       )
+       public DTO2s.B testFormPostsWithMultiParamsViaProperty(@Content DTO2s.B 
content) throws Exception {
+               return content;
+       }
+
+       
//====================================================================================================
+       // Test multi-part parameter keys on bean properties of type 
array/Collection (i.e. &key=val1,&key=val2)
+       // using @UrlEncoding(expandedParams=true) annotation.
+       // A simple round-trip test to verify that both serializing and parsing 
works.
+       
//====================================================================================================
+       @RestMethod(name="POST", 
path="/testFormPostsWithMultiParamsUsingAnnotation",
+               properties={
+                       @Property(name=UonSerializerContext.UON_simpleMode, 
value="true")
+               }
+       )
+       public DTO2s.C testFormPostsWithMultiParamsUsingAnnotation(@Content 
DTO2s.C content) throws Exception {
+               return content;
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/ParsersResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/ParsersResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/ParsersResource.java
new file mode 100755
index 0000000..1584ece
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/ParsersResource.java
@@ -0,0 +1,111 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import static org.apache.juneau.server.annotation.Inherit.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.plaintext.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ * Validates correct parser is used.
+ */
+@RestResource(
+       path="/testParsers",
+       parsers=ParsersResource.TestParserA.class,
+       serializers=PlainTextSerializer.class
+)
+public class ParsersResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       @Consumes("text/a")
+       public static class TestParserA extends ReaderParser {
+               @SuppressWarnings("unchecked")
+               @Override /* Parser */
+               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
+                       return (T)("text/a - " + 
IOUtils.read(session.getReader()).trim());
+               }
+       }
+
+       
//====================================================================================================
+       // Parser defined on class.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testParserOnClass")
+       public String testParserOnClass(@Content String in) {
+               return in;
+       }
+
+       
//====================================================================================================
+       // Parser defined on method.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testParserOnMethod", 
parsers=TestParserB.class)
+       public String testParserOnMethod(@Content String in) {
+               return in;
+       }
+
+       @Consumes("text/b")
+       public static class TestParserB extends ReaderParser {
+               @SuppressWarnings("unchecked")
+               @Override /* Parser */
+               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
+                       return (T)("text/b - " + 
IOUtils.read(session.getReader()).trim());
+               }
+       }
+
+       
//====================================================================================================
+       // Parser overridden on method.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testParserOverriddenOnMethod", 
parsers={TestParserB.class,TestParserC.class}, parsersInherit=PARSERS)
+       public String testParserOverriddenOnMethod(@Content String in) {
+               return in;
+       }
+
+       @Consumes("text/c")
+       public static class TestParserC extends ReaderParser {
+               @SuppressWarnings("unchecked")
+               @Override /* Parser */
+               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
+                       return (T)("text/c - " + 
IOUtils.read(session.getReader()).trim());
+               }
+       }
+
+       
//====================================================================================================
+       // Parser with different Accept than Content-Type.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testParserWithDifferentMediaTypes", 
parsers={TestParserD.class}, parsersInherit=PARSERS)
+       public String testParserWithDifferentMediaTypes(@Content String in) {
+               return in;
+       }
+
+       @Consumes({"text/a","text/d"})
+       public static class TestParserD extends ReaderParser {
+               @SuppressWarnings("unchecked")
+               @Override /* Parser */
+               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
+                       return (T)("text/d - " + 
IOUtils.read(session.getReader()).trim());
+               }
+       }
+
+       
//====================================================================================================
+       // Check for valid error response.
+       
//====================================================================================================
+       @RestMethod(name="PUT", path="/testValidErrorResponse")
+       public String testValidErrorResponse(@Content String in) {
+               return in;
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/PathResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/PathResource.java 
b/juneau-server-test/src/main/java/org/apache/juneau/server/PathResource.java
new file mode 100755
index 0000000..f7170e5
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/PathResource.java
@@ -0,0 +1,68 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ * Tests the RestServlet.getPath() method.
+ */
+@RestResource(
+       path="/testPath",
+       children={
+               PathResource.TestPath2.class
+       }
+)
+public class PathResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Basic tests
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/")
+       public String doGet() {
+               return getPath();
+       }
+
+       @RestResource(
+               path="/testPath2",
+               children={
+                       PathResource.TestPath3.class
+               }
+       )
+       public static class TestPath2 extends RestServletDefault {
+               private static final long serialVersionUID = 1L;
+               // Basic tests
+               @RestMethod(name="GET", path="/")
+               public String doGet() {
+                       return getPath();
+               }
+       }
+
+       @RestResource(
+               path="/testPath3"
+       )
+       public static class TestPath3a extends RestServletDefault {
+               private static final long serialVersionUID = 1L;
+               // Basic tests
+               @RestMethod(name="GET", path="/")
+               public String doGet() {
+                       return getPath();
+               }
+       }
+
+       public static class TestPath3 extends TestPath3a {
+               private static final long serialVersionUID = 1L;
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/PathsResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/PathsResource.java 
b/juneau-server-test/src/main/java/org/apache/juneau/server/PathsResource.java
new file mode 100755
index 0000000..ec4ebf4
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/PathsResource.java
@@ -0,0 +1,72 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ * Tests the URL-related methods on RestRequest.
+ */
+@RestResource(
+       path="/testPaths",
+       children={
+               PathsResource.A.class
+       }
+)
+public class PathsResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       @RestMethod(name="GET", path="/*")
+       public ObjectMap doGet1(RestRequest req, @PathRemainder String r) {
+               return getPaths(req).append("pathRemainder2", 
r).append("method",1);
+       }
+
+       @RestMethod(name="GET", path="/test2/*")
+       public ObjectMap doGet2(RestRequest req, @PathRemainder String r) {
+               return getPaths(req).append("pathRemainder2", 
r).append("method",2);
+       }
+
+       @RestResource(
+               path="/a"
+       )
+       public static class A extends RestServletDefault {
+               private static final long serialVersionUID = 1L;
+               @RestMethod(name="GET", path="/*")
+               public ObjectMap doGet1(RestRequest req, @PathRemainder String 
r) {
+                       return getPaths(req).append("pathRemainder2", 
r).append("method",3);
+               }
+               @RestMethod(name="GET", path="/test2/*")
+               public ObjectMap doGet2(RestRequest req, @PathRemainder String 
r) {
+                       return getPaths(req).append("pathRemainder2", 
r).append("method",4);
+               }
+       }
+
+       private static ObjectMap getPaths(RestRequest req) {
+               return new ObjectMap()
+                       .append("pathInfo", req.getPathInfo())
+                       .append("pathInfoUndecoded", req.getPathInfoUndecoded())
+                       .append("pathInfoParts", req.getPathInfoParts())
+                       .append("pathRemainder", req.getPathRemainder())
+                       .append("pathRemainderUndecoded", 
req.getPathRemainderUndecoded())
+                       .append("requestURI", req.getRequestURI())
+                       .append("requestParentURI", req.getRequestParentURI())
+                       .append("requestURL", req.getRequestURL())
+                       .append("servletPath", req.getServletPath())
+                       .append("servletURI", req.getServletURI())
+                       .append("servletParentURI", req.getServletParentURI())
+                       .append("relativeServletURI", 
req.getRelativeServletURI());
+
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/PropertiesResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/PropertiesResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/PropertiesResource.java
new file mode 100755
index 0000000..8cf5154
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/PropertiesResource.java
@@ -0,0 +1,89 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import static java.lang.String.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testProperties",
+       properties={
+               @Property(name="A1",value="a1"),
+               @Property(name="A2",value="a2"),
+               @Property(name="foo",value="bar"),
+               @Property(name="bar",value="baz"),
+               @Property(name="R1a",value="$R{requestURI}"),
+               @Property(name="R1b",value="$R{requestParentURI}"),
+               @Property(name="R2",value="$R{foo}"),
+               @Property(name="R3",value="$R{$R{foo}}"),
+               @Property(name="R4",value="$R{A1}"),
+               @Property(name="R5",value="$R{A2}"),
+               @Property(name="R6",value="$R{C}"),
+       }
+)
+public class PropertiesResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Properties defined on method.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testPropertiesDefinedOnMethod",
+               properties={
+                       @Property(name="B1",value="b1"),
+                       @Property(name="B2",value="b2")
+               },
+               serializers=PropertySerializer1.class
+       )
+       public void testPropertiesDefinedOnMethod(RestResponse res) {
+               res.setProperty("A2", "c");
+               res.setProperty("B2", "c");
+               res.setProperty("C", "c");
+               res.setOutput(null);
+       }
+
+       @Produces({"application/json","text/json"})
+       public static class PropertySerializer1 extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object 
output) throws Exception {
+                       ObjectMap p = session.getProperties();
+                       
session.getWriter().write(format("A1=%s,A2=%s,B1=%s,B2=%s,C=%s,R1a=%s,R1b=%s,R2=%s,R3=%s,R4=%s,R5=%s,R6=%s",
+                               p.get("A1"), p.get("A2"), p.get("B1"), 
p.get("B2"), p.get("C"),
+                               p.get("R1a"), p.get("R1b"), p.get("R2"), 
p.get("R3"), p.get("R4"), p.get("R5"), p.get("R6")));
+               }
+       }
+
+       
//====================================================================================================
+       // Make sure attributes/parameters/headers are available through 
ctx.getProperties().
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testProperties/{A}", 
serializers=PropertySerializer2.class)
+       public void testProperties(RestResponse res) {
+               res.setOutput(null);
+       }
+
+       @Produces({"application/json","text/json"})
+       public static class PropertySerializer2 extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object 
output) throws Exception {
+                       ObjectMap p = session.getProperties();
+                       session.getWriter().write(format("A=%s,P=%s,H=%s", 
p.get("A"), p.get("P"), p.get("h")));
+               }
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/RestClient2Resource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/RestClient2Resource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/RestClient2Resource.java
new file mode 100755
index 0000000..d1c3761
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/RestClient2Resource.java
@@ -0,0 +1,35 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import java.io.*;
+
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testRestClient"
+)
+public class RestClient2Resource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Echo response
+       
//====================================================================================================
+       @RestMethod(name="POST", path="/")
+       public Reader test1(RestRequest req) throws Exception {
+               return new StringReader(req.getInputAsString());
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/Root.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/Root.java 
b/juneau-server-test/src/main/java/org/apache/juneau/server/Root.java
index 29d1fc2..46a3596 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/Root.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/Root.java
@@ -19,44 +19,44 @@ import org.apache.juneau.server.labels.*;
 @RestResource(
        path="/",
        children={
-               TestAcceptCharset.class,
-               TestBeanContextProperties.class,
-               TestCallbackStrings.class,
-               TestCharsetEncodings.class,
-               TestClientVersion.class,
-               TestConfig.class,
-               TestContent.class,
-               TestDefaultContentTypes.class,
-               TestErrorConditions.class,
-               TestTransforms.class,
-               TestGroups.class,
-               TestGzip.TestGzipOff.class,
-               TestGzip.TestGzipOn.class,
-               TestInheritance.TestEncoders.class,
-               TestInheritance.TestTransforms.class,
-               TestInheritance.TestParsers.class,
-               TestInheritance.TestProperties.class,
-               TestInheritance.TestSerializers.class,
-               TestLargePojos.class,
-               TestMessages.TestMessages2.class,
-               TestMessages.class,
-               TestNls.class,
-               TestNlsProperty.class,
-               TestNoParserInput.class,
-               TestOnPostCall.class,
-               TestOnPreCall.class,
-               TestOptionsWithoutNls.class,
-               TestOverlappingMethods.class,
-               TestParams.class,
-               TestParsers.class,
-               TestPath.class,
-               TestPaths.class,
-               TestProperties.class,
-               TestRestClient2.class,
-               TestSerializers.class,
-               TestStaticFiles.class,
-               TestUris.class,
-               TestUrlContent.class,
+               AcceptCharsetResource.class,
+               BeanContextPropertiesResource.class,
+               CallbackStringsResource.class,
+               CharsetEncodingsResource.class,
+               ClientVersionResource.class,
+               ConfigResource.class,
+               ContentResource.class,
+               DefaultContentTypesResource.class,
+               ErrorConditionsResource.class,
+               TransformsResource.class,
+               GroupsResource.class,
+               GzipResource.TestGzipOff.class,
+               GzipResource.TestGzipOn.class,
+               InheritanceResource.TestEncoders.class,
+               InheritanceResource.TestTransforms.class,
+               InheritanceResource.TestParsers.class,
+               InheritanceResource.TestProperties.class,
+               InheritanceResource.TestSerializers.class,
+               LargePojosResource.class,
+               MessagesResource.Messages2Resource.class,
+               MessagesResource.class,
+               NlsResource.class,
+               NlsPropertyResource.class,
+               NoParserInputResource.class,
+               OnPostCallResource.class,
+               OnPreCallResource.class,
+               OptionsWithoutNlsResource.class,
+               OverlappingMethodsResource.class,
+               ParamsResource.class,
+               ParsersResource.class,
+               PathResource.class,
+               PathsResource.class,
+               PropertiesResource.class,
+               RestClient2Resource.class,
+               SerializersResource.class,
+               StaticFilesResource.class,
+               UrisResource.class,
+               UrlContentResource.class,
                ShutdownResource.class
        }
 )

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/SerializersResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/SerializersResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/SerializersResource.java
new file mode 100755
index 0000000..61e9ae6
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/SerializersResource.java
@@ -0,0 +1,102 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import static org.apache.juneau.server.annotation.Inherit.*;
+
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testSerializers",
+       serializers=SerializersResource.TestSerializerA.class
+)
+public class SerializersResource extends RestServletDefault {
+       private static final long serialVersionUID = 1L;
+
+       @Produces("text/a")
+       public static class TestSerializerA extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
+                       session.getWriter().write("text/a - " + o);
+               }
+       }
+
+       @Produces("text/b")
+       public static class TestSerializerB extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
+                       session.getWriter().write("text/b - " + o);
+               }
+       }
+
+       
//====================================================================================================
+       // Serializer defined on class.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testSerializerOnClass")
+       public String testSerializerOnClass() {
+               return "test1";
+       }
+
+       
//====================================================================================================
+       // Serializer defined on method.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testSerializerOnMethod", 
serializers=TestSerializerB.class)
+       public String testSerializerOnMethod() {
+               return "test2";
+       }
+
+       
//====================================================================================================
+       // Serializer overridden on method.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testSerializerOverriddenOnMethod", 
serializers={TestSerializerB.class,TestSerializerC.class}, 
serializersInherit=SERIALIZERS)
+       public String testSerializerOverriddenOnMethod() {
+               return "test3";
+       }
+
+       @Produces("text/a")
+       public static class TestSerializerC extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
+                       session.getWriter().write("text/c - " + o);
+               }
+       }
+
+       
//====================================================================================================
+       // Serializer with different Accept than Content-Type.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/testSerializerWithDifferentMediaTypes", 
serializers={TestSerializerD.class}, serializersInherit=SERIALIZERS)
+       public String testSerializerWithDifferentMediaTypes() {
+               return "test4";
+       }
+
+       @Produces(value={"text/a","text/d"},contentType="text/d")
+       public static class TestSerializerD extends WriterSerializer {
+               @Override /* Serializer */
+               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
+                       session.getWriter().write("text/d - " + o);
+               }
+       }
+
+       
//====================================================================================================
+       // Check for valid 406 error response.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/test406")
+       public String test406() {
+               return "test406";
+       }
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/StaticFilesResource.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/StaticFilesResource.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/StaticFilesResource.java
new file mode 100755
index 0000000..8ef1d8f
--- /dev/null
+++ 
b/juneau-server-test/src/main/java/org/apache/juneau/server/StaticFilesResource.java
@@ -0,0 +1,35 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ 
***************************************************************************************************************************/
+package org.apache.juneau.server;
+
+import org.apache.juneau.server.annotation.*;
+
+/**
+ * JUnit automated testcase resource.
+ */
+@RestResource(
+       path="/testStaticFiles",
+       staticFiles="{xdocs:'xdocs'}"
+)
+public class StaticFilesResource extends RestServlet {
+       private static final long serialVersionUID = 1L;
+
+       
//====================================================================================================
+       // Tests the @RestResource(staticFiles) annotation.
+       
//====================================================================================================
+       @RestMethod(name="GET", path="/*")
+       public String testXdocs() {
+               return null;
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestAcceptCharset.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestAcceptCharset.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestAcceptCharset.java
deleted file mode 100755
index 9efa109..0000000
--- 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestAcceptCharset.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import static org.apache.juneau.server.RestServletContext.*;
-
-import java.io.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.plaintext.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.server.annotation.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testAcceptCharset",
-       serializers={PlainTextSerializer.class},
-       properties={
-               // Some versions of Jetty default to ISO8601, so specify UTF-8 
for test consistency.
-               @Property(name=REST_defaultCharset,value="utf-8")
-       }
-)
-public class TestAcceptCharset extends RestServlet {
-       private static final long serialVersionUID = 1L;
-
-       
//====================================================================================================
-       // Test that Q-values are being resolved correctly.
-       
//====================================================================================================
-       @RestMethod(name="GET", path="/testQValues")
-       public String testQValues() {
-               return "foo";
-       }
-
-       
//====================================================================================================
-       // Validate various Accept-Charset variations.
-       
//====================================================================================================
-       @RestMethod(name="PUT", path="/testCharsetOnResponse", 
parsers=TestParser.class, serializers=TestSerializer.class)
-       public String testCharsetOnResponse(@Content String in) {
-               return in;
-       }
-
-       @Consumes("text/plain")
-       public static class TestParser extends InputStreamParser {
-               @SuppressWarnings("unchecked")
-               @Override /* Parser */
-               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
-                       return 
(T)session.getProperties().getString("characterEncoding");
-               }
-       }
-
-       @Produces("text/plain")
-       public static class TestSerializer extends OutputStreamSerializer {
-               @Override /* Serializer */
-               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
-                       Writer w = new 
OutputStreamWriter(session.getOutputStream());
-                       
w.append(o.toString()).append('/').append(session.getProperties().getString("characterEncoding"));
-                       w.flush();
-                       w.close();
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
deleted file mode 100755
index da7abe2..0000000
--- 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import java.io.*;
-import java.util.*;
-
-import org.apache.juneau.server.annotation.*;
-import org.apache.juneau.transforms.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testBeanContext",
-       transforms=DateSwap.ISO8601DTZ.class
-)
-public class TestBeanContextProperties extends RestServletDefault {
-       private static final long serialVersionUID = 1L;
-
-       
//====================================================================================================
-       // Validate that transforms defined on class transform to underlying 
bean context.
-       
//====================================================================================================
-       @RestMethod(name="GET", path="/testClassTransforms/{d1}")
-       public Reader testClassTransforms(@Attr("d1") Date d1, @Param("d2") 
Date d2, @Header("X-D3") Date d3) throws Exception {
-               DateSwap df = DateSwap.ISO8601DTZ.class.newInstance();
-               return new StringReader(
-                       
"d1="+df.swap(d1)+",d2="+df.swap(d2)+",d3="+df.swap(d3)+""
-               );
-       }
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestCallbackStrings.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestCallbackStrings.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestCallbackStrings.java
deleted file mode 100755
index 4527f26..0000000
--- 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestCallbackStrings.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.server.annotation.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testCallback"
-)
-public class TestCallbackStrings extends RestServletDefault {
-       private static final long serialVersionUID = 1L;
-
-       
//====================================================================================================
-       // Test GET
-       
//====================================================================================================
-       @RestMethod(name="GET", path="/")
-       public ObjectMap test1(RestRequest req) throws Exception {
-               return new ObjectMap().append("method","GET").append("headers", 
getFooHeaders(req)).append("content", req.getInputAsString());
-       }
-
-       
//====================================================================================================
-       // Test PUT
-       
//====================================================================================================
-       @RestMethod(name="PUT", path="/")
-       public ObjectMap testCharsetOnResponse(RestRequest req) throws 
Exception {
-               return new ObjectMap().append("method","PUT").append("headers", 
getFooHeaders(req)).append("content", req.getInputAsString());
-       }
-
-       private Map<String,Object> getFooHeaders(RestRequest req) {
-               Map<String,Object> m = new TreeMap<String,Object>();
-               for (Map.Entry<String,Object> e : req.getHeaders().entrySet())
-                       if (e.getKey().startsWith("Foo-"))
-                               m.put(e.getKey(), e.getValue());
-               return m;
-       }
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestCharsetEncodings.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestCharsetEncodings.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestCharsetEncodings.java
deleted file mode 100755
index f95b368..0000000
--- 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestCharsetEncodings.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.server.annotation.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testCharsetEncodings",
-       defaultRequestHeaders={"Accept: text/s", "Content-Type: text/p"},
-       parsers={TestCharsetEncodings.CtParser.class}, 
serializers={TestCharsetEncodings.ASerializer.class}
-)
-public class TestCharsetEncodings extends RestServlet {
-       private static final long serialVersionUID = 1L;
-
-       @Consumes("text/p")
-       public static class CtParser extends ReaderParser {
-               @SuppressWarnings("unchecked")
-               @Override /* Parser */
-               protected <T> T doParse(ParserSession session, ClassMeta<T> 
type) throws Exception {
-                       return (T)IOUtils.read(session.getReader());
-               }
-       }
-
-       @Produces("text/s")
-       public static class ASerializer extends WriterSerializer {
-               @Override /* Serializer */
-               protected void doSerialize(SerializerSession session, Object o) 
throws Exception {
-                       session.getWriter().write(o.toString());
-               }
-       }
-
-       @RestMethod(name="PUT", path="/")
-       public String test1(RestRequest req, @Content String in) {
-               return req.getCharacterEncoding() + "/" + in + "/" + 
req.getCharacterEncoding();
-       }
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestClientVersion.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestClientVersion.java
 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestClientVersion.java
deleted file mode 100644
index 65fec38..0000000
--- 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestClientVersion.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import org.apache.juneau.microservice.*;
-import org.apache.juneau.server.annotation.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testClientVersion",
-       children={
-               TestClientVersion.DefaultHeader.class,
-               TestClientVersion.CustomHeader.class
-       }
-)
-@SuppressWarnings("serial")
-public class TestClientVersion extends Resource {
-
-       @RestResource(
-               path="/defaultHeader"
-       )
-       public static class DefaultHeader extends Resource {
-
-               @RestMethod(name="GET", path="/")
-               public String test0() {
-                       return "no-version";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="[0.0,1.0)")
-               public String test1() {
-                       return "[0.0,1.0)";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="[1.0,1.0]")
-               public String test2() {
-                       return "[1.0,1.0]";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="[1.1,2)")
-               public String test3() {
-                       return "[1.1,2)";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="2")
-               public String test4() {
-                       return "2";
-               }
-       }
-
-       @RestResource(
-               path="/customHeader",
-               clientVersionHeader="Custom-Client-Version"
-       )
-       public static class CustomHeader extends Resource {
-
-               @RestMethod(name="GET", path="/")
-               public String test0() {
-                       return "no-version";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="[0.0,1.0)")
-               public String test1() {
-                       return "[0.0,1.0)";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="[1.0,1.0]")
-               public String test2() {
-                       return "[1.0,1.0]";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="[1.1,2)")
-               public String test3() {
-                       return "[1.1,2)";
-               }
-
-               @RestMethod(name="GET", path="/", clientVersion="2")
-               public String test4() {
-                       return "2";
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestConfig.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestConfig.java 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestConfig.java
deleted file mode 100755
index ceafea0..0000000
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestConfig.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import org.apache.juneau.ini.*;
-import org.apache.juneau.microservice.*;
-import org.apache.juneau.server.annotation.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testConfig"
-)
-@SuppressWarnings("serial")
-public class TestConfig extends Resource {
-
-       @RestMethod(name="GET", path="/")
-       public ConfigFile test1(RestRequest req) {
-               return req.getConfig();
-       }
-
-       @RestMethod(name="GET", path="/{key}/{class}")
-       public Object test2(RestRequest req, @Attr("key") String key, 
@Attr("class") Class<?> c) throws Exception {
-               return req.getConfig().getObject(c, key);
-       }
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/bea31abd/juneau-server-test/src/main/java/org/apache/juneau/server/TestContent.java
----------------------------------------------------------------------
diff --git 
a/juneau-server-test/src/main/java/org/apache/juneau/server/TestContent.java 
b/juneau-server-test/src/main/java/org/apache/juneau/server/TestContent.java
deleted file mode 100755
index 036fb5b..0000000
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestContent.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright 
ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- 
***************************************************************************************************************************/
-package org.apache.juneau.server;
-
-import static org.apache.juneau.server.RestServletContext.*;
-
-import java.util.*;
-
-import org.apache.juneau.server.annotation.*;
-
-/**
- * JUnit automated testcase resource.
- */
-@RestResource(
-       path="/testContent",
-       properties={
-               @Property(name=REST_allowMethodParam, value="*")
-       }
-)
-public class TestContent extends RestServletDefault {
-       private static final long serialVersionUID = 1L;
-
-       
//====================================================================================================
-       // Basic tests
-       
//====================================================================================================
-       @RestMethod(name="POST", path="/boolean")
-       public boolean testBool(@Content boolean b) {
-               return b;
-       }
-
-       @RestMethod(name="POST", path="/Boolean")
-       public Boolean testBoolean(@Content Boolean b) {
-               return b;
-       }
-
-       @RestMethod(name="POST", path="/int")
-       public int testInt(@Content int i) {
-               return i;
-       }
-
-       @RestMethod(name="POST", path="/Integer")
-       public Integer testInteger(@Content Integer i) {
-               return i;
-       }
-
-       @RestMethod(name="POST", path="/float")
-       public float testFloat(@Content float f) {
-               return f;
-       }
-
-       @RestMethod(name="POST", path="/Float")
-       public Float testFloat2(@Content Float f) {
-               return f;
-       }
-
-       @RestMethod(name="POST", path="/Map")
-       public TreeMap<String,String> testMap(@Content TreeMap<String,String> 
m) {
-               return m;
-       }
-
-       @RestMethod(name="POST", path="/B")
-       public DTO2s.B testPojo1(@Content DTO2s.B b) {
-               return b;
-       }
-
-       @RestMethod(name="POST", path="/C")
-       public DTO2s.C testPojo2(@Content DTO2s.C c) {
-               return c;
-       }
-}

Reply via email to