How to expand grid tree toggle in Ui unit test?

While writing UI unit tests with Java, i am looking for a way to expand (simulate a click) a grid-tree-toggle without using TestBench:

After click this should be expanded like:

I tried:

TreeGrid attributeSelectionGrid =
        getComponentFromLayoutById(dialogContentVl, "attribut-auswahl-grid", TreeGrid.class); 

attributeSelectionGrid.expand(test(attributeSelectionGrid).getRow(0))

, but it doesn’t works

It think it should work. What I suspect is that there is something wrong with equals/hashCode of the item object. Hence when you call expand method, the TreeGrid (or actually the underlying data logic) does not recognize the given item is in the data set.