public UiTopoLayout parent(UiTopoLayoutId parentId) {
        if (isRoot()) {
            throw new IllegalArgumentException(E_ROOT_PARENT);
        }
        // TODO: consider checking ancestry chain to prevent loops

        parent = parentId;
        return this;
    }
@Test
    public void setParentOnRoot() {
        mkRootLayout();
        try {
            layout.parent(OTHER_ID);
            fail(AM_NOEX);
        } catch (IllegalArgumentException e) {
            assertEquals(AM_WREXMSG, E_ROOT_PARENT, e.getMessage());
        }

        try {
            layout.parent(null);
            fail(AM_NOEX);
        } catch (IllegalArgumentException e) {
            assertEquals(AM_WREXMSG, E_ROOT_PARENT, e.getMessage());
        }
    }