WebDataBinder binder = new WebDataBinder(new TestBean(), "bean");
Map<String,String> values = new HashMap<String, String>();
values.put("name_foo", "rubbish");
// This is what we need...
values.put("name", WebUtils.findParameterValue(values, "name"));
binder.bind(new MutablePropertyValues(values));
TestBean bean = (TestBean) binder.getTarget();
assertEquals("foo", bean.getName());
}
}