@Test
public void testCollections() {
Map<String, Object> params = new LinkedHashMap<String, Object>();
params.put("name", "first");
TestObject ce = new TestObject(23, "Meier", Boolean.FALSE, new BigDecimal(
"100.23"));
params.put("collections", Collections.singleton(ce));
String result = (String) ControllerUtil.sendAndReceiveNamed(mockMvc,
"remoteProviderSimpleNamed", "methodCollection1", String.class, params);
assertThat(result).isEqualTo(
"1->first;[TestObject [id=23, name=Meier, active=false, amount=100.23]]");
params = new LinkedHashMap<String, Object>();
params.put("name", "2nd");
List<TestObject> list = new ArrayList<TestObject>();
list.add(new TestObject(1, "One", Boolean.TRUE, new BigDecimal("1.1")));
list.add(new TestObject(2, "Two", Boolean.FALSE, new BigDecimal("1.2")));
list.add(new TestObject(3, "Three", Boolean.TRUE, new BigDecimal("1.3")));
params.put("collections", list);
result = (String) ControllerUtil.sendAndReceiveNamed(mockMvc,
"remoteProviderSimpleNamed", "methodCollection1", String.class, params);
assertThat(result)