@Test
public void testConvert3_SimpleJavaBeanAndListOfJavaBean() throws Exception {

    Map<String, String> map = converter.convert(
            new SearchAndBatchUpdateUserForm3(new SearchUserCriteriaForm3("suzuki", 30), Arrays
                    .asList(new User3("yamada", 20),
                            new User3("tanaka", 50))));
    assertThat(map.size(), is(6));
    assertThat(map, hasEntry("criteria.name", "suzuki"));
    assertThat(map, hasEntry("criteria.age", "30"));
    assertThat(map, hasEntry("users[0].name", "yamada"));
    assertThat(map, hasEntry("users[0].age", "20"));
    assertThat(map, hasEntry("users[1].name", "tanaka"));
    assertThat(map, hasEntry("users[1].age", "50"));
    // check reverse conversion
    SearchAndBatchUpdateUserForm3 form = new SearchAndBatchUpdateUserForm3();
    WebDataBinder binder = new WebDataBinder(form);
    binder.bind(new MutablePropertyValues(map));
    assertThat(form.getCriteria(), is(notNullValue()));
    assertThat(form.getCriteria().getName(), is("suzuki"));
    assertThat(form.getCriteria().getAge(), is(30));
    assertThat(form.getUsers(), is(notNullValue()));
    assertThat(form.getUsers().size(), is(2));
    assertThat(form.getUsers().get(0).getName(), is("yamada"));
    assertThat(form.getUsers().get(0).getAge(), is(20));
    assertThat(form.getUsers().get(1).getName(), is("tanaka"));
    assertThat(form.getUsers().get(1).getAge(), is(50));
}