@Test
public void testToMap() {

  Map<String, String> map = BeanUtils.beanMap(new MyBean(), false);
  Assert.assertEquals("foo", map.get("foo"));
  Assert.assertEquals("3", map.get("bar"));
  Assert.assertNull(map.get("withParams"));
  Assert.assertEquals("[<MyBean>, <MyBean>]", map.get("list"));
}