juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Tests.
Date Sun, 20 May 2018 19:00:42 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 24f56cd  Tests.
24f56cd is described below

commit 24f56cd05396c4075b4e755b363d2c86d8a6a91b
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Sun May 20 15:00:12 2018 -0400

    Tests.
---
 .../juneau/rest/test/RequestBeanProxyResource.java |   51 -
 .../java/org/apache/juneau/rest/test/Root.java     |    1 -
 .../rest/test/client/RequestBeanProxyTest.java     | 2163 ++++++++++----------
 .../org/apache/juneau/rest/client/RestCall.java    |    4 +
 .../org/apache/juneau/rest/RequestFormData.java    |    3 +-
 5 files changed, 1091 insertions(+), 1131 deletions(-)

diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/RequestBeanProxyResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/RequestBeanProxyResource.java
deleted file mode 100644
index b56e520..0000000
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/RequestBeanProxyResource.java
+++ /dev/null
@@ -1,51 +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.rest.test;
-
-import static org.apache.juneau.http.HttpMethodName.*;
-
-import java.io.*;
-
-import org.apache.juneau.microservice.*;
-import org.apache.juneau.rest.*;
-import org.apache.juneau.rest.annotation.*;
-
-/**
- * Validates the functionality of <ja>@RequestBeans</ja>.
- */
-@RestResource(
-	path="/testRequestBeanProxy"
-)
-@SuppressWarnings("serial")
-public class RequestBeanProxyResource extends BasicRestServletJena {
-
-	@RestMethod(name=GET, path="/echoQuery")
-	public Reader echoQuery(RestRequest req) throws Exception {
-		return new StringReader(req.getQuery().toString(true));
-	}
-
-	@RestMethod(name=POST, path="/echoFormData")
-	public Reader echoFormData(RestRequest req) throws Exception {
-		return new StringReader(req.getFormData().toString(true));
-	}
-
-	@RestMethod(name=GET, path="/echoHeaders")
-	public Reader echoHeaders(RestRequest req) throws Exception {
-		return new StringReader(req.getHeaders().subset("a,b,c,d,e,f,g,h,i,a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4").toString(true));
-	}
-
-	@RestMethod(name=GET, path="/echoPath/*")
-	public Reader echoPath(RestRequest req) throws Exception {
-		return new StringReader(req.getPathMatch().getRemainder());
-	}
-}
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/Root.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/Root.java
index c02b22d..0482423 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/Root.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/Root.java
@@ -28,7 +28,6 @@ import org.apache.juneau.rest.test.client.*;
 		ConfigResource.class,
 		InterfaceProxyResource.class,
 		LargePojosResource.class,
-		RequestBeanProxyResource.class,
 		RestClientResource.class,
 		ThirdPartyProxyResource.class,
 		ShutdownResource.class,
diff --git a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java
index 7d9da2b..cd602f0 100644
--- a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java
+++ b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java
@@ -12,6 +12,7 @@
 // ***************************************************************************************************************************
 package org.apache.juneau.rest.test.client;
 
+import static org.apache.juneau.http.HttpMethodName.*;
 import static org.apache.juneau.internal.ArrayUtils.*;
 import static org.apache.juneau.internal.StringUtils.*;
 import static org.junit.Assert.*;
@@ -21,1973 +22,1979 @@ import java.util.*;
 
 import org.apache.juneau.annotation.*;
 import org.apache.juneau.httppart.*;
-import org.apache.juneau.plaintext.*;
 import org.apache.juneau.remoteable.*;
+import org.apache.juneau.remoteable.FormData;
+import org.apache.juneau.remoteable.Header;
+import org.apache.juneau.remoteable.Path;
+import org.apache.juneau.remoteable.Query;
+import org.apache.juneau.rest.*;
+import org.apache.juneau.rest.annotation.*;
 import org.apache.juneau.rest.client.*;
