View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.juneau.rest.test.client;
18  
19  import static org.apache.juneau.TestUtils.*;
20  import static org.apache.juneau.commons.utils.CollectionUtils.*;
21  import static org.apache.juneau.http.HttpHeaders.*;
22  import static org.apache.juneau.http.HttpParts.*;
23  import static org.apache.juneau.junit.bct.BctAssertions.*;
24  import static org.apache.juneau.utest.utils.Constants.*;
25  import static org.junit.jupiter.api.Assertions.*;
26  
27  import java.util.*;
28  
29  import org.apache.juneau.*;
30  import org.apache.juneau.annotation.*;
31  import org.apache.juneau.html.*;
32  import org.apache.juneau.http.annotation.*;
33  import org.apache.juneau.http.header.*;
34  import org.apache.juneau.http.part.*;
35  import org.apache.juneau.http.remote.*;
36  import org.apache.juneau.httppart.*;
37  import org.apache.juneau.json.*;
38  import org.apache.juneau.msgpack.*;
39  import org.apache.juneau.parser.*;
40  import org.apache.juneau.rest.mock.*;
41  import org.apache.juneau.serializer.*;
42  import org.apache.juneau.testutils.pojos.*;
43  import org.apache.juneau.uon.*;
44  import org.apache.juneau.urlencoding.*;
45  import org.apache.juneau.xml.*;
46  import org.junit.jupiter.params.*;
47  import org.junit.jupiter.params.provider.*;
48  import org.opentest4j.*;
49  
50  class ThirdPartyProxy_Test extends TestBase {
51  
52  	private static final Input[] INPUT = {
53  		input("Json", JsonSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), JsonParser.DEFAULT),
54  		input("Xml", XmlSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), XmlParser.DEFAULT),
55  		input("Mixed", JsonSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), XmlParser.DEFAULT),
56  		input("Html", HtmlSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), HtmlParser.DEFAULT),
57  		input("MessagePack", MsgPackSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), MsgPackParser.DEFAULT),
58  		input("UrlEncoding", UrlEncodingSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), UrlEncodingParser.DEFAULT),
59  		input("Uon", UonSerializer.DEFAULT.copy().addBeanTypes().addRootType().build(), UonParser.DEFAULT)
60  	};
61  
62  	private static Input input(String label, Serializer serializer, Parser parser) {
63  		return new Input(label, serializer, parser);
64  	}
65  
66  	private static class Input {
67  		ThirdPartyProxy proxy;
68  
69  		Input(String label, Serializer serializer, Parser parser) {
70  			proxy = MockRestClient.create(ThirdPartyProxyResource.class).ignoreErrors().serializer(serializer).parser(parser).partSerializer(UonSerializer.create().addBeanTypes().addRootType().build()).build().getRemote(ThirdPartyProxy.class, null, serializer, parser);
71  		}
72  	}
73  
74  	static Input[] input() {
75  		return INPUT;
76  	}
77  
78  	//-----------------------------------------------------------------------------------------------------------------
79  	// Header tests
80  	//-----------------------------------------------------------------------------------------------------------------
81  
82  	@ParameterizedTest
83  	@MethodSource("input")
84  	void a01_primitiveHeaders(Input input) {
85  		var r = input.proxy.primitiveHeaders(
86  			"foo",
87  			null,
88  			123,
89  			123,
90  			null,
91  			true,
92  			1.0f,
93  			1.0f
94  		);
95  		assertEquals("OK", r);
96  	}
97  
98  	@ParameterizedTest
99  	@MethodSource("input")
100 	void a02_primitiveCollectionHeaders(Input input) {
101 		var r = input.proxy.primitiveCollectionHeaders(
102 			new int[][][]{{{1,2},null},null},
103 			a(a(a(1,null),null),null),
104 			a(a(a("foo",null),null),null),
105 			l(1,null),
106 			l(l(l(1,null),null),null),
107 			l(a(a(a(1,null),null),null),null),
108 			l(new int[][][]{{{1,2},null},null},null),
109 			l("foo","bar",null)
110 		);
111 		assertEquals("OK", r);
112 	}
113 
114 	@ParameterizedTest
115 	@MethodSource("input")
116 	void a03_beanHeaders(Input input) {
117 		var r = input.proxy.beanHeaders(
118 			ABean.get(),
119 			null,
120 			a(a(a(ABean.get(),null),null),null),
121 			l(ABean.get(),null),
122 			l(a(a(a(ABean.get(),null),null),null),null),
123 			m("foo",ABean.get()),
124 			m("foo",l(ABean.get())),
125 			m("foo",l(a(a(a(ABean.get(),null),null),null),null)),
126 			m(1,l(ABean.get()))
127 		);
128 		assertEquals("OK", r);
129 	}
130 
131 	@ParameterizedTest
132 	@MethodSource("input")
133 	void a04_typedBeanHeaders(Input input) {
134 		var r = input.proxy.typedBeanHeaders(
135 			TypedBeanImpl.get(),
136 			null,
137 			a(a(a(TypedBeanImpl.get(),null),null),null),
138 			l(TypedBeanImpl.get(),null),
139 			l(a(a(a(TypedBeanImpl.get(),null),null),null),null),
140 			m("foo",TypedBeanImpl.get()),
141 			m("foo",l((TypedBean)TypedBeanImpl.get())),
142 			m("foo",l(a(a(a(TypedBeanImpl.get(),null),null),null),null)),
143 			m(1,l((TypedBean)TypedBeanImpl.get()))
144 		);
145 		assertEquals("OK", r);
146 	}
147 
148 	@ParameterizedTest
149 	@MethodSource("input")
150 	void a05_swappedObjectHeaders(Input input) {
151 		var r = input.proxy.swappedObjectHeaders(
152 			new SwappedObject(),
153 			a(a(a(new SwappedObject(),null),null),null),
154 			m(new SwappedObject(),new SwappedObject()),
155 			m(new SwappedObject(),a(a(a(new SwappedObject(),null),null),null))
156 		);
157 		assertEquals("OK", r);
158 	}
159 
160 	@ParameterizedTest
161 	@MethodSource("input")
162 	void a06_implicitSwappedObjectHeaders(Input input) {
163 		var r = input.proxy.implicitSwappedObjectHeaders(
164 			new ImplicitSwappedObject(),
165 			a(a(a(new ImplicitSwappedObject(),null),null),null),
166 			m(new ImplicitSwappedObject(),new ImplicitSwappedObject()),
167 			m(new ImplicitSwappedObject(),a(a(a(new ImplicitSwappedObject(),null),null),null))
168 		);
169 		assertEquals("OK", r);
170 	}
171 
172 	@ParameterizedTest
173 	@MethodSource("input")
174 	void a07_enumHeaders(Input input) {
175 		var r = input.proxy.enumHeaders(
176 			TestEnum.TWO,
177 			null,
178 			a(a(a(TestEnum.TWO,null),null),null),
179 			l(TestEnum.TWO,null),
180 			l(l(l(TestEnum.TWO,null),null),null),
181 			l(a(a(a(TestEnum.TWO,null),null),null),null),
182 			m(TestEnum.ONE,TestEnum.TWO),
183 			m(TestEnum.ONE,a(a(a(TestEnum.TWO,null),null),null)),
184 			m(TestEnum.ONE,l(a(a(a(TestEnum.TWO,null),null),null),null))
185 		);
186 		assertEquals("OK", r);
187 	}
188 
189 	@ParameterizedTest
190 	@MethodSource("input")
191 	void a08_mapHeader(Input input) {
192 		var r = input.proxy.mapHeader(
193 			m("a","foo","b","","c",null)
194 		);
195 		assertEquals("OK", r);
196 	}
197 
198 	@ParameterizedTest
199 	@MethodSource("input")
200 	void a09_beanHeader(Input input) {
201 		var r = input.proxy.beanHeader(
202 			new NeBean().init()
203 		);
204 		assertEquals("OK", r);
205 	}
206 
207 	@ParameterizedTest
208 	@MethodSource("input")
209 	void a10_headerList(Input input) {
210 		var r = input.proxy.headerList(
211 			headerList("a","foo","b","","c",null)
212 		);
213 		assertEquals("OK", r);
214 	}
215 
216 	//-----------------------------------------------------------------------------------------------------------------
217 	// Query tests
218 	//-----------------------------------------------------------------------------------------------------------------
219 
220 	@ParameterizedTest
221 	@MethodSource("input")
222 	void b01_primitiveQueries(Input input) {
223 		var r = input.proxy.primitiveQueries(
224 			"foo",
225 			null,
226 			123,
227 			123,
228 			null,
229 			true,
230 			1.0f,
231 			1.0f
232 		);
233 		assertEquals("OK", r);
234 	}
235 
236 	@ParameterizedTest
237 	@MethodSource("input")
238 	void b02_primitiveCollectionQueries(Input input) {
239 		var r = input.proxy.primitiveCollectionQueries(
240 			new int[][][]{{{1,2},null},null},
241 			a(a(a(1,null),null),null),
242 			a(a(a("foo",null),null),null),
243 			l(1,null),
244 			l(l(l(1,null),null),null),
245 			l(a(a(a(1,null),null),null),null),
246 			l(new int[][][]{{{1,2},null},null},null),
247 			l("foo","bar",null)
248 		);
249 		assertEquals("OK", r);
250 	}
251 
252 	@ParameterizedTest
253 	@MethodSource("input")
254 	void b03_beanQueries(Input input) {
255 		var r = input.proxy.beanQueries(
256 			ABean.get(),
257 			null,
258 			a(a(a(ABean.get(),null),null),null),
259 			l(ABean.get(),null),
260 			l(a(a(a(ABean.get(),null),null),null),null),
261 			m("foo",ABean.get()),
262 			m("foo",l(ABean.get())),
263 			m("foo",l(a(a(a(ABean.get(),null),null),null),null)),
264 			m(1,l(ABean.get()))
265 		);
266 		assertEquals("OK", r);
267 	}
268 
269 	@ParameterizedTest
270 	@MethodSource("input")
271 	void b04_typedBeanQueries(Input input) {
272 		var r = input.proxy.typedBeanQueries(
273 			TypedBeanImpl.get(),
274 			null,
275 			a(a(a(TypedBeanImpl.get(),null),null),null),
276 			l(TypedBeanImpl.get(),null),
277 			l(a(a(a(TypedBeanImpl.get(),null),null),null),null),
278 			m("foo",TypedBeanImpl.get()),
279 			m("foo",l((TypedBean)TypedBeanImpl.get())),
280 			m("foo",l(a(a(a(TypedBeanImpl.get(),null),null),null),null)),
281 			m(1,l((TypedBean)TypedBeanImpl.get()))
282 		);
283 		assertEquals("OK", r);
284 	}
285 
286 	@ParameterizedTest
287 	@MethodSource("input")
288 	void b05_swappedObjectQueries(Input input) {
289 		var r = input.proxy.swappedObjectQueries(
290 			new SwappedObject(),
291 			a(a(a(new SwappedObject(),null),null),null),
292 			m(new SwappedObject(),new SwappedObject()),
293 			m(new SwappedObject(),a(a(a(new SwappedObject(),null),null),null))
294 		);
295 		assertEquals("OK", r);
296 	}
297 
298 	@ParameterizedTest
299 	@MethodSource("input")
300 	void b06_implicitSwappedObjectQueries(Input input) {
301 		var r = input.proxy.implicitSwappedObjectQueries(
302 			new ImplicitSwappedObject(),
303 			a(a(a(new ImplicitSwappedObject(),null),null),null),
304 			m(new ImplicitSwappedObject(),new ImplicitSwappedObject()),
305 			m(new ImplicitSwappedObject(),a(a(a(new ImplicitSwappedObject(),null),null),null))
306 		);
307 		assertEquals("OK", r);
308 	}
309 
310 	@ParameterizedTest
311 	@MethodSource("input")
312 	void b07_enumQueries(Input input) {
313 		var r = input.proxy.enumQueries(
314 			TestEnum.TWO,
315 			null,
316 			a(a(a(TestEnum.TWO,null),null),null),
317 			l(TestEnum.TWO,null),
318 			l(l(l(TestEnum.TWO,null),null),null),
319 			l(a(a(a(TestEnum.TWO,null),null),null),null),
320 			m(TestEnum.ONE,TestEnum.TWO),
321 			m(TestEnum.ONE,a(a(a(TestEnum.TWO,null),null),null)),
322 			m(TestEnum.ONE,l(a(a(a(TestEnum.TWO,null),null),null),null))
323 		);
324 		assertEquals("OK", r);
325 	}
326 
327 	@ParameterizedTest
328 	@MethodSource("input")
329 	void b08_stringQuery1(Input input) {
330 		var r = input.proxy.stringQuery1("a=1&b=foo");
331 		assertEquals("OK", r);
332 	}
333 
334 	@ParameterizedTest
335 	@MethodSource("input")
336 	void b09_stringQuery2(Input input) {
337 		var r = input.proxy.stringQuery2("a=1&b=foo");
338 		assertEquals("OK", r);
339 	}
340 
341 	@ParameterizedTest
342 	@MethodSource("input")
343 	void b10_mapQuery(Input input) {
344 		var r = input.proxy.mapQuery(
345 			m("a",1,"b","foo")
346 		);
347 		assertEquals("OK", r);
348 	}
349 
350 	@ParameterizedTest
351 	@MethodSource("input")
352 	void b11_beanQuery(Input input) {
353 		var r = input.proxy.beanQuery(
354 			new NeBean().init()
355 		);
356 		assertEquals("OK", r);
357 	}
358 
359 	@ParameterizedTest
360 	@MethodSource("input")
361 	void b12_partListQuery(Input input) {
362 		var r = input.proxy.partListQuery(
363 			partList("a","foo","b","","c",null)
364 		);
365 		assertEquals("OK", r);
366 	}
367 
368 	//-----------------------------------------------------------------------------------------------------------------
369 	// FormData tests
370 	//-----------------------------------------------------------------------------------------------------------------
371 
372 	@ParameterizedTest
373 	@MethodSource("input")
374 	void c01_primitiveFormData(Input input) {
375 		var r = input.proxy.primitiveFormData(
376 			"foo",
377 			null,
378 			123,
379 			123,
380 			null,
381 			true,
382 			1.0f,
383 			1.0f
384 		);
385 		assertEquals("OK", r);
386 	}
387 
388 	@ParameterizedTest
389 	@MethodSource("input")
390 	void c02_primitiveCollectionFormData(Input input) {
391 		var r = input.proxy.primitiveCollectionFormData(
392 			new int[][][]{{{1,2},null},null},
393 			a(a(a(1,null),null),null),
394 			a(a(a("foo",null),null),null),
395 			l(1,null),
396 			l(l(l(1,null),null),null),
397 			l(a(a(a(1,null),null),null),null),
398 			l(new int[][][]{{{1,2},null},null},null),
399 			l("foo","bar",null)
400 		);
401 		assertEquals("OK", r);
402 	}
403 
404 	@ParameterizedTest
405 	@MethodSource("input")
406 	void c03_beanFormData(Input input) {
407 		var r = input.proxy.beanFormData(
408 			ABean.get(),
409 			null,
410 			a(a(a(ABean.get(),null),null),null),
411 			l(ABean.get(),null),
412 			l(a(a(a(ABean.get(),null),null),null),null),
413 			m("foo",ABean.get()),
414 			m("foo",l(ABean.get())),
415 			m("foo",l(a(a(a(ABean.get(),null),null),null),null)),
416 			m(1,l(ABean.get()))
417 		);
418 		assertEquals("OK", r);
419 	}
420 
421 	@ParameterizedTest
422 	@MethodSource("input")
423 	void c04_typedBeanFormData(Input input) {
424 		var r = input.proxy.typedBeanFormData(
425 			TypedBeanImpl.get(),
426 			null,
427 			a(a(a(TypedBeanImpl.get(),null),null),null),
428 			l(TypedBeanImpl.get(),null),
429 			l(a(a(a(TypedBeanImpl.get(),null),null),null),null),
430 			m("foo",TypedBeanImpl.get()),
431 			m("foo",l((TypedBean)TypedBeanImpl.get())),
432 			m("foo",l(a(a(a(TypedBeanImpl.get(),null),null),null),null)),
433 			m(1,l((TypedBean)TypedBeanImpl.get()))
434 		);
435 		assertEquals("OK", r);
436 	}
437 
438 	@ParameterizedTest
439 	@MethodSource("input")
440 	void c05_swappedObjectFormData(Input input) {
441 		var r = input.proxy.swappedObjectFormData(
442 			new SwappedObject(),
443 			a(a(a(new SwappedObject(),null),null),null),
444 			m(new SwappedObject(),new SwappedObject()),
445 			m(new SwappedObject(),a(a(a(new SwappedObject(),null),null),null))
446 		);
447 		assertEquals("OK", r);
448 	}
449 
450 	@ParameterizedTest
451 	@MethodSource("input")
452 	void c06_implicitSwappedObjectFormData(Input input) {
453 		var r = input.proxy.implicitSwappedObjectFormData(
454 			new ImplicitSwappedObject(),
455 			a(a(a(new ImplicitSwappedObject(),null),null),null),
456 			m(new ImplicitSwappedObject(),new ImplicitSwappedObject()),
457 			m(new ImplicitSwappedObject(),a(a(a(new ImplicitSwappedObject(),null),null),null))
458 		);
459 		assertEquals("OK", r);
460 	}
461 
462 	@ParameterizedTest
463 	@MethodSource("input")
464 	void c07_enumFormData(Input input) {
465 		var r = input.proxy.enumFormData(
466 			TestEnum.TWO,
467 			null,
468 			a(a(a(TestEnum.TWO,null),null),null),
469 			l(TestEnum.TWO,null),
470 			l(l(l(TestEnum.TWO,null),null),null),
471 			l(a(a(a(TestEnum.TWO,null),null),null),null),
472 			m(TestEnum.ONE,TestEnum.TWO),
473 			m(TestEnum.ONE,a(a(a(TestEnum.TWO,null),null),null)),
474 			m(TestEnum.ONE,l(a(a(a(TestEnum.TWO,null),null),null),null))
475 		);
476 		assertEquals("OK", r);
477 	}
478 
479 	@ParameterizedTest
480 	@MethodSource("input")
481 	void c08_mapFormData(Input input) {
482 		var r = input.proxy.mapFormData(
483 			m("a","foo","b","","c",null)
484 		);
485 		assertEquals("OK", r);
486 	}
487 
488 	@ParameterizedTest
489 	@MethodSource("input")
490 	void c09_beanFormData(Input input) {
491 		var r = input.proxy.beanFormData(
492 			new NeBean().init()
493 		);
494 		assertEquals("OK", r);
495 	}
496 
497 	@ParameterizedTest
498 	@MethodSource("input")
499 	void c10_partListFormData(Input input) {
500 		var r = input.proxy.partListFormData(
501 			partList("a","foo","b","","c",null)
502 		);
503 		assertEquals("OK", r);
504 	}
505 
506 	//-----------------------------------------------------------------------------------------------------------------
507 	// Test return types.
508 	//-----------------------------------------------------------------------------------------------------------------
509 
510 	// Various primitives
511 	@ParameterizedTest
512 	@MethodSource("input")
513 	void da01_returnVoid(Input input) {
514 		assertDoesNotThrow(()->input.proxy.returnVoid());
515 	}
516 
517 	@ParameterizedTest
518 	@MethodSource("input")
519 	void da02_returnInteger(Input input) {
520 		assertEquals((Integer)1, input.proxy.returnInteger());
521 	}
522 
523 	@ParameterizedTest
524 	@MethodSource("input")
525 	void da03_returnInt(Input input) {
526 		assertEquals(1, input.proxy.returnInt());
527 	}
528 
529 	@ParameterizedTest
530 	@MethodSource("input")
531 	void da04_returnBoolean(Input input) {
532 		assertEquals(true, input.proxy.returnBoolean());
533 	}
534 
535 	@ParameterizedTest
536 	@MethodSource("input")
537 	void da05_returnFloat(Input input) {
538 		assertEquals(1f, input.proxy.returnFloat(), 0.1f);
539 	}
540 
541 	@ParameterizedTest
542 	@MethodSource("input")
543 	void da06_returnFloatObject(Input input) {
544 		assertEquals(1f, input.proxy.returnFloatObject(), 0.1f);
545 	}
546 
547 	@ParameterizedTest
548 	@MethodSource("input")
549 	void da07_returnString(Input input) {
550 		assertEquals("foobar", input.proxy.returnString());
551 	}
552 
553 	@ParameterizedTest
554 	@MethodSource("input")
555 	void da08_returnNullString(Input input) {
556 		assertNull(input.proxy.returnNullString());
557 	}
558 
559 	@ParameterizedTest
560 	@MethodSource("input")
561 	void da09_returnInt3dArray(Input input) {
562 		assertList(input.proxy.returnInt3dArray(), "[[1,2],<null>]",null);
563 	}
564 
565 	@ParameterizedTest
566 	@MethodSource("input")
567 	void da10_returnInteger3dArray(Input input) {
568 		assertList(input.proxy.returnInteger3dArray(), "[[1,<null>],<null>]",null);
569 	}
570 
571 	@ParameterizedTest
572 	@MethodSource("input")
573 	void da11_returnString3dArray(Input input) {
574 		assertList(input.proxy.returnString3dArray(), "[[foo,bar,<null>],<null>]",null);
575 	}
576 
577 	@ParameterizedTest
578 	@MethodSource("input")
579 	void da12_returnIntegerList(Input input) {
580 		var x = input.proxy.returnIntegerList();
581 		assertList(x, 1, null);
582 		assertInstanceOf(Integer.class, x.get(0));
583 	}
584 
585 	@ParameterizedTest
586 	@MethodSource("input")
587 	void da13_returnInteger3dList(Input input) {
588 		var x = input.proxy.returnInteger3dList();
589 		assertList(x, "[[1,<null>],<null>]",null);
590 		assertInstanceOf(Integer.class, x.get(0).get(0).get(0));
591 	}
592 
593 	@ParameterizedTest
594 	@MethodSource("input")
595 	void da14_returnInteger1d3dList(Input input) {
596 		var x = input.proxy.returnInteger1d3dList();
597 		assertList(x, "[[[1,<null>],<null>],<null>]",null);
598 		assertInstanceOf(Integer.class, x.get(0)[0][0][0]);
599 	}
600 
601 	@ParameterizedTest
602 	@MethodSource("input")
603 	void da15_returnInt1d3dList(Input input) {
604 		var x = input.proxy.returnInt1d3dList();
605 		assertList(x, "[[[1,2],<null>],<null>]",null);
606 		assertInstanceOf(int[][][].class, x.get(0));
607 	}
608 
609 	@ParameterizedTest
610 	@MethodSource("input")
611 	void da16_returnStringList(Input input) {
612 		assertList(input.proxy.returnStringList(), "foo", "bar", null);
613 	}
614 
615 	// Beans
616 
617 	@ParameterizedTest
618 	@MethodSource("input")
619 	void db01_returnBean(Input input) {
620 		var x = input.proxy.returnBean();
621 		assertBean(x, "a,b", "1,foo");
622 		assertInstanceOf(ABean.class, x);
623 	}
624 
625 	@ParameterizedTest
626 	@MethodSource("input")
627 	void db02_returnBean3dArray(Input input) {
628 		var x = input.proxy.returnBean3dArray();
629 		assertList(x, "[[{a:1,b:'foo'},<null>],<null>]",null);
630 		assertInstanceOf(ABean.class, x[0][0][0]);
631 	}
632 
633 	@ParameterizedTest
634 	@MethodSource("input")
635 	void db03_returnBeanList(Input input) {
636 		var x = input.proxy.returnBeanList();
637 		assertList(x, "{a:1,b:'foo'}");
638 		assertInstanceOf(ABean.class, x.get(0));
639 	}
640 
641 	@ParameterizedTest
642 	@MethodSource("input")
643 	void db04_returnBean1d3dList(Input input) {
644 		var x = input.proxy.returnBean1d3dList();
645 		assertList(x, "[[[{a:1,b:'foo'},<null>],<null>],<null>]",null);
646 		assertInstanceOf(ABean.class, x.get(0)[0][0][0]);
647 	}
648 
649 	@ParameterizedTest
650 	@MethodSource("input")
651 	void db05_returnBeanMap(Input input) {
652 		var x = input.proxy.returnBeanMap();
653 		assertBean(x, "foo", "{a:1,b:'foo'}");
654 		assertInstanceOf(ABean.class, x.get("foo"));
655 	}
656 
657 	@ParameterizedTest
658 	@MethodSource("input")
659 	void db06_returnBeanListMap(Input input) {
660 		var x = input.proxy.returnBeanListMap();
661 		assertBean(x, "foo", "[{a:1,b:'foo'}]");
662 		assertInstanceOf(ABean.class, x.get("foo").get(0));
663 	}
664 
665 	@ParameterizedTest
666 	@MethodSource("input")
667 	void db07_returnBean1d3dListMap(Input input) {
668 		var x = input.proxy.returnBean1d3dListMap();
669 		assertBean(x, "foo", "[[[[{a:1,b:'foo'},<null>],<null>],<null>],<null>]");
670 		assertInstanceOf(ABean.class, x.get("foo").get(0)[0][0][0]);
671 	}
672 
673 	@ParameterizedTest
674 	@MethodSource("input")
675 	void db08_returnBeanListMapIntegerKeys(Input input) {
676 		// Note: JsonSerializer serializes key as string.
677 		var x = input.proxy.returnBeanListMapIntegerKeys();
678 		assertList(x, "1=[{a:1,b:'foo'}]");
679 		assertInstanceOf(Integer.class, x.keySet().iterator().next());
680 	}
681 
682 	// Typed beans
683 
684 	@ParameterizedTest
685 	@MethodSource("input")
686 	void dc01_returnTypedBean(Input input) {
687 		var x = input.proxy.returnTypedBean();
688 		assertBean(x, "a,b", "1,foo");
689 		assertInstanceOf(TypedBeanImpl.class, x);
690 	}
691 
692 	@ParameterizedTest
693 	@MethodSource("input")
694 	void dc02_returnTypedBean3dArray(Input input) {
695 		var x = input.proxy.returnTypedBean3dArray();
696 		assertList(x, "[[a:1;b:foo,<null>],<null>]",null);
697 		assertInstanceOf(TypedBeanImpl.class, x[0][0][0]);
698 	}
699 
700 	@ParameterizedTest
701 	@MethodSource("input")
702 	void dc03_returnTypedBeanList(Input input) {
703 		var x = input.proxy.returnTypedBeanList();
704 		assertList(x, "a:1;b:foo");
705 		assertInstanceOf(TypedBeanImpl.class, x.get(0));
706 	}
707 
708 	@ParameterizedTest
709 	@MethodSource("input")
710 	void dc04_returnTypedBean1d3dList(Input input) {
711 		var x = input.proxy.returnTypedBean1d3dList();
712 		assertList(x, "[[[a:1;b:foo,<null>],<null>],<null>]",null);
713 		assertInstanceOf(TypedBeanImpl.class, x.get(0)[0][0][0]);
714 	}
715 
716 	@ParameterizedTest
717 	@MethodSource("input")
718 	void dc05_returnTypedBeanMap(Input input) {
719 		var x = input.proxy.returnTypedBeanMap();
720 		assertBean(x, "foo", "a:1;b:foo");
721 		assertInstanceOf(TypedBeanImpl.class, x.get("foo"));
722 	}
723 
724 	@ParameterizedTest
725 	@MethodSource("input")
726 	void dc06_returnTypedBeanListMap(Input input) {
727 		var x = input.proxy.returnTypedBeanListMap();
728 		assertBean(x, "foo", "[a:1;b:foo]");
729 		assertInstanceOf(TypedBeanImpl.class, x.get("foo").get(0));
730 	}
731 
732 	@ParameterizedTest
733 	@MethodSource("input")
734 	void dc07_returnTypedBean1d3dListMap(Input input) {
735 		var x = input.proxy.returnTypedBean1d3dListMap();
736 		assertBean(x, "foo", "[[[[a:1;b:foo,<null>],<null>],<null>],<null>]");
737 		assertInstanceOf(TypedBeanImpl.class, x.get("foo").get(0)[0][0][0]);
738 	}
739 
740 	@ParameterizedTest
741 	@MethodSource("input")
742 	void dc08_returnTypedBeanListMapIntegerKeys(Input input) {
743 		// Note: JsonSerializer serializes key as string.
744 		var x = input.proxy.returnTypedBeanListMapIntegerKeys();
745 		assertJson("{'1':[{a:1,b:'foo'}]}", x);
746 		assertInstanceOf(TypedBeanImpl.class, x.get(1).get(0));
747 	}
748 
749 	// Swapped POJOs
750 
751 	@ParameterizedTest
752 	@MethodSource("input")
753 	void dd01_returnSwappedObject(Input input) {
754 		var x = input.proxy.returnSwappedObject();
755 		assertJson("'"+SWAP+"'", x);
756 		assertTrue(x.wasUnswapped);
757 	}
758 
759 	@ParameterizedTest
760 	@MethodSource("input")
761 	void dd02_returnSwappedObject3dArray(Input input) {
762 		var x = input.proxy.returnSwappedObject3dArray();
763 		assertJson("[[['"+SWAP+"',null],null],null]", x);
764 		assertTrue(x[0][0][0].wasUnswapped);
765 	}
766 
767 	@ParameterizedTest
768 	@MethodSource("input")
769 	void dd03_returnSwappedObjectMap(Input input) {
770 		var x = input.proxy.returnSwappedObjectMap();
771 		assertJson("{'"+SWAP+"':'"+SWAP+"'}", x);
772 		var e = x.entrySet().iterator().next();
773 		assertTrue(e.getKey().wasUnswapped);
774 		assertTrue(e.getValue().wasUnswapped);
775 	}
776 
777 	@ParameterizedTest
778 	@MethodSource("input")
779 	void dd04_returnSwappedObject3dMap(Input input) {
780 		var x = input.proxy.returnSwappedObject3dMap();
781 		assertJson("{'"+SWAP+"':[[['"+SWAP+"',null],null],null]}", x);
782 		var e = x.entrySet().iterator().next();
783 		assertTrue(e.getKey().wasUnswapped);
784 		assertTrue(e.getValue()[0][0][0].wasUnswapped);
785 	}
786 
787 	// Implicit swapped POJOs
788 
789 	@ParameterizedTest
790 	@MethodSource("input")
791 	void de01_returnImplicitSwappedObject(Input input) {
792 		var x = input.proxy.returnImplicitSwappedObject();
793 		assertJson("'"+SWAP+"'", x);
794 		assertTrue(x.wasUnswapped);
795 	}
796 
797 	@ParameterizedTest
798 	@MethodSource("input")
799 	void de02_returnImplicitSwappedObject3dArray(Input input) {
800 		var x = input.proxy.returnImplicitSwappedObject3dArray();
801 		assertJson("[[['"+SWAP+"',null],null],null]", x);
802 		assertTrue(x[0][0][0].wasUnswapped);
803 	}
804 
805 	@ParameterizedTest
806 	@MethodSource("input")
807 	void de03_returnImplicitSwappedObjectMap(Input input) {
808 		var x = input.proxy.returnImplicitSwappedObjectMap();
809 		assertJson("{'"+SWAP+"':'"+SWAP+"'}", x);
810 		var e = x.entrySet().iterator().next();
811 		assertTrue(e.getKey().wasUnswapped);
812 		assertTrue(e.getValue().wasUnswapped);
813 	}
814 
815 	@ParameterizedTest
816 	@MethodSource("input")
817 	void de04_returnImplicitSwappedObject3dMap(Input input) {
818 		var x = input.proxy.returnImplicitSwappedObject3dMap();
819 		assertJson("{'"+SWAP+"':[[['"+SWAP+"',null],null],null]}", x);
820 		var e = x.entrySet().iterator().next();
821 		assertTrue(e.getKey().wasUnswapped);
822 		assertTrue(e.getValue()[0][0][0].wasUnswapped);
823 	}
824 
825 	// Enums
826 
827 	@ParameterizedTest
828 	@MethodSource("input")
829 	void df01_returnEnum(Input input) {
830 		var x = input.proxy.returnEnum();
831 		assertEquals(TestEnum.TWO, x);
832 	}
833 
834 	@ParameterizedTest
835 	@MethodSource("input")
836 	void df02_returnEnum3d(Input input) {
837 		var x = input.proxy.returnEnum3d();
838 		assertList(x, "[[TWO,<null>],<null>]",null);
839 		assertInstanceOf(TestEnum.class, x[0][0][0]);
840 	}
841 
842 	@ParameterizedTest
843 	@MethodSource("input")
844 	void df03_returnEnumList(Input input) {
845 		var x = input.proxy.returnEnumList();
846 		assertList(x, "TWO", null);
847 		assertInstanceOf(TestEnum.class, x.get(0));
848 	}
849 
850 	@ParameterizedTest
851 	@MethodSource("input")
852 	void df04_returnEnum3dList(Input input) {
853 		var x = input.proxy.returnEnum3dList();
854 		assertList(x, "[[TWO,<null>],<null>]", null);
855 		assertInstanceOf(TestEnum.class, x.get(0).get(0).get(0));
856 	}
857 
858 	@ParameterizedTest
859 	@MethodSource("input")
860 	void df05_returnEnum1d3dList(Input input) {
861 		var x = input.proxy.returnEnum1d3dList();
862 		assertList(x, "[[[TWO,<null>],<null>],<null>]", null);
863 		assertInstanceOf(TestEnum[][][].class, x.get(0));
864 	}
865 
866 	@ParameterizedTest
867 	@MethodSource("input")
868 	void df06_returnEnumMap(Input input) {
869 		var x = input.proxy.returnEnumMap();
870 		assertJson("{ONE:'TWO'}", x);
871 		var e = x.entrySet().iterator().next();
872 		assertInstanceOf(TestEnum.class, e.getKey());
873 		assertInstanceOf(TestEnum.class, e.getValue());
874 	}
875 
876 	@ParameterizedTest
877 	@MethodSource("input")
878 	void df07_returnEnum3dArrayMap(Input input) {
879 		var x = input.proxy.returnEnum3dArrayMap();
880 		assertJson("{ONE:[[['TWO',null],null],null]}", x);
881 		var e = x.entrySet().iterator().next();
882 		assertInstanceOf(TestEnum.class, e.getKey());
883 		assertInstanceOf(TestEnum[][][].class, e.getValue());
884 	}
885 
886 	@ParameterizedTest
887 	@MethodSource("input")
888 	void df08_returnEnum1d3dListMap(Input input) {
889 		var x = input.proxy.returnEnum1d3dListMap();
890 		assertJson("{ONE:[[[['TWO',null],null],null],null]}", x);
891 		assertInstanceOf(TestEnum[][][].class, x.get(TestEnum.ONE).get(0));
892 	}
893 
894 	//-----------------------------------------------------------------------------------------------------------------
895 	// Test Body
896 	//-----------------------------------------------------------------------------------------------------------------
897 
898 	// Various primitives
899 
900 	@ParameterizedTest
901 	@MethodSource("input")
902 	void ea01_setInt(Input input) {
903 		assertDoesNotThrow(()->input.proxy.setInt(1));
904 	}
905 
906 	@ParameterizedTest
907 	@MethodSource("input")
908 	void ea02_setWrongInt(Input input) {
909 		assertThrowsWithMessage(AssertionFailedError.class, "expected: <1> but was: <2>", ()->input.proxy.setInt(2));
910 	}
911 
912 	@ParameterizedTest
913 	@MethodSource("input")
914 	void ea03_setInteger(Input input) {
915 		assertDoesNotThrow(()->input.proxy.setInteger(1));
916 	}
917 
918 	@ParameterizedTest
919 	@MethodSource("input")
920 	void ea04_setBoolean(Input input) {
921 		assertDoesNotThrow(()->input.proxy.setBoolean(true));
922 	}
923 
924 	@ParameterizedTest
925 	@MethodSource("input")
926 	void ea05_setFloat(Input input) {
927 		assertDoesNotThrow(()->input.proxy.setFloat(1f));
928 	}
929 
930 	@ParameterizedTest
931 	@MethodSource("input")
932 	void ea06_setFloatObject(Input input) {
933 		assertDoesNotThrow(()->input.proxy.setFloatObject(1f));
934 	}
935 
936 	@ParameterizedTest
937 	@MethodSource("input")
938 	void ea07_setString(Input input) {
939 		assertDoesNotThrow(()->input.proxy.setString("foo"));
940 	}
941 
942 	@ParameterizedTest
943 	@MethodSource("input")
944 	void ea08_setNullString(Input input) {
945 		assertDoesNotThrow(()->input.proxy.setNullString(null));
946 	}
947 
948 	@ParameterizedTest
949 	@MethodSource("input")
950 	void ea09_setNullStringBad(Input input) {
951 		assertThrowsWithMessage(AssertionFailedError.class, "expected: <null> but was: <foo>", ()->input.proxy.setNullString("foo"));
952 	}
953 
954 	@ParameterizedTest
955 	@MethodSource("input")
956 	void ea10_setInt3dArray(Input input) {
957 		assertDoesNotThrow(()->input.proxy.setInt3dArray(new int[][][]{{{1},null},null}, 1));
958 	}
959 
960 	@ParameterizedTest
961 	@MethodSource("input")
962 	void ea11_setInteger3dArray(Input input) {
963 		assertDoesNotThrow(()->input.proxy.setInteger3dArray(a(a(a(1,null),null),null)));
964 	}
965 
966 	@ParameterizedTest
967 	@MethodSource("input")
968 	void ea12_setString3dArray(Input input) {
969 		assertDoesNotThrow(()->input.proxy.setString3dArray(a(a(a("foo",null),null),null)));
970 	}
971 
972 	@ParameterizedTest
973 	@MethodSource("input")
974 	void ea13_setIntegerList(Input input) {
975 		assertDoesNotThrow(()->input.proxy.setIntegerList(l(1,null)));
976 	}
977 
978 	@ParameterizedTest
979 	@MethodSource("input")
980 	void ea14_setInteger3dList(Input input) {
981 		assertDoesNotThrow(()->input.proxy.setInteger3dList(l(l(l(1,null),null),null)));
982 	}
983 
984 	@ParameterizedTest
985 	@MethodSource("input")
986 	void ea15_setInteger1d3dList(Input input) {
987 		assertDoesNotThrow(()->input.proxy.setInteger1d3dList(l(a(a(a(1,null),null),null),null)));
988 	}
989 
990 	@ParameterizedTest
991 	@MethodSource("input")
992 	void ea16_setInt1d3dList(Input input) {
993 		assertDoesNotThrow(()->input.proxy.setInt1d3dList(l(new int[][][]{{{1,2},null},null},null)));
994 	}
995 
996 	@ParameterizedTest
997 	@MethodSource("input")
998 	void ea17_setStringList(Input input) {
999 		assertDoesNotThrow(()->input.proxy.setStringList(l("foo","bar",null)));
1000 	}
1001 
1002 	// Beans
1003 	@ParameterizedTest
1004 	@MethodSource("input")
1005 	void eb01_setBean(Input input) {
1006 		assertDoesNotThrow(()->input.proxy.setBean(ABean.get()));
1007 	}
1008 
1009 	@ParameterizedTest
1010 	@MethodSource("input")
1011 	void eb02_setBean3dArray(Input input) {
1012 		assertDoesNotThrow(()->input.proxy.setBean3dArray(a(a(a(ABean.get(),null),null),null)));
1013 	}
1014 
1015 	@ParameterizedTest
1016 	@MethodSource("input")
1017 	void eb03_setBeanList(Input input) {
1018 		assertDoesNotThrow(()->input.proxy.setBeanList(l(ABean.get())));
1019 	}
1020 
1021 	@ParameterizedTest
1022 	@MethodSource("input")
1023 	void eb04_setBean1d3dList(Input input) {
1024 		assertDoesNotThrow(()->input.proxy.setBean1d3dList(l(a(a(a(ABean.get(),null),null),null),null)));
1025 	}
1026 
1027 	@ParameterizedTest
1028 	@MethodSource("input")
1029 	void eb05_setBeanMap(Input input) {
1030 		assertDoesNotThrow(()->input.proxy.setBeanMap(map("foo",ABean.get())));
1031 	}
1032 
1033 	@ParameterizedTest
1034 	@MethodSource("input")
1035 	void eb06_setBeanListMap(Input input) {
1036 		assertDoesNotThrow(()->input.proxy.setBeanListMap(map("foo",l(ABean.get()))));
1037 	}
1038 
1039 	@ParameterizedTest
1040 	@MethodSource("input")
1041 	void eb07_setBean1d3dListMap(Input input) {
1042 		assertDoesNotThrow(()->input.proxy.setBean1d3dListMap(map("foo",l(a(a(a(ABean.get(),null),null),null),null))));
1043 	}
1044 
1045 	@ParameterizedTest
1046 	@MethodSource("input")
1047 	void eb08_setBeanListMapIntegerKeys(Input input) {
1048 		assertDoesNotThrow(()->input.proxy.setBeanListMapIntegerKeys(map(1,l(ABean.get()))));
1049 	}
1050 
1051 	// Typed beans
1052 
1053 	@ParameterizedTest
1054 	@MethodSource("input")
1055 	void ec01_setTypedBean(Input input) {
1056 		assertDoesNotThrow(()->input.proxy.setTypedBean(TypedBeanImpl.get()));
1057 	}
1058 
1059 	@ParameterizedTest
1060 	@MethodSource("input")
1061 	void ec02_setTypedBean3dArray(Input input) {
1062 		assertDoesNotThrow(()->input.proxy.setTypedBean3dArray(a(a(a(TypedBeanImpl.get(),null),null),null)));
1063 	}
1064 
1065 	@ParameterizedTest
1066 	@MethodSource("input")
1067 	void ec03_setTypedBeanList(Input input) {
1068 		assertDoesNotThrow(()->input.proxy.setTypedBeanList(l((TypedBean)TypedBeanImpl.get())));
1069 	}
1070 
1071 	@ParameterizedTest
1072 	@MethodSource("input")
1073 	void ec04_setTypedBean1d3dList(Input input) {
1074 		assertDoesNotThrow(()->input.proxy.setTypedBean1d3dList(l(a(a(a(TypedBeanImpl.get(),null),null),null),null)));
1075 	}
1076 
1077 	@ParameterizedTest
1078 	@MethodSource("input")
1079 	void ec05_setTypedBeanMap(Input input) {
1080 		assertDoesNotThrow(()->input.proxy.setTypedBeanMap(map("foo",TypedBeanImpl.get())));
1081 	}
1082 
1083 	@ParameterizedTest
1084 	@MethodSource("input")
1085 	void ec06_setTypedBeanListMap(Input input) {
1086 		assertDoesNotThrow(()->input.proxy.setTypedBeanListMap(map("foo",l((TypedBean)TypedBeanImpl.get()))));
1087 	}
1088 
1089 	@ParameterizedTest
1090 	@MethodSource("input")
1091 	void ec07_setTypedBean1d3dListMap(Input input) {
1092 		assertDoesNotThrow(()->input.proxy.setTypedBean1d3dListMap(map("foo",l(a(a(a(TypedBeanImpl.get(),null),null),null),null))));
1093 	}
1094 
1095 	@ParameterizedTest
1096 	@MethodSource("input")
1097 	void ec08_setTypedBeanListMapIntegerKeys(Input input) {
1098 		assertDoesNotThrow(()->input.proxy.setTypedBeanListMapIntegerKeys(map(1,l((TypedBean)TypedBeanImpl.get()))));
1099 	}
1100 
1101 	// Swapped POJOs
1102 
1103 	@ParameterizedTest
1104 	@MethodSource("input")
1105 	void ed01_setSwappedObject(Input input) {
1106 		assertDoesNotThrow(()->input.proxy.setSwappedObject(new SwappedObject()));
1107 	}
1108 
1109 	@ParameterizedTest
1110 	@MethodSource("input")
1111 	void ed02_setSwappedObject3dArray(Input input) {
1112 		assertDoesNotThrow(()->input.proxy.setSwappedObject3dArray(a(a(a(new SwappedObject(),null),null),null)));
1113 	}
1114 
1115 	@ParameterizedTest
1116 	@MethodSource("input")
1117 	void ed03_setSwappedObjectMap(Input input) {
1118 		assertDoesNotThrow(()->input.proxy.setSwappedObjectMap(map(new SwappedObject(),new SwappedObject())));
1119 	}
1120 
1121 	@ParameterizedTest
1122 	@MethodSource("input")
1123 	void ed04_setSwappedObject3dMap(Input input) {
1124 		assertDoesNotThrow(()->input.proxy.setSwappedObject3dMap(map(new SwappedObject(),a(a(a(new SwappedObject(),null),null),null))));
1125 	}
1126 
1127 	// Implicit swapped POJOs
1128 	@ParameterizedTest
1129 	@MethodSource("input")
1130 	void ee01_setImplicitSwappedObject(Input input) {
1131 		assertDoesNotThrow(()->input.proxy.setImplicitSwappedObject(new ImplicitSwappedObject()));
1132 	}
1133 
1134 	@ParameterizedTest
1135 	@MethodSource("input")
1136 	void ee02_setImplicitSwappedObject3dArray(Input input) {
1137 		assertDoesNotThrow(()->input.proxy.setImplicitSwappedObject3dArray(a(a(a(new ImplicitSwappedObject(),null),null),null)));
1138 	}
1139 
1140 	@ParameterizedTest
1141 	@MethodSource("input")
1142 	void ee03_setImplicitSwappedObjectMap(Input input) {
1143 		assertDoesNotThrow(()->input.proxy.setImplicitSwappedObjectMap(map(new ImplicitSwappedObject(),new ImplicitSwappedObject())));
1144 	}
1145 
1146 	@ParameterizedTest
1147 	@MethodSource("input")
1148 	void ee04_setImplicitSwappedObject3dMap(Input input) {
1149 		assertDoesNotThrow(()->input.proxy.setImplicitSwappedObject3dMap(map(new ImplicitSwappedObject(),a(a(a(new ImplicitSwappedObject(),null),null),null))));
1150 	}
1151 
1152 	// Enums
1153 
1154 	@ParameterizedTest
1155 	@MethodSource("input")
1156 	void ef01_setEnum(Input input) {
1157 		assertDoesNotThrow(()->input.proxy.setEnum(TestEnum.TWO));
1158 	}
1159 
1160 	@ParameterizedTest
1161 	@MethodSource("input")
1162 	void ef02_setEnum3d(Input input) {
1163 		assertDoesNotThrow(()->input.proxy.setEnum3d(a(a(a(TestEnum.TWO,null),null),null)));
1164 	}
1165 
1166 	@ParameterizedTest
1167 	@MethodSource("input")
1168 	void ef03_setEnumList(Input input) {
1169 		assertDoesNotThrow(()->input.proxy.setEnumList(l(TestEnum.TWO,null)));
1170 	}
1171 
1172 	@ParameterizedTest
1173 	@MethodSource("input")
1174 	void ef04_setEnum3dList(Input input) {
1175 		assertDoesNotThrow(()->input.proxy.setEnum3dList(l(l(l(TestEnum.TWO,null),null),null)));
1176 	}
1177 
1178 	@ParameterizedTest
1179 	@MethodSource("input")
1180 	void ef05_setEnum1d3dList(Input input) {
1181 		assertDoesNotThrow(()->input.proxy.setEnum1d3dList(l(a(a(a(TestEnum.TWO,null),null),null),null)));
1182 	}
1183 
1184 	@ParameterizedTest
1185 	@MethodSource("input")
1186 	void ef06_setEnumMap(Input input) {
1187 		assertDoesNotThrow(()->input.proxy.setEnumMap(map(TestEnum.ONE,TestEnum.TWO)));
1188 	}
1189 
1190 	@ParameterizedTest
1191 	@MethodSource("input")
1192 	void ef07_setEnum3dArrayMap(Input input) {
1193 		assertDoesNotThrow(()->input.proxy.setEnum3dArrayMap(map(TestEnum.ONE,a(a(a(TestEnum.TWO,null),null),null))));
1194 	}
1195 
1196 	@ParameterizedTest
1197 	@MethodSource("input")
1198 	void ef08_setEnum1d3dListMap(Input input) {
1199 		assertDoesNotThrow(()->input.proxy.setEnum1d3dListMap(map(TestEnum.ONE,l(a(a(a(TestEnum.TWO,null),null),null),null))));
1200 	}
1201 
1202 	//-----------------------------------------------------------------------------------------------------------------
1203 	// Path variables
1204 	//-----------------------------------------------------------------------------------------------------------------
1205 
1206 	@ParameterizedTest
1207 	@MethodSource("input")
1208 	void f01_pathVars1(Input input) {
1209 		var r = input.proxy.pathVars1(1, "foo");
1210 		assertEquals("OK", r);
1211 	}
1212 
1213 	@ParameterizedTest
1214 	@MethodSource("input")
1215 	void f02_pathVars2(Input input) {
1216 		var r = input.proxy.pathVars2(
1217 			m("a",1,"b","foo")
1218 		);
1219 		assertEquals("OK", r);
1220 	}
1221 
1222 	@ParameterizedTest
1223 	@MethodSource("input")
1224 	void f03_pathVars3(Input input) {
1225 		var r = input.proxy.pathVars3(
1226 			ABean.get()
1227 		);
1228 		assertEquals("OK", r);
1229 	}
1230 
1231 	//-----------------------------------------------------------------------------------------------------------------
1232 	// @Request tests - Path
1233 	//-----------------------------------------------------------------------------------------------------------------
1234 
1235 	@ParameterizedTest
1236 	@MethodSource("input")
1237 	void ga01_reqBeanPath1(Input input) {
1238 		var r = input.proxy.reqBeanPath1(
1239 			new ThirdPartyProxy.ReqBeanPath1() {
1240 						@Override public int getA() { return 1; }
1241 						@Override public String getB() { return "foo"; }
1242 			}
1243 		);
1244 		assertEquals("OK", r);
1245 	}
1246 
1247 	@ParameterizedTest
1248 	@MethodSource("input")
1249 	void ga01_reqBeanPath1a(Input input) {
1250 		var r = input.proxy.reqBeanPath1(
1251 			new ThirdPartyProxy.ReqBeanPath1Impl()
1252 		);
1253 		assertEquals("OK", r);
1254 	}
1255 
1256 	@ParameterizedTest
1257 	@MethodSource("input")
1258 	void ga02_reqBeanPath2(Input input) {
1259 		var r = input.proxy.reqBeanPath2(
1260 			new ThirdPartyProxy.ReqBeanPath2()
1261 		);
1262 		assertEquals("OK", r);
1263 	}
1264 
1265 	@ParameterizedTest
1266 	@MethodSource("input")
1267 	void ga03_reqBeanPath3(Input input) {
1268 		var r = input.proxy.reqBeanPath3(
1269 			new ThirdPartyProxy.ReqBeanPath3() {
1270 				@Override public int getX() { return 1; }
1271 				@Override public String getY() { return "foo"; }
1272 			}
1273 		);
1274 		assertEquals("OK", r);
1275 	}
1276 
1277 	@ParameterizedTest
1278 	@MethodSource("input")
1279 	void ga06_reqBeanPath6(Input input) {
1280 		var r = input.proxy.reqBeanPath6(() -> m("a", 1, "b", "foo"));
1281 		assertEquals("OK", r);
1282 	}
1283 
1284 	@ParameterizedTest
1285 	@MethodSource("input")
1286 	void ga07_reqBeanPath7(Input input) {
1287 		var r = input.proxy.reqBeanPath7(ABean::get);
1288 		assertEquals("OK", r);
1289 	}
1290 
1291 	//-----------------------------------------------------------------------------------------------------------------
1292 	// @Request tests - Query
1293 	//-----------------------------------------------------------------------------------------------------------------
1294 
1295 	@ParameterizedTest
1296 	@MethodSource("input")
1297 	void gb01_reqBeanQuery1(Input input) {
1298 		var r = input.proxy.reqBeanQuery1(
1299 			new ThirdPartyProxy.ReqBeanQuery1() {
1300 				@Override public int getA() { return 1; }
1301 				@Override public String getB() { return "foo"; }
1302 			}
1303 		);
1304 		assertEquals("OK", r);
1305 	}
1306 
1307 	@ParameterizedTest
1308 	@MethodSource("input")
1309 	void gb01_reqBeanQuery1a(Input input) {
1310 		var r = input.proxy.reqBeanQuery1(
1311 			new ThirdPartyProxy.ReqBeanQuery1Impl()
1312 		);
1313 		assertEquals("OK", r);
1314 	}
1315 
1316 	@ParameterizedTest
1317 	@MethodSource("input")
1318 	void gb02_reqBeanQuery2(Input input) {
1319 		var r = input.proxy.reqBeanQuery2(
1320 			new ThirdPartyProxy.ReqBeanQuery2()
1321 		);
1322 		assertEquals("OK", r);
1323 	}
1324 
1325 	@ParameterizedTest
1326 	@MethodSource("input")
1327 	void gb03_reqBeanQuery3(Input input) {
1328 		var r = input.proxy.reqBeanQuery3(
1329 			new ThirdPartyProxy.ReqBeanQuery3() {
1330 				@Override public int getX() { return 1; }
1331 				@Override public String getY() { return "foo"; }
1332 			}
1333 		);
1334 		assertEquals("OK", r);
1335 	}
1336 
1337 	@ParameterizedTest
1338 	@MethodSource("input")
1339 	void gb06_reqBeanQuery6(Input input) {
1340 		var r = input.proxy.reqBeanQuery6(
1341 			() -> m("a",1,"b","foo")
1342 		);
1343 		assertEquals("OK", r);
1344 	}
1345 
1346 	@ParameterizedTest
1347 	@MethodSource("input")
1348 	void gb07_reqBeanQuery7(Input input) {
1349 		var r = input.proxy.reqBeanQuery7(
1350 			ABean::get
1351 		);
1352 		assertEquals("OK", r);
1353 	}
1354 
1355 	//-----------------------------------------------------------------------------------------------------------------
1356 	// @Request tests - FormData
1357 	//-----------------------------------------------------------------------------------------------------------------
1358 
1359 	@ParameterizedTest
1360 	@MethodSource("input")
1361 	void gd01_reqBeanFormData1(Input input) {
1362 		var r = input.proxy.reqBeanFormData1(
1363 			new ThirdPartyProxy.ReqBeanFormData1() {
1364 				@Override public int getA() { return 1; }
1365 				@Override public String getB() { return "foo"; }
1366 			}
1367 		);
1368 		assertEquals("OK", r);
1369 	}
1370 
1371 	@ParameterizedTest
1372 	@MethodSource("input")
1373 	void gd01_reqBeanFormData1a(Input input) {
1374 		var r = input.proxy.reqBeanFormData1(
1375 			new ThirdPartyProxy.ReqBeanFormData1Impl()
1376 		);
1377 		assertEquals("OK", r);
1378 	}
1379 
1380 	@ParameterizedTest
1381 	@MethodSource("input")
1382 	void gd02_reqBeanFormData2(Input input) {
1383 		var r = input.proxy.reqBeanFormData2(
1384 			new ThirdPartyProxy.ReqBeanFormData2()
1385 		);
1386 		assertEquals("OK", r);
1387 	}
1388 
1389 	@ParameterizedTest
1390 	@MethodSource("input")
1391 	void gd03_reqBeanFormData3(Input input) {
1392 		var r = input.proxy.reqBeanFormData3(
1393 			new ThirdPartyProxy.ReqBeanFormData3() {
1394 				@Override public int getX() { return 1; }
1395 				@Override public String getY() { return "foo"; }
1396 			}
1397 		);
1398 		assertEquals("OK", r);
1399 	}
1400 
1401 	@ParameterizedTest
1402 	@MethodSource("input")
1403 	void gd06_reqBeanFormData6(Input input) {
1404 		var r = input.proxy.reqBeanFormData6(
1405 			() -> m("a",1,"b","foo")
1406 		);
1407 		assertEquals("OK", r);
1408 	}
1409 
1410 	@ParameterizedTest
1411 	@MethodSource("input")
1412 	void gd07_reqBeanFormData7(Input input) {
1413 		var r = input.proxy.reqBeanFormData7(
1414 			ABean::get
1415 		);
1416 		assertEquals("OK", r);
1417 	}
1418 
1419 	//-----------------------------------------------------------------------------------------------------------------
1420 	// @Request tests - Header
1421 	//-----------------------------------------------------------------------------------------------------------------
1422 
1423 	@ParameterizedTest
1424 	@MethodSource("input")
1425 	void gf01_reqBeanHeader1(Input input) {
1426 		var r = input.proxy.reqBeanHeader1(
1427 			new ThirdPartyProxy.ReqBeanHeader1() {
1428 				@Override public int getA() { return 1; }
1429 				@Override public String getB() { return "foo"; }
1430 			}
1431 		);
1432 		assertEquals("OK", r);
1433 	}
1434 
1435 	@ParameterizedTest
1436 	@MethodSource("input")
1437 	void gf01_reqBeanHeader1a(Input input) {
1438 		var r = input.proxy.reqBeanHeader1(
1439 			new ThirdPartyProxy.ReqBeanHeader1Impl()
1440 		);
1441 		assertEquals("OK", r);
1442 	}
1443 
1444 	@ParameterizedTest
1445 	@MethodSource("input")
1446 	void gf02_reqBeanHeader2(Input input) {
1447 		var r = input.proxy.reqBeanHeader2(
1448 			new ThirdPartyProxy.ReqBeanHeader2()
1449 		);
1450 		assertEquals("OK", r);
1451 	}
1452 
1453 	@ParameterizedTest
1454 	@MethodSource("input")
1455 	void gf03_reqBeanHeader3(Input input) {
1456 		var r = input.proxy.reqBeanHeader3(
1457 			new ThirdPartyProxy.ReqBeanHeader3() {
1458 				@Override public int getX() { return 1; }
1459 				@Override public String getY() { return "foo"; }
1460 			}
1461 		);
1462 		assertEquals("OK", r);
1463 	}
1464 
1465 	@ParameterizedTest
1466 	@MethodSource("input")
1467 	void gf06_reqBeanHeader6(Input input) {
1468 		var r = input.proxy.reqBeanHeader6(
1469 			() -> m("a",1,"b","foo")
1470 		);
1471 		assertEquals("OK", r);
1472 	}
1473 
1474 	@ParameterizedTest
1475 	@MethodSource("input")
1476 	void gf07_reqBeanHeader7(Input input) {
1477 		var r = input.proxy.reqBeanHeader7(
1478 			ABean::get
1479 		);
1480 		assertEquals("OK", r);
1481 	}
1482 
1483 	//-----------------------------------------------------------------------------------------------------------------
1484 	// PartFormatters
1485 	//-----------------------------------------------------------------------------------------------------------------
1486 	@ParameterizedTest
1487 	@MethodSource("input")
1488 	void h01(Input input) {
1489 		var r = input.proxy.partFormatters("1", "2", "3", "4");
1490 		assertEquals("OK", r);
1491 	}
1492 
1493 	//-----------------------------------------------------------------------------------------------------------------
1494 	// @RemoteOp(returns=HTTP_STATUS)
1495 	//-----------------------------------------------------------------------------------------------------------------
1496 	@ParameterizedTest
1497 	@MethodSource("input")
1498 	void i01a(Input input) {
1499 		var r = input.proxy.httpStatusReturnInt200();
1500 		assertEquals(200, r);
1501 	}
1502 
1503 	@ParameterizedTest
1504 	@MethodSource("input")
1505 	void i01b(Input input) {
1506 		var r = input.proxy.httpStatusReturnInteger200();
1507 		assertEquals(200, r.intValue());
1508 	}
1509 
1510 	@ParameterizedTest
1511 	@MethodSource("input")
1512 	void i01c(Input input) {
1513 		var r = input.proxy.httpStatusReturnInt404();
1514 		assertEquals(404, r);
1515 	}
1516 
1517 	@ParameterizedTest
1518 	@MethodSource("input")
1519 	void i01d(Input input) {
1520 		var r = input.proxy.httpStatusReturnInteger404();
1521 		assertEquals(404, r.intValue());
1522 	}
1523 
1524 	@ParameterizedTest
1525 	@MethodSource("input")
1526 	void i02a(Input input) {
1527 		var r = input.proxy.httpStatusReturnBool200();
1528 		assertEquals(true, r);
1529 	}
1530 
1531 	@ParameterizedTest
1532 	@MethodSource("input")
1533 	void i02b(Input input) {
1534 		var r = input.proxy.httpStatusReturnBoolean200();
1535 		assertEquals(true, r);
1536 	}
1537 
1538 	@ParameterizedTest
1539 	@MethodSource("input")
1540 	void i02c(Input input) {
1541 		var r = input.proxy.httpStatusReturnBool404();
1542 		assertEquals(false, r);
1543 	}
1544 
1545 	@ParameterizedTest
1546 	@MethodSource("input")
1547 	void i02d(Input input) {
1548 		var r = input.proxy.httpStatusReturnBoolean404();
1549 		assertEquals(false, r);
1550 	}
1551 
1552 	//-----------------------------------------------------------------------------------------------------------------
1553 	// Proxy class
1554 	//-----------------------------------------------------------------------------------------------------------------
1555 
1556 	@Remote
1557 	public interface ThirdPartyProxy {
1558 
1559 		//-------------------------------------------------------------------------------------------------------------
1560 		// Header tests
1561 		//-------------------------------------------------------------------------------------------------------------
1562 
1563 		@RemoteOp(method="GET", path="/primitiveHeaders")
1564 		String primitiveHeaders(
1565 			@Header("a") String a,
1566 			@Header("an") String an,
1567 			@Header("b") int b,
1568 			@Header("c") Integer c,
1569 			@Header("cn") Integer cn,
1570 			@Header("d") Boolean d,
1571 			@Header("e") float e,
1572 			@Header("f") Float f
1573 		);
1574 
1575 		@RemoteOp(method="GET", path="/primitiveCollectionHeaders")
1576 		String primitiveCollectionHeaders(
1577 			@Header("a") int[][][] a,
1578 			@Header("b") Integer[][][] b,
1579 			@Header("c") String[][][] c,
1580 			@Header("d") List<Integer> d,
1581 			@Header("e") List<List<List<Integer>>> e,
1582 			@Header("f") List<Integer[][][]> f,
1583 			@Header("g") List<int[][][]> g,
1584 			@Header("h") List<String> h
1585 		);
1586 
1587 		@RemoteOp(method="GET", path="/beanHeaders")
1588 		String beanHeaders(
1589 			@Header("a") ABean a,
1590 			@Header("an") ABean an,
1591 			@Header("b") ABean[][][] b,
1592 			@Header("c") List<ABean> c,
1593 			@Header("d") List<ABean[][][]> d,
1594 			@Header("e") Map<String,ABean> e,
1595 			@Header("f") Map<String,List<ABean>> f,
1596 			@Header("g") Map<String,List<ABean[][][]>> g,
1597 			@Header("h") Map<Integer,List<ABean>> h
1598 		);
1599 
1600 		@RemoteOp(method="GET", path="/typedBeanHeaders")
1601 		String typedBeanHeaders(
1602 			@Header("a") TypedBean a,
1603 			@Header("an") TypedBean an,
1604 			@Header("b") TypedBean[][][] b,
1605 			@Header("c") List<TypedBean> c,
1606 			@Header("d") List<TypedBean[][][]> d,
1607 			@Header("e") Map<String,TypedBean> e,
1608 			@Header("f") Map<String,List<TypedBean>> f,
1609 			@Header("g") Map<String,List<TypedBean[][][]>> g,
1610 			@Header("h") Map<Integer,List<TypedBean>> h
1611 		);
1612 
1613 		@RemoteOp(method="GET", path="/swappedObjectHeaders")
1614 		String swappedObjectHeaders(
1615 			@Header("a") SwappedObject a,
1616 			@Header("b") SwappedObject[][][] b,
1617 			@Header("c") Map<SwappedObject,SwappedObject> c,
1618 			@Header("d") Map<SwappedObject,SwappedObject[][][]> d
1619 		);
1620 
1621 		@RemoteOp(method="GET", path="/implicitSwappedObjectHeaders")
1622 		String implicitSwappedObjectHeaders(
1623 			@Header("a") ImplicitSwappedObject a,
1624 			@Header("b") ImplicitSwappedObject[][][] b,
1625 			@Header("c") Map<ImplicitSwappedObject,ImplicitSwappedObject> c,
1626 			@Header("d") Map<ImplicitSwappedObject,ImplicitSwappedObject[][][]> d
1627 		);
1628 
1629 		@RemoteOp(method="GET", path="/enumHeaders")
1630 		String enumHeaders(
1631 			@Header("a") TestEnum a,
1632 			@Header("an") TestEnum an,
1633 			@Header("b") TestEnum[][][] b,
1634 			@Header("c") List<TestEnum> c,
1635 			@Header("d") List<List<List<TestEnum>>> d,
1636 			@Header("e") List<TestEnum[][][]> e,
1637 			@Header("f") Map<TestEnum,TestEnum> f,
1638 			@Header("g") Map<TestEnum,TestEnum[][][]> g,
1639 			@Header("h") Map<TestEnum,List<TestEnum[][][]>> h
1640 		);
1641 
1642 		@RemoteOp(method="GET", path="/mapHeader")
1643 		String mapHeader(
1644 			@Header("*") Map<String,Object> a
1645 		);
1646 
1647 		@RemoteOp(method="GET", path="/beanHeader")
1648 		String beanHeader(
1649 			@Header("*") NeBean a
1650 		);
1651 
1652 		@RemoteOp(method="GET", path="/headerList")
1653 		String headerList(
1654 			@Header(value="*") @Schema(allowEmptyValue=true) HeaderList a
1655 		);
1656 
1657 		//-------------------------------------------------------------------------------------------------------------
1658 		// Query tests
1659 		//-------------------------------------------------------------------------------------------------------------
1660 
1661 		@RemoteOp(method="GET", path="/primitiveQueries")
1662 		String primitiveQueries(
1663 			@Query("a") String a,
1664 			@Query("an") String an,
1665 			@Query("b") int b,
1666 			@Query("c") Integer c,
1667 			@Query("cn") Integer cn,
1668 			@Query("d") Boolean d,
1669 			@Query("e") float e,
1670 			@Query("f") Float f
1671 		);
1672 
1673 		@RemoteOp(method="GET", path="/primitiveCollectionQueries")
1674 		String primitiveCollectionQueries(
1675 			@Query("a") int[][][] a,
1676 			@Query("b") Integer[][][] b,
1677 			@Query("c") String[][][] c,
1678 			@Query("d") List<Integer> d,
1679 			@Query("e") List<List<List<Integer>>> e,
1680 			@Query("f") List<Integer[][][]> f,
1681 			@Query("g") List<int[][][]> g,
1682 			@Query("h") List<String> h
1683 		);
1684 
1685 		@RemoteOp(method="GET", path="/beanQueries")
1686 		String beanQueries(
1687 			@Query("a") ABean a,
1688 			@Query("an") ABean an,
1689 			@Query("b") ABean[][][] b,
1690 			@Query("c") List<ABean> c,
1691 			@Query("d") List<ABean[][][]> d,
1692 			@Query("e") Map<String,ABean> e,
1693 			@Query("f") Map<String,List<ABean>> f,
1694 			@Query("g") Map<String,List<ABean[][][]>> g,
1695 			@Query("h") Map<Integer,List<ABean>> h
1696 		);
1697 
1698 		@RemoteOp(method="GET", path="/typedBeanQueries")
1699 		String typedBeanQueries(
1700 			@Query("a") TypedBean a,
1701 			@Query("an") TypedBean an,
1702 			@Query("b") TypedBean[][][] b,
1703 			@Query("c") List<TypedBean> c,
1704 			@Query("d") List<TypedBean[][][]> d,
1705 			@Query("e") Map<String,TypedBean> e,
1706 			@Query("f") Map<String,List<TypedBean>> f,
1707 			@Query("g") Map<String,List<TypedBean[][][]>> g,
1708 			@Query("h") Map<Integer,List<TypedBean>> h
1709 		);
1710 
1711 		@RemoteOp(method="GET", path="/swappedObjectQueries")
1712 		String swappedObjectQueries(
1713 			@Query("a") SwappedObject a,
1714 			@Query("b") SwappedObject[][][] b,
1715 			@Query("c") Map<SwappedObject,SwappedObject> c,
1716 			@Query("d") Map<SwappedObject,SwappedObject[][][]> d
1717 		);
1718 
1719 		@RemoteOp(method="GET", path="/implicitSwappedObjectQueries")
1720 		String implicitSwappedObjectQueries(
1721 			@Query("a") ImplicitSwappedObject a,
1722 			@Query("b") ImplicitSwappedObject[][][] b,
1723 			@Query("c") Map<ImplicitSwappedObject,ImplicitSwappedObject> c,
1724 			@Query("d") Map<ImplicitSwappedObject,ImplicitSwappedObject[][][]> d
1725 		);
1726 
1727 		@RemoteOp(method="GET", path="/enumQueries")
1728 		String enumQueries(
1729 			@Query("a") TestEnum a,
1730 			@Query("an") TestEnum an,
1731 			@Query("b") TestEnum[][][] b,
1732 			@Query("c") List<TestEnum> c,
1733 			@Query("d") List<List<List<TestEnum>>> d,
1734 			@Query("e") List<TestEnum[][][]> e,
1735 			@Query("f") Map<TestEnum,TestEnum> f,
1736 			@Query("g") Map<TestEnum,TestEnum[][][]> g,
1737 			@Query("h") Map<TestEnum,List<TestEnum[][][]>> h
1738 		);
1739 
1740 		@RemoteOp(method="GET", path="/stringQuery1")
1741 		String stringQuery1(
1742 			@Query String a
1743 		);
1744 
1745 		@RemoteOp(method="GET", path="/stringQuery2")
1746 		String stringQuery2(
1747 			@Query("*") String a
1748 		);
1749 
1750 		@RemoteOp(method="GET", path="/mapQuery")
1751 		String mapQuery(
1752 			@Query("*") Map<String,Object> a
1753 		);
1754 
1755 		@RemoteOp(method="GET", path="/beanQuery")
1756 		String beanQuery(
1757 			@Query("*") NeBean a
1758 		);
1759 
1760 		@RemoteOp(method="GET", path="/partListQuery")
1761 		String partListQuery(
1762 			@Query("*") PartList a
1763 		);
1764 
1765 		//-------------------------------------------------------------------------------------------------------------
1766 		// FormData tests
1767 		//-------------------------------------------------------------------------------------------------------------
1768 
1769 		@RemoteOp(method="POST", path="/primitiveFormData")
1770 		String primitiveFormData(
1771 			@FormData("a") String a,
1772 			@FormData("an") String an,
1773 			@FormData("b") int b,
1774 			@FormData("c") Integer c,
1775 			@FormData("cn") Integer cn,
1776 			@FormData("d") Boolean d,
1777 			@FormData("e") float e,
1778 			@FormData("f") Float f
1779 		);
1780 
1781 		@RemoteOp(method="POST", path="/primitiveCollectionFormData")
1782 		String primitiveCollectionFormData(
1783 			@FormData("a") int[][][] a,
1784 			@FormData("b") Integer[][][] b,
1785 			@FormData("c") String[][][] c,
1786 			@FormData("d") List<Integer> d,
1787 			@FormData("e") List<List<List<Integer>>> e,
1788 			@FormData("f") List<Integer[][][]> f,
1789 			@FormData("g") List<int[][][]> g,
1790 			@FormData("h") List<String> h
1791 		);
1792 
1793 		@RemoteOp(method="POST", path="/beanFormData")
1794 		String beanFormData(
1795 			@FormData("a") ABean a,
1796 			@FormData("an") ABean an,
1797 			@FormData("b") ABean[][][] b,
1798 			@FormData("c") List<ABean> c,
1799 			@FormData("d") List<ABean[][][]> d,
1800 			@FormData("e") Map<String,ABean> e,
1801 			@FormData("f") Map<String,List<ABean>> f,
1802 			@FormData("g") Map<String,List<ABean[][][]>> g,
1803 			@FormData("h") Map<Integer,List<ABean>> h
1804 		);
1805 
1806 		@RemoteOp(method="POST", path="/typedBeanFormData")
1807 		String typedBeanFormData(
1808 			@FormData("a") TypedBean a,
1809 			@FormData("an") TypedBean an,
1810 			@FormData("b") TypedBean[][][] b,
1811 			@FormData("c") List<TypedBean> c,
1812 			@FormData("d") List<TypedBean[][][]> d,
1813 			@FormData("e") Map<String,TypedBean> e,
1814 			@FormData("f") Map<String,List<TypedBean>> f,
1815 			@FormData("g") Map<String,List<TypedBean[][][]>> g,
1816 			@FormData("h") Map<Integer,List<TypedBean>> h
1817 		);
1818 
1819 		@RemoteOp(method="POST", path="/swappedObjectFormData")
1820 		String swappedObjectFormData(
1821 			@FormData("a") SwappedObject a,
1822 			@FormData("b") SwappedObject[][][] b,
1823 			@FormData("c") Map<SwappedObject,SwappedObject> c,
1824 			@FormData("d") Map<SwappedObject,SwappedObject[][][]> d
1825 		);
1826 
1827 		@RemoteOp(method="POST", path="/implicitSwappedObjectFormData")
1828 		String implicitSwappedObjectFormData(
1829 			@FormData("a") ImplicitSwappedObject a,
1830 			@FormData("b") ImplicitSwappedObject[][][] b,
1831 			@FormData("c") Map<ImplicitSwappedObject,ImplicitSwappedObject> c,
1832 			@FormData("d") Map<ImplicitSwappedObject,ImplicitSwappedObject[][][]> d
1833 		);
1834 
1835 		@RemoteOp(method="POST", path="/enumFormData")
1836 		String enumFormData(
1837 			@FormData("a") TestEnum a,
1838 			@FormData("an") TestEnum an,
1839 			@FormData("b") TestEnum[][][] b,
1840 			@FormData("c") List<TestEnum> c,
1841 			@FormData("d") List<List<List<TestEnum>>> d,
1842 			@FormData("e") List<TestEnum[][][]> e,
1843 			@FormData("f") Map<TestEnum,TestEnum> f,
1844 			@FormData("g") Map<TestEnum,TestEnum[][][]> g,
1845 			@FormData("h") Map<TestEnum,List<TestEnum[][][]>> h
1846 		);
1847 
1848 		@RemoteOp(method="POST", path="/mapFormData")
1849 		String mapFormData(
1850 			@FormData("*") Map<String,Object> a
1851 		);
1852 
1853 		@RemoteOp(method="POST", path="/beanFormData2")
1854 		String beanFormData(
1855 			@FormData("*") NeBean a
1856 		);
1857 
1858 		@RemoteOp(method="POST", path="/partListFormData")
1859 		String partListFormData(
1860 			@FormData("*") PartList a
1861 		);
1862 
1863 		//-------------------------------------------------------------------------------------------------------------
1864 		// Path tests
1865 		//-------------------------------------------------------------------------------------------------------------
1866 
1867 		@RemoteOp(method="POST", path="/pathVars1/{a}/{b}")
1868 		String pathVars1(
1869 			@Path("a") int a,
1870 			@Path("b") String b
1871 		);
1872 
1873 		@RemoteOp(method="POST", path="/pathVars2/{a}/{b}")
1874 		String pathVars2(
1875 			@Path Map<String,Object> a
1876 		);
1877 
1878 		@RemoteOp(method="POST", path="/pathVars3/{a}/{b}")
1879 		String pathVars3(
1880 			@Path ABean a
1881 		);
1882 
1883 		//-------------------------------------------------------------------------------------------------------------
1884 		// @Request tests - Path
1885 		//-------------------------------------------------------------------------------------------------------------
1886 
1887 		@RemoteOp(method="POST", path="/reqBeanPath/{a}/{b}")
1888 		String reqBeanPath1(
1889 			@Request ReqBeanPath1 rb
1890 		);
1891 
1892 		public interface ReqBeanPath1 {
1893 			@Path int getA();
1894 			@Path String getB();
1895 		}
1896 
1897 		public static class ReqBeanPath1Impl implements ReqBeanPath1 {
1898 			@Override public int getA() { return 1; }
1899 			@Override public String getB() { return "foo"; }
1900 		}
1901 
1902 		@RemoteOp(method="POST", path="/reqBeanPath/{a}/{b}")
1903 		String reqBeanPath2(
1904 			@Request ReqBeanPath2 rb
1905 		);
1906 
1907 		public static class ReqBeanPath2 {
1908 			@Path public int getA() { return 1; }
1909 			@Path public String getB() { return "foo"; }
1910 		}
1911 
1912 		@RemoteOp(method="POST", path="/reqBeanPath/{a}/{b}")
1913 		String reqBeanPath3(
1914 			@Request ReqBeanPath3 rb
1915 		);
1916 
1917 		public interface ReqBeanPath3 {
1918 			@Path("a") int getX();
1919 			@Path("b") String getY();
1920 		}
1921 
1922 		@RemoteOp(method="POST", path="/reqBeanPath/{a}/{b}")
1923 		String reqBeanPath6(
1924 			@Request ReqBeanPath6 rb
1925 		);
1926 
1927 		public interface ReqBeanPath6 {
1928 			@Path("*") Map<String,Object> getX();
1929 		}
1930 
1931 		@RemoteOp(method="POST", path="/reqBeanPath/{a}/{b}")
1932 		String reqBeanPath7(
1933 			@Request ReqBeanPath7 rb
1934 		);
1935 
1936 		public interface ReqBeanPath7 {
1937 			@Path("*") ABean getX();
1938 		}
1939 
1940 		//-------------------------------------------------------------------------------------------------------------
1941 		// @Request tests - Query
1942 		//-------------------------------------------------------------------------------------------------------------
1943 
1944 		@RemoteOp(method="POST", path="/reqBeanQuery")
1945 		String reqBeanQuery1(
1946 			@Request ReqBeanQuery1 rb
1947 		);
1948 
1949 		public interface ReqBeanQuery1 {
1950 			@Query int getA();
1951 			@Query String getB();
1952 		}
1953 
1954 		public static class ReqBeanQuery1Impl implements ReqBeanQuery1 {
1955 			@Override public int getA() { return 1; }
1956 			@Override public String getB() { return "foo"; }
1957 		}
1958 
1959 		@RemoteOp(method="POST", path="/reqBeanQuery")
1960 		String reqBeanQuery2(
1961 			@Request ReqBeanQuery2 rb
1962 		);
1963 
1964 		public static class ReqBeanQuery2 {
1965 			@Query public int getA() { return 1; }
1966 			@Query public String getB() { return "foo"; }
1967 		}
1968 
1969 		@RemoteOp(method="POST", path="/reqBeanQuery")
1970 		String reqBeanQuery3(
1971 			@Request ReqBeanQuery3 rb
1972 		);
1973 
1974 		public interface ReqBeanQuery3 {
1975 			@Query("a") int getX();
1976 			@Query("b") String getY();
1977 		}
1978 
1979 		@RemoteOp(method="POST", path="/reqBeanQuery")
1980 		String reqBeanQuery6(
1981 			@Request ReqBeanQuery6 rb
1982 		);
1983 
1984 		public interface ReqBeanQuery6 {
1985 			@Query("*") Map<String,Object> getX();
1986 		}
1987 
1988 		@RemoteOp(method="POST", path="/reqBeanQuery")
1989 		String reqBeanQuery7(
1990 			@Request ReqBeanQuery7 rb
1991 		);
1992 
1993 		public interface ReqBeanQuery7 {
1994 			@Query("*") ABean getX();
1995 		}
1996 
1997 		//-------------------------------------------------------------------------------------------------------------
1998 		// @Request tests - FormData
1999 		//-------------------------------------------------------------------------------------------------------------
2000 
2001 		@RemoteOp(method="POST", path="/reqBeanFormData")
2002 		String reqBeanFormData1(
2003 			@Request ReqBeanFormData1 rb
2004 		);
2005 
2006 		public interface ReqBeanFormData1 {
2007 			@FormData int getA();
2008 			@FormData String getB();
2009 		}
2010 
2011 		public static class ReqBeanFormData1Impl implements ReqBeanFormData1 {
2012 			@Override public int getA() { return 1; }
2013 			@Override public String getB() { return "foo"; }
2014 		}
2015 
2016 		@RemoteOp(method="POST", path="/reqBeanFormData")
2017 		String reqBeanFormData2(
2018 			@Request ReqBeanFormData2 rb
2019 		);
2020 
2021 		public static class ReqBeanFormData2 {
2022 			@FormData public int getA() { return 1; }
2023 			@FormData public String getB() { return "foo"; }
2024 		}
2025 
2026 		@RemoteOp(method="POST", path="/reqBeanFormData")
2027 		String reqBeanFormData3(
2028 			@Request ReqBeanFormData3 rb
2029 		);
2030 
2031 		public interface ReqBeanFormData3 {
2032 			@FormData("a") int getX();
2033 			@FormData("b") String getY();
2034 		}
2035 
2036 		@RemoteOp(method="POST", path="/reqBeanFormData")
2037 		String reqBeanFormData6(
2038 			@Request ReqBeanFormData6 rb
2039 		);
2040 
2041 		public interface ReqBeanFormData6 {
2042 			@FormData("*") Map<String,Object> getX();
2043 		}
2044 
2045 		@RemoteOp(method="POST", path="/reqBeanFormData")
2046 		String reqBeanFormData7(
2047 			@Request ReqBeanFormData7 rb
2048 		);
2049 
2050 		public interface ReqBeanFormData7 {
2051 			@FormData("*") ABean getX();
2052 		}
2053 
2054 		//-------------------------------------------------------------------------------------------------------------
2055 		// @Request tests - Header
2056 		//-------------------------------------------------------------------------------------------------------------
2057 
2058 		@RemoteOp(method="POST", path="/reqBeanHeader")
2059 		String reqBeanHeader1(
2060 			@Request ReqBeanHeader1 rb
2061 		);
2062 
2063 		public interface ReqBeanHeader1 {
2064 			@Header int getA();
2065 			@Header String getB();
2066 		}
2067 
2068 		public static class ReqBeanHeader1Impl implements ReqBeanHeader1 {
2069 			@Override public int getA() { return 1; }
2070 			@Override public String getB() { return "foo"; }
2071 		}
2072 
2073 		@RemoteOp(method="POST", path="/reqBeanHeader")
2074 		String reqBeanHeader2(
2075 			@Request ReqBeanHeader2 rb
2076 		);
2077 
2078 		public static class ReqBeanHeader2 {
2079 			@Header public int getA() { return 1; }
2080 			@Header public String getB() { return "foo"; }
2081 		}
2082 
2083 		@RemoteOp(method="POST", path="/reqBeanHeader")
2084 		String reqBeanHeader3(
2085 			@Request ReqBeanHeader3 rb
2086 		);
2087 
2088 		public interface ReqBeanHeader3 {
2089 			@Header("a") int getX();
2090 			@Header("b") String getY();
2091 		}
2092 
2093 		@RemoteOp(method="POST", path="/reqBeanHeader")
2094 		String reqBeanHeader6(
2095 			@Request ReqBeanHeader6 rb
2096 		);
2097 
2098 		public interface ReqBeanHeader6 {
2099 			@Header("*") Map<String,Object> getX();
2100 		}
2101 
2102 		@RemoteOp(method="POST", path="/reqBeanHeader")
2103 		String reqBeanHeader7(
2104 			@Request ReqBeanHeader7 rb
2105 		);
2106 
2107 		public interface ReqBeanHeader7 {
2108 			@Header("*") ABean getX();
2109 		}
2110 
2111 		//-------------------------------------------------------------------------------------------------------------
2112 		// PartFormatters
2113 		//-------------------------------------------------------------------------------------------------------------
2114 
2115 		@RemoteOp(method="POST", path="/partFormatters/{p1}")
2116 		String partFormatters(
2117 			@Path(value="p1", serializer=DummyPartSerializer.class) String p1,
2118 			@Header(value="h1", serializer=DummyPartSerializer.class) String h1,
2119 			@Query(value="q1", serializer=DummyPartSerializer.class) String q1,
2120 			@FormData(value="f1", serializer=DummyPartSerializer.class) String f1
2121 		);
2122 
2123 		//-------------------------------------------------------------------------------------------------------------
2124 		// Test return types.
2125 		//-------------------------------------------------------------------------------------------------------------
2126 
2127 		// Various primitives
2128 
2129 		@RemoteOp(method="GET", path="/returnVoid")
2130 		void returnVoid();
2131 
2132 		@RemoteOp(method="GET", path="/returnInt")
2133 		int returnInt();
2134 
2135 		@RemoteOp(method="GET", path="/returnInteger")
2136 		Integer returnInteger();
2137 
2138 		@RemoteOp(method="GET", path="/returnBoolean")
2139 		boolean returnBoolean();
2140 
2141 		@RemoteOp(method="GET", path="/returnFloat")
2142 		float returnFloat();
2143 
2144 		@RemoteOp(method="GET", path="/returnFloatObject")
2145 		Float returnFloatObject();
2146 
2147 		@RemoteOp(method="GET", path="/returnString")
2148 		String returnString();
2149 
2150 		@RemoteOp(method="GET", path="/returnNullString")
2151 		String returnNullString();
2152 
2153 		@RemoteOp(method="GET", path="/returnInt3dArray")
2154 		int[][][] returnInt3dArray();
2155 
2156 		@RemoteOp(method="GET", path="/returnInteger3dArray")
2157 		Integer[][][] returnInteger3dArray();
2158 
2159 		@RemoteOp(method="GET", path="/returnString3dArray")
2160 		String[][][] returnString3dArray();
2161 
2162 		@RemoteOp(method="GET", path="/returnIntegerList")
2163 		List<Integer> returnIntegerList();
2164 
2165 		@RemoteOp(method="GET", path="/returnInteger3dList")
2166 		List<List<List<Integer>>> returnInteger3dList();
2167 
2168 		@RemoteOp(method="GET", path="/returnInteger1d3dList")
2169 		List<Integer[][][]> returnInteger1d3dList();
2170 
2171 		@RemoteOp(method="GET", path="/returnInt1d3dList")
2172 		List<int[][][]> returnInt1d3dList();
2173 
2174 		@RemoteOp(method="GET", path="/returnStringList")
2175 		List<String> returnStringList();
2176 
2177 		// Beans
2178 
2179 		@RemoteOp(method="GET", path="/returnBean")
2180 		ABean returnBean();
2181 
2182 		@RemoteOp(method="GET", path="/returnBean3dArray")
2183 		ABean[][][] returnBean3dArray();
2184 
2185 		@RemoteOp(method="GET", path="/returnBeanList")
2186 		List<ABean> returnBeanList();
2187 
2188 		@RemoteOp(method="GET", path="/returnBean1d3dList")
2189 		List<ABean[][][]> returnBean1d3dList();
2190 
2191 		@RemoteOp(method="GET", path="/returnBeanMap")
2192 		Map<String,ABean> returnBeanMap();
2193 
2194 		@RemoteOp(method="GET", path="/returnBeanListMap")
2195 		Map<String,List<ABean>> returnBeanListMap();
2196 
2197 		@RemoteOp(method="GET", path="/returnBean1d3dListMap")
2198 		Map<String,List<ABean[][][]>> returnBean1d3dListMap();
2199 
2200 		@RemoteOp(method="GET", path="/returnBeanListMapIntegerKeys")
2201 		Map<Integer,List<ABean>> returnBeanListMapIntegerKeys();
2202 
2203 		// Typed beans
2204 
2205 		@RemoteOp(method="GET", path="/returnTypedBean")
2206 		TypedBean returnTypedBean();
2207 
2208 		@RemoteOp(method="GET", path="/returnTypedBean3dArray")
2209 		TypedBean[][][] returnTypedBean3dArray();
2210 
2211 		@RemoteOp(method="GET", path="/returnTypedBeanList")
2212 		List<TypedBean> returnTypedBeanList();
2213 
2214 		@RemoteOp(method="GET", path="/returnTypedBean1d3dList")
2215 		List<TypedBean[][][]> returnTypedBean1d3dList();
2216 
2217 		@RemoteOp(method="GET", path="/returnTypedBeanMap")
2218 		Map<String,TypedBean> returnTypedBeanMap();
2219 
2220 		@RemoteOp(method="GET", path="/returnTypedBeanListMap")
2221 		Map<String,List<TypedBean>> returnTypedBeanListMap();
2222 
2223 		@RemoteOp(method="GET", path="/returnTypedBean1d3dListMap")
2224 		Map<String,List<TypedBean[][][]>> returnTypedBean1d3dListMap();
2225 
2226 		@RemoteOp(method="GET", path="/returnTypedBeanListMapIntegerKeys")
2227 		Map<Integer,List<TypedBean>> returnTypedBeanListMapIntegerKeys();
2228 
2229 		// Swapped POJOs
2230 
2231 		@RemoteOp(method="GET", path="/returnSwappedObject")
2232 		SwappedObject returnSwappedObject();
2233 
2234 		@RemoteOp(method="GET", path="/returnSwappedObject3dArray")
2235 		SwappedObject[][][] returnSwappedObject3dArray();
2236 
2237 		@RemoteOp(method="GET", path="/returnSwappedObjectMap")
2238 		Map<SwappedObject,SwappedObject> returnSwappedObjectMap();
2239 
2240 		@RemoteOp(method="GET", path="/returnSwappedObject3dMap")
2241 		Map<SwappedObject,SwappedObject[][][]> returnSwappedObject3dMap();
2242 
2243 		// Implicit swapped POJOs
2244 
2245 		@RemoteOp(method="GET", path="/returnImplicitSwappedObject")
2246 		ImplicitSwappedObject returnImplicitSwappedObject();
2247 
2248 		@RemoteOp(method="GET", path="/returnImplicitSwappedObject3dArray")
2249 		ImplicitSwappedObject[][][] returnImplicitSwappedObject3dArray();
2250 
2251 		@RemoteOp(method="GET", path="/returnImplicitSwappedObjectMap")
2252 		Map<ImplicitSwappedObject,ImplicitSwappedObject> returnImplicitSwappedObjectMap();
2253 
2254 		@RemoteOp(method="GET", path="/returnImplicitSwappedObject3dMap")
2255 		Map<ImplicitSwappedObject,ImplicitSwappedObject[][][]> returnImplicitSwappedObject3dMap();
2256 
2257 		// Enums
2258 
2259 		@RemoteOp(method="GET", path="/returnEnum")
2260 		TestEnum returnEnum();
2261 
2262 		@RemoteOp(method="GET", path="/returnEnum3d")
2263 		TestEnum[][][] returnEnum3d();
2264 
2265 		@RemoteOp(method="GET", path="/returnEnumList")
2266 		List<TestEnum> returnEnumList();
2267 
2268 		@RemoteOp(method="GET", path="/returnEnum3dList")
2269 		List<List<List<TestEnum>>> returnEnum3dList();
2270 
2271 		@RemoteOp(method="GET", path="/returnEnum1d3dList")
2272 		List<TestEnum[][][]> returnEnum1d3dList();
2273 
2274 		@RemoteOp(method="GET", path="/returnEnumMap")
2275 		Map<TestEnum,TestEnum> returnEnumMap();
2276 
2277 		@RemoteOp(method="GET", path="/returnEnum3dArrayMap")
2278 		Map<TestEnum,TestEnum[][][]> returnEnum3dArrayMap();
2279 
2280 		@RemoteOp(method="GET", path="/returnEnum1d3dListMap")
2281 		Map<TestEnum,List<TestEnum[][][]>> returnEnum1d3dListMap();
2282 
2283 		//-------------------------------------------------------------------------------------------------------------
2284 		// Test parameters
2285 		//-------------------------------------------------------------------------------------------------------------
2286 
2287 		// Various primitives
2288 
2289 		@RemoteOp(method="POST", path="/setInt")
2290 		void setInt(@Content int x) throws AssertionFailedError;
2291 
2292 		@RemoteOp(method="POST", path="/setInteger")
2293 		void setInteger(@Content Integer x);
2294 
2295 		@RemoteOp(method="POST", path="/setBoolean")
2296 		void setBoolean(@Content boolean x);
2297 
2298 		@RemoteOp(method="POST", path="/setFloat")
2299 		void setFloat(@Content float x);
2300 
2301 		@RemoteOp(method="POST", path="/setFloatObject")
2302 		void setFloatObject(@Content Float x);
2303 
2304 		@RemoteOp(method="POST", path="/setString")
2305 		void setString(@Content String x);
2306 
2307 		@RemoteOp(method="POST", path="/setNullString")
2308 		void setNullString(@Content String x) throws AssertionFailedError;
2309 
2310 		@RemoteOp(method="POST", path="/setInt3dArray")
2311 		String setInt3dArray(@Content int[][][] x, @org.apache.juneau.http.annotation.Query("I") int i);
2312 
2313 		@RemoteOp(method="POST", path="/setInteger3dArray")
2314 		void setInteger3dArray(@Content Integer[][][] x);
2315 
2316 		@RemoteOp(method="POST", path="/setString3dArray")
2317 		void setString3dArray(@Content String[][][] x);
2318 
2319 		@RemoteOp(method="POST", path="/setIntegerList")
2320 		void setIntegerList(@Content List<Integer> x);
2321 
2322 		@RemoteOp(method="POST", path="/setInteger3dList")
2323 		void setInteger3dList(@Content List<List<List<Integer>>> x);
2324 
2325 		@RemoteOp(method="POST", path="/setInteger1d3dList")
2326 		void setInteger1d3dList(@Content List<Integer[][][]> x);
2327 
2328 		@RemoteOp(method="POST", path="/setInt1d3dList")
2329 		void setInt1d3dList(@Content List<int[][][]> x);
2330 
2331 		@RemoteOp(method="POST", path="/setStringList")
2332 		void setStringList(@Content List<String> x);
2333 
2334 		// Beans
2335 
2336 		@RemoteOp(method="POST", path="/setBean")
2337 		void setBean(@Content ABean x);
2338 
2339 		@RemoteOp(method="POST", path="/setBean3dArray")
2340 		void setBean3dArray(@Content ABean[][][] x);
2341 
2342 		@RemoteOp(method="POST", path="/setBeanList")
2343 		void setBeanList(@Content List<ABean> x);
2344 
2345 		@RemoteOp(method="POST", path="/setBean1d3dList")
2346 		void setBean1d3dList(@Content List<ABean[][][]> x);
2347 
2348 		@RemoteOp(method="POST", path="/setBeanMap")
2349 		void setBeanMap(@Content Map<String,ABean> x);
2350 
2351 		@RemoteOp(method="POST", path="/setBeanListMap")
2352 		void setBeanListMap(@Content Map<String,List<ABean>> x);
2353 
2354 		@RemoteOp(method="POST", path="/setBean1d3dListMap")
2355 		void setBean1d3dListMap(@Content Map<String,List<ABean[][][]>> x);
2356 
2357 		@RemoteOp(method="POST", path="/setBeanListMapIntegerKeys")
2358 		void setBeanListMapIntegerKeys(@Content Map<Integer,List<ABean>> x);
2359 
2360 		// Typed beans
2361 
2362 		@RemoteOp(method="POST", path="/setTypedBean")
2363 		void setTypedBean(@Content TypedBean x);
2364 
2365 		@RemoteOp(method="POST", path="/setTypedBean3dArray")
2366 		void setTypedBean3dArray(@Content TypedBean[][][] x);
2367 
2368 		@RemoteOp(method="POST", path="/setTypedBeanList")
2369 		void setTypedBeanList(@Content List<TypedBean> x);
2370 
2371 		@RemoteOp(method="POST", path="/setTypedBean1d3dList")
2372 		void setTypedBean1d3dList(@Content List<TypedBean[][][]> x);
2373 
2374 		@RemoteOp(method="POST", path="/setTypedBeanMap")
2375 		void setTypedBeanMap(@Content Map<String,TypedBean> x);
2376 
2377 		@RemoteOp(method="POST", path="/setTypedBeanListMap")
2378 		void setTypedBeanListMap(@Content Map<String,List<TypedBean>> x);
2379 
2380 		@RemoteOp(method="POST", path="/setTypedBean1d3dListMap")
2381 		void setTypedBean1d3dListMap(@Content Map<String,List<TypedBean[][][]>> x);
2382 
2383 		@RemoteOp(method="POST", path="/setTypedBeanListMapIntegerKeys")
2384 		void setTypedBeanListMapIntegerKeys(@Content Map<Integer,List<TypedBean>> x);
2385 
2386 		// Swapped POJOs
2387 
2388 		@RemoteOp(method="POST", path="/setSwappedObject")
2389 		void setSwappedObject(@Content SwappedObject x);
2390 
2391 		@RemoteOp(method="POST", path="/setSwappedObject3dArray")
2392 		void setSwappedObject3dArray(@Content SwappedObject[][][] x);
2393 
2394 		@RemoteOp(method="POST", path="/setSwappedObjectMap")
2395 		void setSwappedObjectMap(@Content Map<SwappedObject,SwappedObject> x);
2396 
2397 		@RemoteOp(method="POST", path="/setSwappedObject3dMap")
2398 		void setSwappedObject3dMap(@Content Map<SwappedObject,SwappedObject[][][]> x);
2399 
2400 		// Implicit swapped POJOs
2401 
2402 		@RemoteOp(method="POST", path="/setImplicitSwappedObject")
2403 		void setImplicitSwappedObject(@Content ImplicitSwappedObject x);
2404 
2405 		@RemoteOp(method="POST", path="/setImplicitSwappedObject3dArray")
2406 		void setImplicitSwappedObject3dArray(@Content ImplicitSwappedObject[][][] x);
2407 
2408 		@RemoteOp(method="POST", path="/setImplicitSwappedObjectMap")
2409 		void setImplicitSwappedObjectMap(@Content Map<ImplicitSwappedObject,ImplicitSwappedObject> x);
2410 
2411 		@RemoteOp(method="POST", path="/setImplicitSwappedObject3dMap")
2412 		void setImplicitSwappedObject3dMap(@Content Map<ImplicitSwappedObject,ImplicitSwappedObject[][][]> x);
2413 
2414 		// Enums
2415 
2416 		@RemoteOp(method="POST", path="/setEnum")
2417 		void setEnum(@Content TestEnum x);
2418 
2419 		@RemoteOp(method="POST", path="/setEnum3d")
2420 		void setEnum3d(@Content TestEnum[][][] x);
2421 
2422 		@RemoteOp(method="POST", path="/setEnumList")
2423 		void setEnumList(@Content List<TestEnum> x);
2424 
2425 		@RemoteOp(method="POST", path="/setEnum3dList")
2426 		void setEnum3dList(@Content List<List<List<TestEnum>>> x);
2427 
2428 		@RemoteOp(method="POST", path="/setEnum1d3dList")
2429 		void setEnum1d3dList(@Content List<TestEnum[][][]> x);
2430 
2431 		@RemoteOp(method="POST", path="/setEnumMap")
2432 		void setEnumMap(@Content Map<TestEnum,TestEnum> x);
2433 
2434 		@RemoteOp(method="POST", path="/setEnum3dArrayMap")
2435 		void setEnum3dArrayMap(@Content Map<TestEnum,TestEnum[][][]> x);
2436 
2437 		@RemoteOp(method="POST", path="/setEnum1d3dListMap")
2438 		void setEnum1d3dListMap(@Content Map<TestEnum,List<TestEnum[][][]>> x);
2439 
2440 		// Method returns status code
2441 
2442 		@RemoteOp(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.STATUS)
2443 		int httpStatusReturnInt200();
2444 
2445 		@RemoteOp(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.STATUS)
2446 		Integer httpStatusReturnInteger200();
2447 
2448 		@RemoteOp(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.STATUS)
2449 		int httpStatusReturnInt404();
2450 
2451 		@RemoteOp(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.STATUS)
2452 		Integer httpStatusReturnInteger404();
2453 
2454 		@RemoteOp(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.STATUS)
2455 		boolean httpStatusReturnBool200();
2456 
2457 		@RemoteOp(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.STATUS)
2458 		Boolean httpStatusReturnBoolean200();
2459 
2460 		@RemoteOp(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.STATUS)
2461 		boolean httpStatusReturnBool404();
2462 
2463 		@RemoteOp(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.STATUS)
2464 		Boolean httpStatusReturnBoolean404();
2465 	}
2466 
2467 	// Bean for testing NE annotations.
2468 	public static class NeBean {
2469 		public String a, b, c;
2470 
2471 		public NeBean init() {
2472 			this.a = "foo";
2473 			this.b = "";
2474 			this.c = null;
2475 			return this;
2476 		}
2477 	}
2478 
2479 	public static class DummyPartSerializer extends BaseHttpPartSerializer {
2480 		public DummyPartSerializer(Builder builder) {
2481 			super(builder);
2482 		}
2483 
2484 		public static Builder create() {
2485 			return new Builder();
2486 		}
2487 
2488 		public static class Builder extends BaseHttpPartSerializer.Builder {
2489 
2490 			Builder() {
2491 			}
2492 
2493 			Builder(Builder builder) {
2494 				super(builder);
2495 			}
2496 
2497 			@Override
2498 			public Builder copy() {
2499 				return new Builder(this);
2500 			}
2501 
2502 			@Override
2503 			public DummyPartSerializer build() {
2504 				return build(DummyPartSerializer.class);
2505 			}
2506 		}
2507 
2508 		@Override
2509 		public HttpPartSerializerSession getPartSession() {
2510 			return new BaseHttpPartSerializerSession() {
2511 				@Override
2512 				public String serialize(HttpPartType partType, HttpPartSchema schema, Object value) throws SerializeException, SchemaValidationException {
2513 					return "dummy-"+value;
2514 				}
2515 			};
2516 		}
2517 	}
2518 }