@Test
public void testKradUifCollectionGroupBuilder() throws Throwable {

    UifUnitTestUtils.establishMockConfig(ObjectPropertyUtilsTest.class.getSimpleName());
    UifUnitTestUtils.establishMockUserSession("testuser");
    try {
        // Performance medium generates this property path:
        // newCollectionLines['newCollectionLines_'mediumCollection1'_.subList']
        // Below recreates the stack trace that ensued due to poorly escaped quotes,
        // and proves that the parser works around bad quoting in a manner similar to BeanWrapper 
        final CollectionGroupBuilder collectionGroupBuilder = new CollectionGroupBuilder();
        final CollectionTestForm form = new CollectionTestForm();
        CollectionTestItem item = new CollectionTestItem();
        item.setFoobar("barfoo");
        ObjectPropertyUtils.setPropertyValue(form, "foo.baz['foo_bar_'badquotes'_.foobar']", item);
        assertEquals("barfoo", form.foo.baz.get("foo_bar_'badquotes'_.foobar").foobar);
        final FormView view = new FormView();
        view.setFormClass(CollectionTestForm.class);
        view.setViewHelperService(new ViewHelperServiceImpl());
        view.setPresentationController(new ViewPresentationControllerBase());
        view.setAuthorizer(UifUnitTestUtils.getAllowMostViewAuthorizer());
        final CollectionGroup collectionGroup = new CollectionGroupBase();
        collectionGroup.setCollectionObjectClass(CollectionTestItem.class);
        collectionGroup.setAddLinePropertyName("addLineFoo");
        StackedLayoutManager layoutManager = new StackedLayoutManagerBase();
        Group lineGroupPrototype = new GroupBase();
        layoutManager.setLineGroupPrototype(lineGroupPrototype);
        collectionGroup.setLayoutManager(layoutManager);
        BindingInfo addLineBindingInfo = new BindingInfo();
        addLineBindingInfo.setBindingPath("foo.baz['foo_bar_'badquotes'_.foobar']");
        collectionGroup.setAddLineBindingInfo(addLineBindingInfo);
        BindingInfo collectionBindingInfo = new BindingInfo();
        collectionBindingInfo.setBindingPath("foo.bar");
        collectionGroup.setBindingInfo(collectionBindingInfo);
        ViewLifecycle.encapsulateLifecycle(view, form, null, new Runnable() {
            @Override
            public void run() {
                collectionGroupBuilder.build(view, form, (CollectionGroup) CopyUtils.copy(collectionGroup));
            }
        });
    } finally {
        GlobalVariables.setUserSession(null);
        GlobalVariables.clear();
        GlobalResourceLoader.stop();
    }
}