-import org.apache.juneau.rest.test.*;
+import org.apache.juneau.rest.mock.*;
+import org.apache.juneau.urlencoding.*;
 import org.apache.juneau.utils.*;
 import org.junit.*;
 import org.junit.runners.*;
 
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public class RequestBeanProxyTest extends RestTestcase {
-
-	private <T> T getProxyPlainText(Class<T> t) {
-		RestClient rc = TestMicroservice.client(PlainTextSerializer.class, PlainTextParser.class).partSerializer(SimpleUonPartSerializer.class).build();
-		addClientToLifecycle(rc);
-		return rc.getRemoteableProxy(t, null);
-	}
-
-	private <T> T getProxyUon(Class<T> t) {
-		RestClient rc = TestMicroservice.client(PlainTextSerializer.class, PlainTextParser.class).partSerializer(UonPartSerializer.class).build();
-		addClientToLifecycle(rc);
-		return rc.getRemoteableProxy(t, null);
-	}
-
-	//-------------------------------------------------------------------------------------------------------------------
+public class RequestBeanProxyTest {
+	
+	//=================================================================================================================
 	// @Query
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void a01_querySimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Query.class).querySimpleValsPlainText(new RequestBean_QuerySimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'true',h:'123'}", r);
-	}
-
-	@Test
-	public void a02_querySimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).querySimpleValsUon(new RequestBean_QuerySimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'\\'true\\'',h:'\\'123\\''}", r);
-	}
-
-	@Test
-	public void a03_querySimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).querySimpleValsX(new RequestBean_QuerySimpleVals());
-		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',e:'xx',g:'xtruex',h:'x123x'}", r);
-	}
-
-	@Test
-	public void a04_queryMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Query.class).queryMapsPlainText(new RequestBean_QueryMaps());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void a05_queryMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryMapsUon(new RequestBean_QueryMaps());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void a06_queryMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryMapsX(new RequestBean_QueryMaps());
-		assertEquals("{a1:'xv1x',a2:'x123x',a4:'xx',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x',c4:'xx'}", r);
-	}
-
-	@Test
-	public void a07_queryNameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Query.class).queryNameValuePairsPlainText(new RequestBean_QueryNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void a08_queryNameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryNameValuePairsUon(new RequestBean_QueryNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void a09_queryNameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryNameValuePairsX(new RequestBean_QueryNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void a10_queryCharSequence() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryCharSequence(new RequestBean_QueryCharSequence());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
-	}
-
-	@Test
-	public void a11_queryReader() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryReader(new RequestBean_QueryReader());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
-	}
-
-	@Test
-	public void a12_queryCollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Query.class).queryCollectionsPlainText(new RequestBean_QueryCollections());
-		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',d:'',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null',h:''}", r);
-	}
-
-	@Test
-	public void a13_queryCollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryCollectionsUon(new RequestBean_QueryCollections());
-		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',d:'@()',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null',h:'@()'}", r);
-	}
-
-	@Test
-	public void a14_queryCollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Query.class).queryCollectionsX(new RequestBean_QueryCollections());
-		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',d:'',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull',h:''}", r);
-	}
-
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_Query {
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String querySimpleValsPlainText(@RequestBean RequestBean_QuerySimpleVals rb);
-
+	//=================================================================================================================
+	
+	@RestResource
+	public static class A {
+		@RestMethod(name=GET, path="/echoQuery")
+		public String echoQuery(RestRequest req) throws Exception {
+			return req.getQuery().toString(true);
+		}
+	}
+	static MockRest a = MockRest.create(A.class);
+
+	//=================================================================================================================
+	// @Query - Simple values
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface A01_Remoteable {
+		
 		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String querySimpleValsUon(@RequestBean RequestBean_QuerySimpleVals rb);
-
+		String normal(@RequestBean A01_BeanImpl rb);
+		
 		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String querySimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_QuerySimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryMapsPlainText(@RequestBean RequestBean_QueryMaps rb);
-
+		String serialized(@RequestBean(serializer=XSerializer.class) A01_BeanImpl rb);
+	}
+	
+	public static interface A01_BeanInterface {
+		@Query String getA();
+		@Query("b") String getX1();
+		@Query(name="c") String getX2();
+		@Query @BeanProperty("d") String getX3();
+		@Query("e") String getX4();
+		@Query("f") String getX5();
+		@Query("g") String getX6();
+		@Query("h") String getX7();
+	}
+	
+	public static class A01_BeanImpl implements A01_BeanInterface {
+		@Override public String getA() { return "a1"; }
+		@Override public String getX1() { return "b1"; }
+		@Override public String getX2() { return "c1"; }
+		@Override public String getX3() { return "d1"; }
+		@Override public String getX4() { return ""; }
+		@Override public String getX5() { return null; }
+		@Override public String getX6() { return "true"; }
+		@Override public String getX7() { return "123"; }
+	}
+
+	static A01_Remoteable a01a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(A01_Remoteable.class, null);
+	static A01_Remoteable a01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(A01_Remoteable.class, null);
+	
+	@Test
+	public void a01a_query_simpleVals_plainText() throws Exception {
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'true',h:'123'}", a01a.normal(new A01_BeanImpl()));
+	}
+	@Test
+	public void a01b_query_simpleVals_uon() throws Exception {
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'\\'true\\'',h:'\\'123\\''}", a01b.normal(new A01_BeanImpl()));
+	}
+	@Test
+	public void a01c_query_simpleVals_x() throws Exception {
+		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',e:'xx',g:'xtruex',h:'x123x'}", a01b.serialized(new A01_BeanImpl()));
+	}
+	
+	//=================================================================================================================
+	// @Query - Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface A02_Remoteable {
+		
 		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryMapsUon(@RequestBean RequestBean_QueryMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryNameValuePairsPlainText(@RequestBean RequestBean_QueryNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryNameValuePairsUon(@RequestBean RequestBean_QueryNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryNameValuePairs rb);
-
+		String normal(@RequestBean A02_Bean rb);
+		
 		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCharSequence(@RequestBean RequestBean_QueryCharSequence rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryReader(@RequestBean RequestBean_QueryReader rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCollectionsPlainText(@RequestBean RequestBean_QueryCollections rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCollectionsUon(@RequestBean RequestBean_QueryCollections rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryCollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) A02_Bean rb);
 	}
-
-	public static interface RequestBean_QuerySimpleVals_Interface {
-
-		@Query
-		String getA();
-
-		@Query("b")
-		String getX1();
-
-		@Query(name="c")
-		String getX2();
-
-		@Query
-		@BeanProperty("d")
-		String getX3();
-
-		@Query("e")
-		String getX4();
-
-		@Query("f")
-		String getX5();
-
-		@Query("g")
-		String getX6();
-
-		@Query("h")
-		String getX7();
-	}
-
-	public static class RequestBean_QuerySimpleVals implements RequestBean_QuerySimpleVals_Interface {
-
-		@Override
-		public String getA() {
-			return "a1";
-		}
-
-		@Override
-		public String getX1() {
-			return "b1";
-		}
-
-		@Override
-		public String getX2() {
-			return "c1";
-		}
-
-		@Override
-		public String getX3() {
-			return "d1";
-		}
-
-		@Override
-		public String getX4() {
-			return "";
-		}
-
-		@Override
-		public String getX5() {
-			return null;
-		}
-
-		@Override
-		public String getX6() {
-			return "true";
-		}
-
-		@Override
-		public String getX7() {
-			return "123";
-		}
-	}
-
-	public static class RequestBean_QueryMaps {
-
+	
+	public static class A02_Bean {
 		@Query
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@Query("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@Query(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@Query("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_QueryNameValuePairs {
+	static A02_Remoteable a02a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(A02_Remoteable.class, null);
+	static A02_Remoteable a02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(A02_Remoteable.class, null);
+	
+	@Test
+	public void a02a_query_maps_plainText() throws Exception {
+		String r = a02a.normal(new A02_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void a02b_query_maps_uon() throws Exception {
+		String r = a02b.normal(new A02_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void a02c_query_maps_x() throws Exception {
+		String r = a02b.serialized(new A02_Bean());
+		assertEquals("{a1:'xv1x',a2:'x123x',a4:'xx',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x',c4:'xx'}", r);
+	}
+	
+	//=================================================================================================================
+	// @Query - NameValuePairs
+	//=================================================================================================================
 
+	@Remoteable(path="/")
+	public static interface A03_Remoteable {
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean A03_Bean rb);
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String serialized(@RequestBean(serializer=XSerializer.class) A03_Bean rb);
+	}
+	
+	public static class A03_Bean {
 		@Query
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@Query("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@Query(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@Query("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_QueryCharSequence {
-
+	static A03_Remoteable a03a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(A03_Remoteable.class, null);
+	static A03_Remoteable a03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(A03_Remoteable.class, null);
+	
+	@Test
+	public void a03a_query_nameValuePairs_plainText() throws Exception {
+		String r = a03a.normal(new A03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void a03b_query_nameValuePairs_on() throws Exception {
+		String r = a03b.normal(new A03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void a03c_query_nameValuePairs_x() throws Exception {
+		String r = a03b.serialized(new A03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	
+	//=================================================================================================================
+	// @Query - CharSequence
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface A04_Remoteable {
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean A04_Bean rb);
+	}
+	
+	public static class A04_Bean {
 		@Query("*")
 		public StringBuilder getA() {
 			return new StringBuilder("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_QueryReader {
+	static A04_Remoteable a04a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(A04_Remoteable.class, null);
+	
+	@Test
+	public void a04a_query_charSequence() throws Exception {
+		String r = a04a.normal(new A04_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+	
+	//=================================================================================================================
+	// @Query - Reader
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface A05_Remoteable {
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean A05_Bean rb);
+	}
 
+	public static class A05_Bean {
 		@Query("*")
 		public Reader getA() {
 			return new StringReader("foo=bar&baz=qux");
 		}
 	}
+	
+	static A05_Remoteable a05a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(A05_Remoteable.class, null);
 
-	public static class RequestBean_QueryCollections {
+	@Test
+	public void a05a_query_reader() throws Exception {
+		String r = a05a.normal(new A05_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+	
+	//=================================================================================================================
+	// @Query - Collections
+	//=================================================================================================================
 
+	@Remoteable(path="/")
+	public static interface A06_Remoteable {
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean A06_Bean rb);
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String serialized(@RequestBean(serializer=XSerializer.class) A06_Bean rb);
+	}
+	
+	public static class A06_Bean {
 		@Query
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Query("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Query(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Query("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@Query("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@Query("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@Query(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@Query("h")
 		public Object[] getX7() {
 			return new Object[]{};
 		}
-
 		@Query("i")
 		public Object[] getX8() {
 			return null;
 		}
 	}
 
-	//-------------------------------------------------------------------------------------------------------------------
-	// @QueryIfNE
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void b01_queryIfNESimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_QueryIfNE.class).querySimpleValsPlainText(new RequestBean_QueryIfNESimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'true',h:'123'}", r);
-	}
-
-	@Test
-	public void b02_queryIfNESimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).querySimpleValsUon(new RequestBean_QueryIfNESimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'\\'true\\'',h:'\\'123\\''}", r);
-	}
-
-	@Test
-	public void b03_queryIfNESimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).querySimpleValsX(new RequestBean_QueryIfNESimpleVals());
-		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',g:'xtruex',h:'x123x'}", r);
-	}
-
-	@Test
-	public void b04_queryIfNEMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_QueryIfNE.class).queryMapsPlainText(new RequestBean_QueryIfNEMaps());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
+	static A06_Remoteable a06a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(A06_Remoteable.class, null);
+	static A06_Remoteable a06b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(A06_Remoteable.class, null);
 
 	@Test
-	public void b05_queryIfNEMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryMapsUon(new RequestBean_QueryIfNEMaps());
-		assertEquals("{a1:'v1',a2:'123',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void b06_queryIfNEMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryMapsX(new RequestBean_QueryIfNEMaps());
-		assertEquals("{a1:'xv1x',a2:'x123x',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x'}", r);
-	}
-
-	@Test
-	public void b07_queryIfNENameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_QueryIfNE.class).queryNameValuePairsPlainText(new RequestBean_QueryIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void b08_queryIfNENameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryNameValuePairsUon(new RequestBean_QueryIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void b09_queryIfNENameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryNameValuePairsX(new RequestBean_QueryIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void b10_queryIfNECharSequence() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryCharSequence(new RequestBean_QueryIfNECharSequence());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
-	}
-
-	@Test
-	public void b11_queryIfNEReader() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryReader(new RequestBean_QueryIfNEReader());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
-	}
-
-	@Test
-	public void b12_queryIfNECollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_QueryIfNE.class).queryCollectionsPlainText(new RequestBean_QueryIfNECollections());
-		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null'}", r);
+	public void a06a_query_collections_plainText() throws Exception {
+		String r = a06a.normal(new A06_Bean());
+		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',d:'',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null',h:''}", r);
 	}
-
 	@Test
-	public void b13_queryIfNECollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryCollectionsUon(new RequestBean_QueryIfNECollections());
-		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null'}", r);
+	public void a06b_query_collections_uon() throws Exception {
+		String r = a06b.normal(new A06_Bean());
+		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',d:'@()',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null',h:'@()'}", r);
 	}
-
 	@Test
-	public void b14_queryIfNECollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_QueryIfNE.class).queryCollectionsX(new RequestBean_QueryIfNECollections());
-		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull'}", r);
+	public void a06c_query_collections_x() throws Exception {
+		String r = a06b.serialized(new A06_Bean());
+		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',d:'',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull',h:''}", r);
 	}
 
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_QueryIfNE {
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String querySimpleValsPlainText(@RequestBean RequestBean_QueryIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String querySimpleValsUon(@RequestBean RequestBean_QueryIfNESimpleVals rb);
-
+	//=================================================================================================================
+	// @QueryIfNE - Simple values
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface B01_Remoteable {
+		
 		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String querySimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryMapsPlainText(@RequestBean RequestBean_QueryIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryMapsUon(@RequestBean RequestBean_QueryIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryNameValuePairsPlainText(@RequestBean RequestBean_QueryIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryNameValuePairsUon(@RequestBean RequestBean_QueryIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCharSequence(@RequestBean RequestBean_QueryIfNECharSequence rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryReader(@RequestBean RequestBean_QueryIfNEReader rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCollectionsPlainText(@RequestBean RequestBean_QueryIfNECollections rb);
-
+		String normal(@RequestBean B01_Bean rb);
+		
 		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCollectionsUon(@RequestBean RequestBean_QueryIfNECollections rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoQuery")
-		String queryCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_QueryIfNECollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) B01_Bean rb);
 	}
 
-	public static class RequestBean_QueryIfNESimpleVals {
-
+	public static class B01_Bean {
 		@QueryIfNE
 		public String getA() {
 			return "a1";
 		}
-
 		@QueryIfNE("b")
 		public String getX1() {
 			return "b1";
 		}
-
 		@QueryIfNE(name="c")
 		public String getX2() {
 			return "c1";
 		}
-
 		@QueryIfNE
 		@BeanProperty("d")
 		public String getX3() {
 			return "d1";
 		}
-
 		@QueryIfNE("e")
 		public String getX4() {
 			return "";
 		}
-
 		@QueryIfNE("f")
 		public String getX5() {
 			return null;
 		}
-
 		@QueryIfNE("g")
 		public String getX6() {
 			return "true";
 		}
-
 		@QueryIfNE("h")
 		public String getX7() {
 			return "123";
 		}
 	}
 
-	public static class RequestBean_QueryIfNEMaps {
+	static B01_Remoteable b01a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(B01_Remoteable.class, null);
+	static B01_Remoteable b01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(B01_Remoteable.class, null);
+
+	@Test
+	public void b01a_queryIfNE_simpleVals_plainText() throws Exception {
+		String r = b01a.normal(new B01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'true',h:'123'}", r);
+	}
+	@Test
+	public void b01b_queryIfNE_simpleVals_uon() throws Exception {
+		String r = b01b.normal(new B01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'\\'true\\'',h:'\\'123\\''}", r);
+	}
+	@Test
+	public void b01c_queryIfNE_simpleVals_x() throws Exception {
+		String r = b01b.serialized(new B01_Bean());
+		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',g:'xtruex',h:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @QueryIfNE - Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface B02_Remoteable {
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean B02_Bean rb);
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String serialized(@RequestBean(serializer=XSerializer.class) B02_Bean rb);
+	}
 
+	public static class B02_Bean {
 		@QueryIfNE
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@QueryIfNE("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@QueryIfNE(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@QueryIfNE("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_QueryIfNENameValuePairs {
+	static B02_Remoteable b02a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(B02_Remoteable.class, null);
+	static B02_Remoteable b02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(B02_Remoteable.class, null);
+
+	@Test
+	public void b02a_queryIfNE_maps_plainText() throws Exception {
+		String r = b02a.normal(new B02_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void b02b_queryIfNE_maps_uon() throws Exception {
+		String r = b02b.normal(new B02_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void b02c_queryIfNE_maps_x() throws Exception {
+		String r = b02b.serialized(new B02_Bean());
+		assertEquals("{a1:'xv1x',a2:'x123x',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @QueryIfNE - NameValuePairs
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface B03_Remoteable {
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean B03_Bean rb);
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String serialized(@RequestBean(serializer=XSerializer.class) B03_Bean rb);
+	}
 
+	public static class B03_Bean {
 		@QueryIfNE
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@QueryIfNE("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@QueryIfNE(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@QueryIfNE("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_QueryIfNECharSequence {
+	static B03_Remoteable b03a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(B03_Remoteable.class, null);
+	static B03_Remoteable b03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(B03_Remoteable.class, null);
+
+	@Test
+	public void b03a_queryIfNE_nameValuePairs_plainText() throws Exception {
+		String r = b03a.normal(new B03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void b03b_queryIfNE_nameValuePairs_uon() throws Exception {
+		String r = b03b.normal(new B03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void b03c_queryIfNE_nameValuePairs_x() throws Exception {
+		String r = b03b.serialized(new B03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+
+	//=================================================================================================================
+	// @QueryIfNE - CharSequence
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface B04_Remoteable {
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean B04_Bean rb);
+	}
 
+	public static class B04_Bean {
 		@QueryIfNE("*")
 		public StringBuilder getA() {
 			return new StringBuilder("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_QueryIfNEReader {
+	static B04_Remoteable b04a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(B04_Remoteable.class, null);
+
+	@Test
+	public void b04a_queryIfNE_charSequence() throws Exception {
+		String r = b04a.normal(new B04_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+
+	//=================================================================================================================
+	// @QueryIfNE - Reader
+	//=================================================================================================================
 
+	@Remoteable(path="/")
+	public static interface B05_Remoteable {
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean B05_Bean rb);
+	}
+
+	public static class B05_Bean {
 		@QueryIfNE("*")
 		public Reader getA() {
 			return new StringReader("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_QueryIfNECollections {
+	static B05_Remoteable b05a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(B05_Remoteable.class, null);
+	static B05_Remoteable b05b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(B05_Remoteable.class, null);
+
+	@Test
+	public void b05a_queryIfNE_reader() throws Exception {
+		String r = b05a.normal(new B05_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+
+	//=================================================================================================================
+	// @QueryIfNE - Collections
+	//=================================================================================================================
 
+	@Remoteable(path="/")
+	public static interface B06_Remoteable {
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String normal(@RequestBean B06_Bean rb);
+		
+		@RemoteMethod(httpMethod="GET", path="/echoQuery")
+		String serialized(@RequestBean(serializer=XSerializer.class) B06_Bean rb);
+	}
+
+	public static class B06_Bean {
 		@QueryIfNE
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@QueryIfNE("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@QueryIfNE(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@QueryIfNE("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@QueryIfNE("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@QueryIfNE("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@QueryIfNE(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@QueryIfNE("h")
 		public Object[] getX7() {
 			return new Object[]{};
 		}
-
 		@QueryIfNE("i")
 		public Object[] getX8() {
 			return null;
 		}
 	}
 
-	//-------------------------------------------------------------------------------------------------------------------
-	// @FormData
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void c01_formDataSimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormData.class).formDataSimpleValsPlainText(new RequestBean_FormDataSimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'true',h:'123'}", r);
-	}
-
-	@Test
-	public void c02_formDataSimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataSimpleValsUon(new RequestBean_FormDataSimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'\\'true\\'',h:'\\'123\\''}", r);
-	}
-
-	@Test
-	public void c03_formDataSimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataSimpleValsX(new RequestBean_FormDataSimpleVals());
-		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',e:'xx',g:'xtruex',h:'x123x'}", r);
-	}
-
-	@Test
-	public void c04_formDataMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormData.class).formDataMapsPlainText(new RequestBean_FormDataMaps());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void c05_formDataMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataMapsUon(new RequestBean_FormDataMaps());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void c06_formDataMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataMapsX(new RequestBean_FormDataMaps());
-		assertEquals("{a1:'xv1x',a2:'x123x',a4:'xx',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x',c4:'xx'}", r);
-	}
-
-	@Test
-	public void c07_formDataNameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormData.class).formDataNameValuePairsPlainText(new RequestBean_FormDataNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void c08_formDataNameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataNameValuePairsUon(new RequestBean_FormDataNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void c09_formDataNameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataNameValuePairsX(new RequestBean_FormDataNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void c10_formDataCharSequence() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataCharSequence(new RequestBean_FormDataCharSequence());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
-	}
+	static B06_Remoteable b06a = RestClient.create().mockHttpConnection(a).build().getRemoteableProxy(B06_Remoteable.class, null);
+	static B06_Remoteable b06b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(a).build().getRemoteableProxy(B06_Remoteable.class, null);
 
 	@Test
-	public void c11_formDataReader() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataReader(new RequestBean_FormDataReader());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
+	public void b06a_queryIfNE_collections_plainText() throws Exception {
+		String r = b06a.normal(new B06_Bean());
+		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null'}", r);
 	}
-
 	@Test
-	public void c12_formDataCollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormData.class).formDataCollectionsPlainText(new RequestBean_FormDataCollections());
-		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',d:'',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null',h:''}", r);
+	public void b06b_queryIfNE_collections_uon() throws Exception {
+		String r = b06b.normal(new B06_Bean());
+		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null'}", r);
 	}
-
 	@Test
-	public void c13_formDataCollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataCollectionsUon(new RequestBean_FormDataCollections());
-		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',d:'@()',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null',h:'@()'}", r);
+	public void b06c_queryIfNE_collections_x() throws Exception {
+		String r = b06b.serialized(new B06_Bean());
+		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull'}", r);
 	}
 
-	@Test
-	public void c14_formDataCollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormData.class).formDataCollectionsX(new RequestBean_FormDataCollections());
-		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',d:'',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull',h:''}", r);
+	//=================================================================================================================
+	// @FormData
+	//=================================================================================================================
+	
+	@RestResource(parsers=UrlEncodingParser.class)
+	public static class C {
+		@RestMethod(name=POST)
+		public String echoFormData(RestRequest req) throws Exception {
+			return req.getFormData().toString(true);
+		}
 	}
+	static MockRest c = MockRest.create(C.class);
+	
+	//=================================================================================================================
+	// @FormData, Simple values
+	//=================================================================================================================
 
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_FormData {
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataSimpleValsPlainText(@RequestBean RequestBean_FormDataSimpleVals rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataSimpleValsUon(@RequestBean RequestBean_FormDataSimpleVals rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataSimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataSimpleVals rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataMapsPlainText(@RequestBean RequestBean_FormDataMaps rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataMapsUon(@RequestBean RequestBean_FormDataMaps rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataMaps rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataNameValuePairsPlainText(@RequestBean RequestBean_FormDataNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataNameValuePairsUon(@RequestBean RequestBean_FormDataNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCharSequence(@RequestBean RequestBean_FormDataCharSequence rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataReader(@RequestBean RequestBean_FormDataReader rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCollectionsPlainText(@RequestBean RequestBean_FormDataCollections rb);
+	@Remoteable(path="/")
+	public static interface C01_Remoteable {
 
 		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCollectionsUon(@RequestBean RequestBean_FormDataCollections rb);
+		String normal(@RequestBean C01_Bean rb);
 
 		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataCollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) C01_Bean rb);
 	}
 
-	public static class RequestBean_FormDataSimpleVals {
-
+	public static class C01_Bean {
 		@FormData
 		public String getA() {
 			return "a1";
 		}
-
 		@FormData("b")
 		public String getX1() {
 			return "b1";
 		}
-
 		@FormData(name="c")
 		public String getX2() {
 			return "c1";
 		}
-
 		@FormData
 		@BeanProperty("d")
 		public String getX3() {
 			return "d1";
 		}
-
 		@FormData("e")
 		public String getX4() {
 			return "";
 		}
-
 		@FormData("f")
 		public String getX5() {
 			return null;
 		}
-
 		@FormData("g")
 		public String getX6() {
 			return "true";
 		}
-
 		@FormData("h")
 		public String getX7() {
 			return "123";
 		}
 	}
 
-	public static class RequestBean_FormDataMaps {
+	static C01_Remoteable c01a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(C01_Remoteable.class, null);
+	static C01_Remoteable c01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(C01_Remoteable.class, null);
+
+	@Test
+	public void c01a_formData_simpleVals_plainText() throws Exception {
+		String r = c01a.normal(new C01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'true',h:'123'}", r);
+	}
+	@Test
+	public void c01b_formData_simpleVals_uon() throws Exception {
+		String r = c01b.normal(new C01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'\\'true\\'',h:'\\'123\\''}", r);
+	}
+	@Test
+	public void c01c_formData_simpleVals_x() throws Exception {
+		String r = c01b.serialized(new C01_Bean());
+		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',e:'xx',g:'xtruex',h:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormData, Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface C02_Remoteable {
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean C02_Bean rb);
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String serialized(@RequestBean(serializer=XSerializer.class) C02_Bean rb);
+	}
 
+	public static class C02_Bean {
 		@FormData
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@FormData("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@FormData(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@FormData("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_FormDataNameValuePairs {
+	static C02_Remoteable c02a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(C02_Remoteable.class, null);
+	static C02_Remoteable c02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(C02_Remoteable.class, null);
+
+	@Test
+	public void c02a_formData_maps_plainText() throws Exception {
+		String r = c02a.normal(new C02_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void c02b_formData_maps_uon() throws Exception {
+		String r = c02b.normal(new C02_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void c02c_formData_maps_x() throws Exception {
+		String r = c02b.serialized(new C02_Bean());
+		assertEquals("{a1:'xv1x',a2:'x123x',a4:'xx',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x',c4:'xx'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormData, NameValuePairs
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface C03_Remoteable {
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean C03_Bean rb);
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String serialized(@RequestBean(serializer=XSerializer.class) C03_Bean rb);
+	}
 
+	public static class C03_Bean {
 		@FormData
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@FormData("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@FormData(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@FormData("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_FormDataCharSequence {
+	static C03_Remoteable c03a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(C03_Remoteable.class, null);
+	static C03_Remoteable c03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(C03_Remoteable.class, null);
+
+	@Test
+	public void c03a_formData_nameValuePairs_plainText() throws Exception {
+		String r = c03a.normal(new C03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void c03b_formData_nameValuePairs_uon() throws Exception {
+		String r = c03b.normal(new C03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void c03c_formData_nameValuePairs_x() throws Exception {
+		String r = c03b.serialized(new C03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+
+	//=================================================================================================================
+	// @FormData, CharSequence
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface C04_Remoteable {
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean C04_Bean rb);
+	}
 
+	public static class C04_Bean {
 		@FormData("*")
 		public StringBuilder getA() {
 			return new StringBuilder("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_FormDataReader {
+	static C04_Remoteable c04a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(C04_Remoteable.class, null);
+
+	@Test
+	public void c04a_formDataCharSequence() throws Exception {
+		String r = c04a.normal(new C04_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormData, Reader
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface C05_Remoteable {
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean C05_Bean rb);
+	}
 
+	public static class C05_Bean {
 		@FormData("*")
 		public Reader getA() {
 			return new StringReader("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_FormDataCollections {
+	static C05_Remoteable c05a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(C05_Remoteable.class, null);
+
+	@Test
+	public void c05a_formDataReader() throws Exception {
+		String r = c05a.normal(new C05_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormData, Collections
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface C06_Remoteable {
 
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean C06_Bean rb);
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String serialized(@RequestBean(serializer=XSerializer.class) C06_Bean rb);
+	}
+
+	public static class C06_Bean {
 		@FormData
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@FormData("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@FormData(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@FormData("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@FormData("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@FormData("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@FormData(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
-			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
-		}
-
-		@FormData("h")
-		public Object[] getX7() {
-			return new Object[]{};
-		}
-
-		@FormData("i")
-		public Object[] getX8() {
-			return null;
-		}
-	}
-
-	//-------------------------------------------------------------------------------------------------------------------
-	// @FormDataIfNE
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void d01_formDataIfNESimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormDataIfNE.class).formDataSimpleValsPlainText(new RequestBean_FormDataIfNESimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'true',h:'123'}", r);
-	}
-
-	@Test
-	public void d02_formDataIfNESimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataSimpleValsUon(new RequestBean_FormDataIfNESimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'\\'true\\'',h:'\\'123\\''}", r);
-	}
-
-	@Test
-	public void d03_formDataIfNESimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataSimpleValsX(new RequestBean_FormDataIfNESimpleVals());
-		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',g:'xtruex',h:'x123x'}", r);
-	}
-
-	@Test
-	public void d04_formDataIfNEMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormDataIfNE.class).formDataMapsPlainText(new RequestBean_FormDataIfNEMaps());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void d05_formDataIfNEMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataMapsUon(new RequestBean_FormDataIfNEMaps());
-		assertEquals("{a1:'v1',a2:'123',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void d06_formDataIfNEMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataMapsX(new RequestBean_FormDataIfNEMaps());
-		assertEquals("{a1:'xv1x',a2:'x123x',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x'}", r);
-	}
-
-	@Test
-	public void d07_formDataIfNENameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormDataIfNE.class).formDataNameValuePairsPlainText(new RequestBean_FormDataIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void d08_formDataIfNENameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataNameValuePairsUon(new RequestBean_FormDataIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void d09_formDataIfNENameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataNameValuePairsX(new RequestBean_FormDataIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void d10_formDataIfNECharSequence() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataCharSequence(new RequestBean_FormDataIfNECharSequence());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
+			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
+		}
+		@FormData("h")
+		public Object[] getX7() {
+			return new Object[]{};
+		}
+		@FormData("i")
+		public Object[] getX8() {
+			return null;
+		}
 	}
 
-	@Test
-	public void d11_formDataIfNEReader() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataReader(new RequestBean_FormDataIfNEReader());
-		assertEquals("{baz:'qux',foo:'bar'}", r);
-	}
+	static C06_Remoteable c06a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(C06_Remoteable.class, null);
+	static C06_Remoteable c06b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(C06_Remoteable.class, null);
 
 	@Test
-	public void d12_formDataIfNECollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_FormDataIfNE.class).formDataCollectionsPlainText(new RequestBean_FormDataIfNECollections());
-		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null'}", r);
+	public void c06a_formData_collections_plainText() throws Exception {
+		String r = c06a.normal(new C06_Bean());
+		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',d:'',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null',h:''}", r);
 	}
-
 	@Test
-	public void d13_formDataIfNECollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataCollectionsUon(new RequestBean_FormDataIfNECollections());
-		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null'}", r);
+	public void c06b_formData_collections_uon() throws Exception {
+		String r = c06b.normal(new C06_Bean());
+		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',d:'@()',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null',h:'@()'}", r);
 	}
-
 	@Test
-	public void d14_formDataIfNECollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_FormDataIfNE.class).formDataCollectionsX(new RequestBean_FormDataIfNECollections());
-		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull'}", r);
+	public void c06c_formData_collections_x() throws Exception {
+		String r = c06b.serialized(new C06_Bean());
+		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',d:'',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull',h:''}", r);
 	}
-
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_FormDataIfNE {
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataSimpleValsPlainText(@RequestBean RequestBean_FormDataIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataSimpleValsUon(@RequestBean RequestBean_FormDataIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataSimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataMapsPlainText(@RequestBean RequestBean_FormDataIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataMapsUon(@RequestBean RequestBean_FormDataIfNEMaps rb);
+	
+	//=================================================================================================================
+	// @FormDataIfNE, Simple values
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface D01_Remoteable {
 
 		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataIfNEMaps rb);
+		String normal(@RequestBean D01_Bean rb);
 
 		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataNameValuePairsPlainText(@RequestBean RequestBean_FormDataIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataNameValuePairsUon(@RequestBean RequestBean_FormDataIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCharSequence(@RequestBean RequestBean_FormDataIfNECharSequence rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataReader(@RequestBean RequestBean_FormDataIfNEReader rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCollectionsPlainText(@RequestBean RequestBean_FormDataIfNECollections rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCollectionsUon(@RequestBean RequestBean_FormDataIfNECollections rb);
-
-		@RemoteMethod(httpMethod="POST", path="/echoFormData")
-		String formDataCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_FormDataIfNECollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) D01_Bean rb);
 	}
 
-	public static class RequestBean_FormDataIfNESimpleVals {
-
+	public static class D01_Bean {
 		@FormDataIfNE
 		public String getA() {
 			return "a1";
 		}
-
 		@FormDataIfNE("b")
 		public String getX1() {
 			return "b1";
 		}
-
 		@FormDataIfNE(name="c")
 		public String getX2() {
 			return "c1";
 		}
-
 		@FormDataIfNE
 		@BeanProperty("d")
 		public String getX3() {
 			return "d1";
 		}
-
 		@FormDataIfNE("e")
 		public String getX4() {
 			return "";
 		}
-
 		@FormDataIfNE("f")
 		public String getX5() {
 			return null;
 		}
-
 		@FormDataIfNE("g")
 		public String getX6() {
 			return "true";
 		}
-
 		@FormDataIfNE("h")
 		public String getX7() {
 			return "123";
 		}
 	}
 
-	public static class RequestBean_FormDataIfNEMaps {
+	static D01_Remoteable d01a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(D01_Remoteable.class, null);
+	static D01_Remoteable d01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(D01_Remoteable.class, null);
+
+	@Test
+	public void d01a_formDataIfNESimpleValsPlainText() throws Exception {
+		String r = d01a.normal(new D01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'true',h:'123'}", r);
+	}
+	@Test
+	public void d01b_formDataIfNESimpleValsUon() throws Exception {
+		String r = d01b.normal(new D01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'\\'true\\'',h:'\\'123\\''}", r);
+	}
+	@Test
+	public void d01c_formDataIfNESimpleValsX() throws Exception {
+		String r = d01b.serialized(new D01_Bean());
+		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',g:'xtruex',h:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormDataIfNE, Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface D02_Remoteable {
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean D02_Bean rb);
 
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String serialized(@RequestBean(serializer=XSerializer.class) D02_Bean rb);
+	}
+	
+	public static class D02_Bean {
 		@FormDataIfNE
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@FormDataIfNE("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@FormDataIfNE(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@FormDataIfNE("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_FormDataIfNENameValuePairs {
+	static D02_Remoteable d02a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(D02_Remoteable.class, null);
+	static D02_Remoteable d02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(D02_Remoteable.class, null);
+
+	@Test
+	public void d02a_formDataIfNE_maps_plainText() throws Exception {
+		String r = d02a.normal(new D02_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void d02b_formDataIfNE_maps_uon() throws Exception {
+		String r = d02b.normal(new D02_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void d02c_formDataIfNE_maps_x() throws Exception {
+		String r = d02b.serialized(new D02_Bean());
+		assertEquals("{a1:'xv1x',a2:'x123x',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormDataIfNE, NameValuePairs
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface D03_Remoteable {
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean D03_Bean rb);
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String serialized(@RequestBean(serializer=XSerializer.class) D03_Bean rb);
+	}
 
+	public static class D03_Bean {
 		@FormDataIfNE
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@FormDataIfNE("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@FormDataIfNE(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@FormDataIfNE("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_FormDataIfNECharSequence {
+	static D03_Remoteable d03a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(D03_Remoteable.class, null);
+	static D03_Remoteable d03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(D03_Remoteable.class, null);
+
+	@Test
+	public void d03a_formDataIfNE_nameValuePairs_plainText() throws Exception {
+		String r = d03a.normal(new D03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void d03b_formDataIfNE_nameValuePairs_uon() throws Exception {
+		String r = d03b.normal(new D03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void d03c_formDataIfNE_nameValuePairs_x() throws Exception {
+		String r = d03b.serialized(new D03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormDataIfNE, CharSequence
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface D04_Remoteable {
 
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean D04_Bean rb);
+	}
+	
+	public static class D04_Bean {
 		@FormDataIfNE("*")
 		public StringBuilder getA() {
 			return new StringBuilder("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_FormDataIfNEReader {
+	static D04_Remoteable d04a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(D04_Remoteable.class, null);
 
+	@Test
+	public void d04a_formDataIfNECharSequence() throws Exception {
+		String r = d04a.normal(new D04_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+
+	//=================================================================================================================
+	// @FormDataIfNE, Reader
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface D05_Remoteable {
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean D05_Bean rb);
+	}
+	
+	public static class D05_Bean {
 		@FormDataIfNE("*")
 		public Reader getA() {
 			return new StringReader("foo=bar&baz=qux");
 		}
 	}
 
-	public static class RequestBean_FormDataIfNECollections {
+	static D05_Remoteable d05a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(D05_Remoteable.class, null);
+
+	@Test
+	public void d05a_formDataIfNEReader() throws Exception {
+		String r = d05a.normal(new D05_Bean());
+		assertEquals("{baz:'qux',foo:'bar'}", r);
+	}
+	
+	//=================================================================================================================
+	// @FormDataIfNE, Collections
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface D06_Remoteable {
+
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String normal(@RequestBean D06_Bean rb);
 
+		@RemoteMethod(httpMethod="POST", path="/echoFormData")
+		String serialized(@RequestBean(serializer=XSerializer.class) D06_Bean rb);
+	}
+	
+	public static class D06_Bean {
 		@FormDataIfNE
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@FormDataIfNE("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@FormDataIfNE(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@FormDataIfNE("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@FormDataIfNE("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@FormDataIfNE("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@FormDataIfNE(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@FormDataIfNE("h")
 		public Object[] getX7() {
 			return new Object[]{};
 		}
-
 		@FormDataIfNE("i")
 		public Object[] getX8() {
 			return null;
 		}
 	}
 
-	//-------------------------------------------------------------------------------------------------------------------
-	// @Header
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void e01_headerSimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Header.class).headerSimpleValsPlainText(new RequestBean_HeaderSimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'true',h:'123'}", r);
-	}
-
-	@Test
-	public void e02_headerSimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerSimpleValsUon(new RequestBean_HeaderSimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'\\'true\\'',h:'\\'123\\''}", r);
-	}
-
-	@Test
-	public void e03_headerSimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerSimpleValsX(new RequestBean_HeaderSimpleVals());
-		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',e:'xx',g:'xtruex',h:'x123x'}", r);
-	}
-
-	@Test
-	public void e04_headerMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Header.class).headerMapsPlainText(new RequestBean_HeaderMaps());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void e05_headerMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerMapsUon(new RequestBean_HeaderMaps());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void e06_headerMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerMapsX(new RequestBean_HeaderMaps());
-		assertEquals("{a1:'xv1x',a2:'x123x',a4:'xx',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x',c4:'xx'}", r);
-	}
-
-	@Test
-	public void e07_headerNameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Header.class).headerNameValuePairsPlainText(new RequestBean_HeaderNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void e08_headerNameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerNameValuePairsUon(new RequestBean_HeaderNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
-
-	@Test
-	public void e09_headerNameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerNameValuePairsX(new RequestBean_HeaderNameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
-	}
+	static D06_Remoteable d06a = RestClient.create().mockHttpConnection(c).build().getRemoteableProxy(D06_Remoteable.class, null);
+	static D06_Remoteable d06b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(c).build().getRemoteableProxy(D06_Remoteable.class, null);
 
 	@Test
-	public void e10_headerCollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Header.class).headerCollectionsPlainText(new RequestBean_HeaderCollections());
-		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',d:'',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null',h:''}", r);
+	public void d06a_formDataIfNE_collections_plainText() throws Exception {
+		String r = d06a.normal(new D06_Bean());
+		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null'}", r);
 	}
-
 	@Test
-	public void e11_headerCollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerCollectionsUon(new RequestBean_HeaderCollections());
-		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',d:'@()',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null',h:'@()'}", r);
+	public void d06b_formDataIfNE_collections_uon() throws Exception {
+		String r = d06b.normal(new D06_Bean());
+		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null'}", r);
 	}
-
 	@Test
-	public void e12_headerCollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Header.class).headerCollectionsX(new RequestBean_HeaderCollections());
-		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',d:'',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull',h:''}", r);
+	public void d06c_formDataIfNE_collections_x() throws Exception {
+		String r = d06b.serialized(new D06_Bean());
+		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull'}", r);
 	}
-
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_Header {
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerSimpleValsPlainText(@RequestBean RequestBean_HeaderSimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerSimpleValsUon(@RequestBean RequestBean_HeaderSimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerSimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderSimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerMapsPlainText(@RequestBean RequestBean_HeaderMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerMapsUon(@RequestBean RequestBean_HeaderMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerNameValuePairsPlainText(@RequestBean RequestBean_HeaderNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerNameValuePairsUon(@RequestBean RequestBean_HeaderNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerCollectionsPlainText(@RequestBean RequestBean_HeaderCollections rb);
+	
+	//=================================================================================================================
+	// @Header
+	//=================================================================================================================
+	
+	@RestResource
+	public static class E {
+		@RestMethod(name=GET)
+		public String echoHeaders(RestRequest req) throws Exception {
+			return req.getHeaders().subset("a,b,c,d,e,f,g,h,i,a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4").toString(true);
+		}
+	}
+	static MockRest e = MockRest.create(E.class);
+	
+	//=================================================================================================================
+	// @Header, Simple values
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface E01_Remoteable {
 
 		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerCollectionsUon(@RequestBean RequestBean_HeaderCollections rb);
+		String normal(@RequestBean E01_Bean rb);
 
 		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderCollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) E01_Bean rb);
 	}
-
-	public static class RequestBean_HeaderSimpleVals {
-
+	
+	public static class E01_Bean {
 		@Header
 		public String getA() {
 			return "a1";
 		}
-
 		@Header("b")
 		public String getX1() {
 			return "b1";
 		}
-
 		@Header(name="c")
 		public String getX2() {
 			return "c1";
 		}
-
 		@Header
 		@BeanProperty("d")
 		public String getX3() {
 			return "d1";
 		}
-
 		@Header("e")
 		public String getX4() {
 			return "";
 		}
-
 		@Header("f")
 		public String getX5() {
 			return null;
 		}
-
 		@Header("g")
 		public String getX6() {
 			return "true";
 		}
-
 		@Header("h")
 		public String getX7() {
 			return "123";
 		}
 	}
 
-	public static class RequestBean_HeaderMaps {
+	static E01_Remoteable e01a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(E01_Remoteable.class, null);
+	static E01_Remoteable e01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(E01_Remoteable.class, null);
+
+	@Test
+	public void e01a_headerSimpleValsPlainText() throws Exception {
+		String r = e01a.normal(new E01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'true',h:'123'}", r);
+	}
+	@Test
+	public void e01b_headerSimpleValsUon() throws Exception {
+		String r = e01b.normal(new E01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',e:'',g:'\\'true\\'',h:'\\'123\\''}", r);
+	}
+	@Test
+	public void e01c_headerSimpleValsX() throws Exception {
+		String r = e01b.serialized(new E01_Bean());
+		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',e:'xx',g:'xtruex',h:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @Header, Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface E02_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String normal(@RequestBean E02_Bean rb);
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String serialized(@RequestBean(serializer=XSerializer.class) E02_Bean rb);
+	}
 
+	public static class E02_Bean {
 		@Header
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@Header("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@Header(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@Header("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_HeaderNameValuePairs {
+	static E02_Remoteable e02a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(E02_Remoteable.class, null);
+	static E02_Remoteable e02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(E02_Remoteable.class, null);
+
+	@Test
+	public void e02a_header_maps_plainText() throws Exception {
+		String r = e02a.normal(new E02_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void e02b_header_maps_uon() throws Exception {
+		String r = e02b.normal(new E02_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void e02c_header_maps_x() throws Exception {
+		String r = e02b.serialized(new E02_Bean());
+		assertEquals("{a1:'xv1x',a2:'x123x',a4:'xx',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x',c4:'xx'}", r);
+	}
+
+	//=================================================================================================================
+	// @Header, NameValuePairs
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface E03_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String normal(@RequestBean E03_Bean rb);
 
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String serialized(@RequestBean(serializer=XSerializer.class) E03_Bean rb);
+	}
+	
+	public static class E03_Bean {
 		@Header
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@Header("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@Header(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@Header("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_HeaderCollections {
+	static E03_Remoteable e03a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(E03_Remoteable.class, null);
+	static E03_Remoteable e03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(E03_Remoteable.class, null);
 
+	@Test
+	public void e03a_header_nameValuePairs_plainText() throws Exception {
+		String r = e03a.normal(new E03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void e03b_header_nameValuePairs_uon() throws Exception {
+		String r = e03b.normal(new E03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+	@Test
+	public void e03c_header_nameValuePairs_x() throws Exception {
+		String r = e03b.serialized(new E03_Bean());
+		assertEquals("{a1:'v1',a2:'123',a4:'',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123',c4:''}", r);
+	}
+
+	//=================================================================================================================
+	// @Header, Collections
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface E04_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String normal(@RequestBean E04_Bean rb);
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String serialized(@RequestBean(serializer=XSerializer.class) E04_Bean rb);
+	}
+	
+	public static class E04_Bean {
 		@Header
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Header("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Header(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Header("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@Header("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@Header("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@Header(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@Header("h")
 		public Object[] getX7() {
 			return new Object[]{};
 		}
-
 		@Header("i")
 		public Object[] getX8() {
 			return null;
 		}
 	}
 
-	//-------------------------------------------------------------------------------------------------------------------
-	// @HeaderIfNE
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void f01_headerIfNESimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_HeaderIfNE.class).headerSimpleValsPlainText(new RequestBean_HeaderIfNESimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'true',h:'123'}", r);
-	}
-
-	@Test
-	public void f02_headerIfNESimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerSimpleValsUon(new RequestBean_HeaderIfNESimpleVals());
-		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'\\'true\\'',h:'\\'123\\''}", r);
-	}
-
-	@Test
-	public void f03_headerIfNESimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerSimpleValsX(new RequestBean_HeaderIfNESimpleVals());
-		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',g:'xtruex',h:'x123x'}", r);
-	}
-
-	@Test
-	public void f04_headerIfNEMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_HeaderIfNE.class).headerMapsPlainText(new RequestBean_HeaderIfNEMaps());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void f05_headerIfNEMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerMapsUon(new RequestBean_HeaderIfNEMaps());
-		assertEquals("{a1:'v1',a2:'123',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void f06_headerIfNEMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerMapsX(new RequestBean_HeaderIfNEMaps());
-		assertEquals("{a1:'xv1x',a2:'x123x',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x'}", r);
-	}
-
-	@Test
-	public void f07_headerIfNENameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_HeaderIfNE.class).headerNameValuePairsPlainText(new RequestBean_HeaderIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void f08_headerIfNENameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerNameValuePairsUon(new RequestBean_HeaderIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
-
-	@Test
-	public void f09_headerIfNENameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerNameValuePairsX(new RequestBean_HeaderIfNENameValuePairs());
-		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
-	}
+	static E04_Remoteable e04a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(E04_Remoteable.class, null);
+	static E04_Remoteable e04b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(E04_Remoteable.class, null);
 
 	@Test
-	public void f10_headerIfNECollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_HeaderIfNE.class).headerCollectionsPlainText(new RequestBean_HeaderIfNECollections());
-		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null'}", r);
+	public void e04a_header_collections_plainText() throws Exception {
+		String r = e04a.normal(new E04_Bean());
+		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',d:'',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null',h:''}", r);
 	}
-
 	@Test
-	public void f11_headerIfNECollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerCollectionsUon(new RequestBean_HeaderIfNECollections());
-		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null'}", r);
+	public void e04b_header_collections_uon() throws Exception {
+		String r = e04b.normal(new E04_Bean());
+		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',d:'@()',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null',h:'@()'}", r);
 	}
-
 	@Test
-	public void f12_headerIfNECollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_HeaderIfNE.class).headerCollectionsX(new RequestBean_HeaderIfNECollections());
-		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull'}", r);
+	public void e04c_header_collections_x() throws Exception {
+		String r = e04b.serialized(new E04_Bean());
+		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',d:'',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull',h:''}", r);
 	}
 
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_HeaderIfNE {
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerSimpleValsPlainText(@RequestBean RequestBean_HeaderIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerSimpleValsUon(@RequestBean RequestBean_HeaderIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerSimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderIfNESimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerMapsPlainText(@RequestBean RequestBean_HeaderIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerMapsUon(@RequestBean RequestBean_HeaderIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderIfNEMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerNameValuePairsPlainText(@RequestBean RequestBean_HeaderIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerNameValuePairsUon(@RequestBean RequestBean_HeaderIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderIfNENameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerCollectionsPlainText(@RequestBean RequestBean_HeaderIfNECollections rb);
+	//=================================================================================================================
+	// @HeaderIfNE, Simple values
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface F01_Remoteable {
 
 		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerCollectionsUon(@RequestBean RequestBean_HeaderIfNECollections rb);
+		String normal(@RequestBean F01_Bean rb);
 
 		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
-		String headerCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_HeaderIfNECollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) F01_Bean rb);
 	}
 
-	public static class RequestBean_HeaderIfNESimpleVals {
-
+	public static class F01_Bean {
 		@HeaderIfNE
 		public String getA() {
 			return "a1";
 		}
-
 		@HeaderIfNE("b")
 		public String getX1() {
 			return "b1";
 		}
-
 		@HeaderIfNE(name="c")
 		public String getX2() {
 			return "c1";
 		}
-
 		@HeaderIfNE
 		@BeanProperty("d")
 		public String getX3() {
 			return "d1";
 		}
-
 		@HeaderIfNE("e")
 		public String getX4() {
 			return "";
 		}
-
 		@HeaderIfNE("f")
 		public String getX5() {
 			return null;
 		}
-
 		@HeaderIfNE("g")
 		public String getX6() {
 			return "true";
 		}
-
 		@HeaderIfNE("h")
 		public String getX7() {
 			return "123";
 		}
 	}
 
-	public static class RequestBean_HeaderIfNEMaps {
+	static F01_Remoteable f01a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(F01_Remoteable.class, null);
+	static F01_Remoteable f01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(F01_Remoteable.class, null);
+
+	@Test
+	public void f01a_headerIfNESimpleValsPlainText() throws Exception {
+		String r = f01a.normal(new F01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'true',h:'123'}", r);
+	}
+	@Test
+	public void f01b_headerIfNESimpleValsUon() throws Exception {
+		String r = f01b.normal(new F01_Bean());
+		assertEquals("{a:'a1',b:'b1',c:'c1',d:'d1',g:'\\'true\\'',h:'\\'123\\''}", r);
+	}
+	@Test
+	public void f01c_headerIfNESimpleValsX() throws Exception {
+		String r = f01b.serialized(new F01_Bean());
+		assertEquals("{a:'xa1x',b:'xb1x',c:'xc1x',d:'xd1x',g:'xtruex',h:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @HeaderIfNE, Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface F02_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String normal(@RequestBean F02_Bean rb);
 
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String serialized(@RequestBean(serializer=XSerializer.class) F02_Bean rb);
+	}
+	
+	public static class F02_Bean {
 		@HeaderIfNE
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@HeaderIfNE("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@HeaderIfNE(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@HeaderIfNE("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_HeaderIfNENameValuePairs {
+	static F02_Remoteable f02a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(F02_Remoteable.class, null);
+	static F02_Remoteable f02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(F02_Remoteable.class, null);
+
+	@Test
+	public void f02a_headerIfNE_maps_plainText() throws Exception {
+		String r = f02a.normal(new F02_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void f02b_headerIfNE_maps_uon() throws Exception {
+		String r = f02b.normal(new F02_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'\\'true\\'',b2:'\\'123\\'',b3:'\\'null\\'',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void f02c_headerIfNE_maps_x() throws Exception {
+		String r = f02b.serialized(new F02_Bean());
+		assertEquals("{a1:'xv1x',a2:'x123x',b1:'xtruex',b2:'x123x',b3:'xnullx',c1:'xv1x',c2:'x123x'}", r);
+	}
+
+	//=================================================================================================================
+	// @HeaderIfNE, NameValuePairs
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface F03_Remoteable {
 
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String normal(@RequestBean F03_Bean rb);
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String serialized(@RequestBean(serializer=XSerializer.class) F03_Bean rb);
+	}
+	
+	public static class F03_Bean {
 		@HeaderIfNE
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@HeaderIfNE("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@HeaderIfNE(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@HeaderIfNE("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_HeaderIfNECollections {
+	static F03_Remoteable f03a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(F03_Remoteable.class, null);
+	static F03_Remoteable f03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(F03_Remoteable.class, null);
+
+	@Test
+	public void f03a_headerIfNE_nameValuePairs_plainText() throws Exception {
+		String r = f03a.normal(new F03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void f03b_headerIfNE_nameValuePairs_uon() throws Exception {
+		String r = f03b.normal(new F03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+	@Test
+	public void f03c_headerIfNE_nameValuePairs_x() throws Exception {
+		String r = f03b.serialized(new F03_Bean());
+		assertEquals("{a1:'v1',a2:'123',b1:'true',b2:'123',b3:'null',c1:'v1',c2:'123'}", r);
+	}
+
+	//=================================================================================================================
+	// @HeaderIfNE, Collections
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface F04_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String normal(@RequestBean F04_Bean rb);
 
+		@RemoteMethod(httpMethod="GET", path="/echoHeaders")
+		String serialized(@RequestBean(serializer=XSerializer.class) F04_Bean rb);
+	}
+	
+	public static class F04_Bean {
 		@HeaderIfNE
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@HeaderIfNE("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@HeaderIfNE(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@HeaderIfNE("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@HeaderIfNE("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@HeaderIfNE("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@HeaderIfNE(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@HeaderIfNE("h")
 		public Object[] getX7() {
 			return new Object[]{};
 		}
-
 		@HeaderIfNE("i")
 		public Object[] getX8() {
 			return null;
 		}
 	}
-
-	//-------------------------------------------------------------------------------------------------------------------
-	// @Path
-	//-------------------------------------------------------------------------------------------------------------------
-
-	@Test
-	public void g01_pathSimpleValsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Path.class).pathSimpleValsPlainText(new RequestBean_PathSimpleVals());
-		assertEquals("a1/b1/c1/d1//null/true/123", r);
-	}
-
-	@Test
-	public void g02_pathSimpleValsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathSimpleValsUon(new RequestBean_PathSimpleVals());
-		assertEquals("a1/b1/c1/d1//null/'true'/'123'", r);
-	}
-
-	@Test
-	public void g03_pathSimpleValsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathSimpleValsX(new RequestBean_PathSimpleVals());
-		assertEquals("xa1x/xb1x/xc1x/xd1x/xx/NULL/xtruex/x123x", r);
-	}
-
-	@Test
-	public void g04_pathMapsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Path.class).pathMapsPlainText(new RequestBean_PathMaps());
-		assertEquals("v1/123/null//true/123/null/v1/123/null/", r);
-	}
-
-	@Test
-	public void g05_pathMapsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathMapsUon(new RequestBean_PathMaps());
-		assertEquals("v1/123/null//'true'/'123'/'null'/v1/123/null/", r);
-	}
-
-	@Test
-	public void g06_pathMapsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathMapsX(new RequestBean_PathMaps());
-		assertEquals("xv1x/x123x/NULL/xx/xtruex/x123x/xnullx/xv1x/x123x/NULL/xx", r);
-	}
-
-	@Test
-	public void g07_pathNameValuePairsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Path.class).pathNameValuePairsPlainText(new RequestBean_PathNameValuePairs());
-		assertEquals("plainText/v1/123/null//true/123/null/v1/123/null/", r);
-	}
+	
+	static F04_Remoteable f04a = RestClient.create().mockHttpConnection(e).build().getRemoteableProxy(F04_Remoteable.class, null);
+	static F04_Remoteable f04b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(e).build().getRemoteableProxy(F04_Remoteable.class, null);
 
 	@Test
-	public void g08_pathNameValuePairsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathNameValuePairsUon(new RequestBean_PathNameValuePairs());
-		assertEquals("v1/'123'/null//'true'/'123'/'null'/v1/'123'/null/", r);
+	public void f04a_headerIfNE_collections_plainText() throws Exception {
+		String r = f04a.normal(new F04_Bean());
+		assertEquals("{a:'foo,,true,123,null,true,123,null',b:'foo,,true,123,null,true,123,null',c:'foo||true|123|null|true|123|null',f:'foo,,true,123,null,true,123,null',g:'foo||true|123|null|true|123|null'}", r);
 	}
-
 	@Test
-	public void g09_pathNameValuePairsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathNameValuePairsX(new RequestBean_PathNameValuePairs());
-		assertEquals("xv1x/x123x/NULL/xx/xtruex/x123x/xnullx/xv1x/x123x/NULL/xx", r);
+	public void f04b_headerIfNE_collections_uon() throws Exception {
+		String r = f04b.normal(new F04_Bean());
+		assertEquals("{a:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',b:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',c:'foo||true|123|null|true|123|null',f:'@(foo,\\'\\',\\'true\\',\\'123\\',\\'null\\',true,123,null)',g:'foo||true|123|null|true|123|null'}", r);
 	}
-
 	@Test
-	public void g10_pathCollectionsPlainText() throws Exception {
-		String r = getProxyPlainText(RequestBeanProxy_Path.class).pathCollectionsPlainText(new RequestBean_PathCollections());
-		assertEquals("foo,,true,123,null,true,123,null/foo,,true,123,null,true,123,null/foo||true|123|null|true|123|null//null/foo,,true,123,null,true,123,null/foo||true|123|null|true|123|null//null", r);
+	public void f04c_headerIfNE_collections_x() throws Exception {
+		String r = f04b.serialized(new F04_Bean());
+		assertEquals("{a:'fooXXtrueX123XnullXtrueX123Xnull',b:'fooXXtrueX123XnullXtrueX123Xnull',c:'fooXXtrueX123XnullXtrueX123Xnull',f:'fooXXtrueX123XnullXtrueX123Xnull',g:'fooXXtrueX123XnullXtrueX123Xnull'}", r);
 	}
 
-	@Test
-	public void g11_pathCollectionsUon() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathCollectionsUon(new RequestBean_PathCollections());
-		assertEquals("@(foo,'','true','123','null',true,123,null)/@(foo,'','true','123','null',true,123,null)/foo||true|123|null|true|123|null/@()/null/@(foo,'','true','123','null',true,123,null)/foo||true|123|null|true|123|null/@()/null", r);
-	}
+	//=================================================================================================================
+	// @Path
+	//=================================================================================================================
 
-	@Test
-	public void g12_pathCollectionsX() throws Exception {
-		String r = getProxyUon(RequestBeanProxy_Path.class).pathCollectionsX(new RequestBean_PathCollections());
-		assertEquals("fooXXtrueX123XnullXtrueX123Xnull/fooXXtrueX123XnullXtrueX123Xnull/fooXXtrueX123XnullXtrueX123Xnull//NULL/fooXXtrueX123XnullXtrueX123Xnull/fooXXtrueX123XnullXtrueX123Xnull//NULL", r);
+	@RestResource
+	public static class G  {
+		@RestMethod(name=GET)
+		public String echoPath(RestRequest req) throws Exception {
+			return req.getPathMatch().getRemainder();
+		}
 	}
-
-	@Remoteable(path="/testRequestBeanProxy")
-	public static interface RequestBeanProxy_Path {
+	static MockRest g = MockRest.create(G.class);
+	
+	//=================================================================================================================
+	// @Path, Simple values
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface G01_Remoteable {
 
 		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}")
-		String pathSimpleValsPlainText(@RequestBean RequestBean_PathSimpleVals rb);
+		String normal(@RequestBean G01_Bean rb);
 
 		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}")
-		String pathSimpleValsUon(@RequestBean RequestBean_PathSimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}")
-		String pathSimpleValsX(@RequestBean(serializer=XSerializer.class) RequestBean_PathSimpleVals rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
-		String pathMapsPlainText(@RequestBean RequestBean_PathMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
-		String pathMapsUon(@RequestBean RequestBean_PathMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
-		String pathMapsX(@RequestBean(serializer=XSerializer.class) RequestBean_PathMaps rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/plainText/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
-		String pathNameValuePairsPlainText(@RequestBean RequestBean_PathNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
-		String pathNameValuePairsUon(@RequestBean RequestBean_PathNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
-		String pathNameValuePairsX(@RequestBean(serializer=XSerializer.class) RequestBean_PathNameValuePairs rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
-		String pathCollectionsPlainText(@RequestBean RequestBean_PathCollections rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
-		String pathCollectionsUon(@RequestBean RequestBean_PathCollections rb);
-
-		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
-		String pathCollectionsX(@RequestBean(serializer=XSerializer.class) RequestBean_PathCollections rb);
+		String serialized(@RequestBean(serializer=XSerializer.class) G01_Bean rb);
 	}
 
-	public static class RequestBean_PathSimpleVals {
-
+	public static class G01_Bean {
 		@Path
 		public String getA() {
 			return "a1";
 		}
-
 		@Path("b")
 		public String getX1() {
 			return "b1";
 		}
-
 		@Path(name="c")
 		public String getX2() {
 			return "c1";
 		}
-
 		@Path
 		@BeanProperty("d")
 		public String getX3() {
 			return "d1";
 		}
-
 		@Path("e")
 		public String getX4() {
 			return "";
 		}
-
 		@Path("f")
 		public String getX5() {
 			return null;
 		}
-
 		@Path("g")
 		public String getX6() {
 			return "true";
 		}
-
 		@Path("h")
 		public String getX7() {
 			return "123";
 		}
 	}
 
-	public static class RequestBean_PathMaps {
+	static G01_Remoteable g01a = RestClient.create().mockHttpConnection(g).build().getRemoteableProxy(G01_Remoteable.class, null);
+	static G01_Remoteable g01b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(g).build().getRemoteableProxy(G01_Remoteable.class, null);
+
+	@Test
+	public void g01a_pathSimpleValsPlainText() throws Exception {
+		String r = g01a.normal(new G01_Bean());
+		assertEquals("echoPath/a1/b1/c1/d1//null/true/123", r);
+	}
+	@Test
+	public void g01b_pathSimpleValsUon() throws Exception {
+		String r = g01b.normal(new G01_Bean());
+		assertEquals("echoPath/a1/b1/c1/d1//null/'true'/'123'", r);
+	}
+	@Test
+	public void g01c_pathSimpleValsX() throws Exception {
+		String r = g01b.serialized(new G01_Bean());
+		assertEquals("echoPath/xa1x/xb1x/xc1x/xd1x/xx/NULL/xtruex/x123x", r);
+	}
+
+	//=================================================================================================================
+	// @Path, Maps
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface G02_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+		String normal(@RequestBean G02_Bean rb);
+
+		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+		String serialized(@RequestBean(serializer=XSerializer.class) G02_Bean rb);
+	}
 
+	public static class G02_Bean {
 		@Path
 		public Map<String,Object> getA() {
 			return new AMap<String,Object>().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@Path("*")
 		public Map<String,Object> getB() {
 			return new AMap<String,Object>().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@Path(name="*")
 		public Map<String,Object> getC() {
 			return new AMap<String,Object>().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@Path("*")
 		public Map<String,Object> getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_PathNameValuePairs {
+	static G02_Remoteable g02a = RestClient.create().mockHttpConnection(g).build().getRemoteableProxy(G02_Remoteable.class, null);
+	static G02_Remoteable g02b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(g).build().getRemoteableProxy(G02_Remoteable.class, null);
+
+	@Test
+	public void g02a_path_maps_plainText() throws Exception {
+		String r = g02a.normal(new G02_Bean());
+		assertEquals("echoPath/v1/123/null//true/123/null/v1/123/null/", r);
+	}
+	@Test
+	public void g02b_path_maps_uon() throws Exception {
+		String r = g02b.normal(new G02_Bean());
+		assertEquals("echoPath/v1/123/null//'true'/'123'/'null'/v1/123/null/", r);
+	}
+	@Test
+	public void g02c_path_maps_x() throws Exception {
+		String r = g02b.serialized(new G02_Bean());
+		assertEquals("echoPath/xv1x/x123x/NULL/xx/xtruex/x123x/xnullx/xv1x/x123x/NULL/xx", r);
+	}
+
+	//=================================================================================================================
+	// @Path, NameValuePairs
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface G03_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+		String normal(@RequestBean G03_Bean rb);
 
+		@RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+		String serialized(@RequestBean(serializer=XSerializer.class) G03_Bean rb);
+	}
+	
+	public static class G03_Bean {
 		@Path
 		public NameValuePairs getA() {
 			return new NameValuePairs().append("a1","v1").append("a2", 123).append("a3", null).append("a4", "");
 		}
-
 		@Path("*")
 		public NameValuePairs getB() {
 			return new NameValuePairs().append("b1","true").append("b2", "123").append("b3", "null");
 		}
-
 		@Path(name="*")
 		public NameValuePairs getC() {
 			return new NameValuePairs().append("c1","v1").append("c2", 123).append("c3", null).append("c4", "");
 		}
-
 		@Path("*")
 		public NameValuePairs getD() {
 			return null;
 		}
 	}
 
-	public static class RequestBean_PathCollections {
+	static G03_Remoteable g03a = RestClient.create().mockHttpConnection(g).build().getRemoteableProxy(G03_Remoteable.class, null);
+	static G03_Remoteable g03b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(g).build().getRemoteableProxy(G03_Remoteable.class, null);
+
+	@Test
+	public void g03a_path_nameValuePairs_plainText() throws Exception {
+		String r = g03a.normal(new G03_Bean());
+		assertEquals("echoPath/v1/123/null//true/123/null/v1/123/null/", r);
+	}
+	@Test
+	public void g03b_path_nameValuePairs_uon() throws Exception {
+		String r = g03b.normal(new G03_Bean());
+		assertEquals("echoPath/v1/'123'/null//'true'/'123'/'null'/v1/'123'/null/", r);
+	}
+	@Test
+	public void g03c_path_nameValuePairs_x() throws Exception {
+		String r = g03b.serialized(new G03_Bean());
+		assertEquals("echoPath/xv1x/x123x/NULL/xx/xtruex/x123x/xnullx/xv1x/x123x/NULL/xx", r);
+	}
+
+	//=================================================================================================================
+	// @Path, Collections 
+	//=================================================================================================================
+	
+	@Remoteable(path="/")
+	public static interface G04_Remoteable {
+
+		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
+		String normal(@RequestBean G04_Bean rb);
 
+		@RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
+		String serialized(@RequestBean(serializer=XSerializer.class) G04_Bean rb);
+	}
+	
+	public static class G04_Bean {
 		@Path
 		public List<Object> getA() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Path("b")
 		public List<Object> getX1() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Path(name="c", serializer=ListSerializer.class)
 		public List<Object> getX2() {
 			return new AList<Object>().append("foo").append("").append("true").append("123").append("null").append(true).append(123).append(null);
 		}
-
 		@Path("d")
 		public List<Object> getX3() {
 			return new AList<Object>();
 		}
-
 		@Path("e")
 		public List<Object> getX4() {
 			return null;
 		}
-
 		@Path("f")
 		public Object[] getX5() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@Path(name="g", serializer=ListSerializer.class)
 		public Object[] getX6() {
 			return new Object[]{"foo", "", "true", "123", "null", true, 123, null};
 		}
-
 		@Path("h")
 		public Object[] getX7() {
 			return new Object[]{};
 		}
-
 		@Path("i")
 		public Object[] getX8() {
 			return null;
 		}
 	}
+	
+	static G04_Remoteable g04a = RestClient.create().mockHttpConnection(g).build().getRemoteableProxy(G04_Remoteable.class, null);
+	static G04_Remoteable g04b = RestClient.create().partSerializer(UonPartSerializer.class).mockHttpConnection(g).build().getRemoteableProxy(G04_Remoteable.class, null);
 
-	//-------------------------------------------------------------------------------------------------------------------
+	@Test
+	public void g04a_path_collections_plainText() throws Exception {
+		String r = g04a.normal(new G04_Bean());
+		assertEquals("echoPath/foo,,true,123,null,true,123,null/foo,,true,123,null,true,123,null/foo||true|123|null|true|123|null//null/foo,,true,123,null,true,123,null/foo||true|123|null|true|123|null//null", r);
+	}
+	@Test
+	public void g04b_path_collections_uon() throws Exception {
+		String r = g04b.normal(new G04_Bean());
+		assertEquals("echoPath/@(foo,'','true','123','null',true,123,null)/@(foo,'','true','123','null',true,123,null)/foo||true|123|null|true|123|null/@()/null/@(foo,'','true','123','null',true,123,null)/foo||true|123|null|true|123|null/@()/null", r);
+	}
+	@Test
+	public void g04c_path_collections_x() throws Exception {
+		String r = g04b.serialized(new G04_Bean());
+		assertEquals("echoPath/fooXXtrueX123XnullXtrueX123Xnull/fooXXtrueX123XnullXtrueX123Xnull/fooXXtrueX123XnullXtrueX123Xnull//NULL/fooXXtrueX123XnullXtrueX123Xnull/fooXXtrueX123XnullXtrueX123Xnull//NULL", r);
+	}
+	
+	//=================================================================================================================
 	// Support classes
-	//-------------------------------------------------------------------------------------------------------------------
+	//=================================================================================================================
 
 	public static class XSerializer implements HttpPartSerializer {
 		@Override
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
index 6cd6579..4a31b43 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
@@ -1497,6 +1497,10 @@ public final class RestCall extends BeanSession implements Closeable {
 					entity = new UrlEncodedFormEntity((NameValuePairs)input);
 				else if (input instanceof HttpEntity)
 					entity = (HttpEntity)input;
+				else if (input instanceof Reader)
+					entity = new StringEntity(IOUtils.read((Reader)input));
+				else if (input instanceof InputStream)
+					entity = new InputStreamEntity((InputStream)input);
 				else if (serializer != null)
 					entity = new RestRequestEntity(input, serializer);
 				else 
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestFormData.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestFormData.java
index 831b5d8..242b60d 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestFormData.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestFormData.java
@@ -509,7 +509,8 @@ public class RequestFormData extends LinkedHashMap<String,String[]> {
 		Map<String,Object> m = (sorted ? new TreeMap<String,Object>() : new LinkedHashMap<String,Object>());
 		for (Map.Entry<String,String[]> e : this.entrySet()) {
 			String[] v = e.getValue();
-			m.put(e.getKey(), v.length == 1 ? v[0] : v);
+			if (v != null)
+				m.put(e.getKey(), v.length == 1 ? v[0] : v);
 		}
 		return JsonSerializer.DEFAULT_LAX.toString(m);
 	}

-- 
To stop receiving notification emails like this one, please contact
jamesbognar@apache.org.

Mime
View raw message