@Test
public void testGetComponentWithId() {
Assert.assertSame("Incorrect component returned for root", root, TreeUtil.
getComponentWithId(root, root.getId()));
Assert.assertSame("Incorrect component returned for containerChild", containerChild,
TreeUtil.getComponentWithId(root, containerChild.getId()));
Assert.assertSame("Incorrect component returned for simpleChild", simpleChild, TreeUtil.
getComponentWithId(root, simpleChild.getId()));
Assert.assertSame("Incorrect component returned for repeaterChild", repeaterChild, TreeUtil.
getComponentWithId(root, repeaterChild.getId()));
Assert.assertSame("Incorrect component returned for grandChild", grandChild, TreeUtil.
getComponentWithId(root, grandChild.getId()));
UIContext row2Context = repeaterChild.getRowContext("2");
setActiveContext(row2Context);
Assert.assertSame("Incorrect component returned for repeatedComponent row 2",
repeatedComponent, TreeUtil.getComponentWithId(root, repeatedComponent.getId()));
}