@Test
public void testConvert2_ListOfJavaBean() throws Exception {

    Map<String, String> map = converter.convert(
            new BatchUpdateUserForm2(Arrays.asList(
                    new UpdateUserCriteriaForm2("yamada", 20),
                    new UpdateUserCriteriaForm2("tanaka", 50)), LogicalOperator2.AND));
    assertThat(map.size(), is(5));
    assertThat(map, hasEntry("criteria[0].name", "yamada"));
    assertThat(map, hasEntry("criteria[0].age", "20"));
    assertThat(map, hasEntry("criteria[1].name", "tanaka"));
    assertThat(map, hasEntry("criteria[1].age", "50"));
    assertThat(map, hasEntry("operator", "AND"));
    // check reverse conversion
    BatchUpdateUserForm2 form = new BatchUpdateUserForm2();
    WebDataBinder binder = new WebDataBinder(form);
    binder.bind(new MutablePropertyValues(map));
    assertThat(form.getCriteria(), is(notNullValue()));
    assertThat(form.getCriteria().size(), is(2));
    assertThat(form.getCriteria().get(0).getName(), is("yamada"));
    assertThat(form.getCriteria().get(0).getAge(), is(20));
    assertThat(form.getCriteria().get(1).getName(), is("tanaka"));
    assertThat(form.getCriteria().get(1).getAge(), is(50));
    assertThat(form.getOperator(), is(LogicalOperator2.AND));
}