@Test
public void testCanonicalPath() {

    String path = "foo.foo1.foo2";
    assertEquals(path, ObjectPropertyUtils.getCanonicalPath(path));
    path = "foo[1]";
    assertEquals("foo", ObjectPropertyUtils.getCanonicalPath(path));
    path = "foo.foo1['key.nested'].foo2";
    assertEquals("foo.foo1.foo2", ObjectPropertyUtils.getCanonicalPath(path));
    path = "foo.foo1['key.nested'].foo2.foo3['key.nest.nest'].foo4";
    assertEquals("foo.foo1.foo2.foo3.foo4", ObjectPropertyUtils.getCanonicalPath(path));
}