It seems there is a bub in TreeDataModel class in walk() function.
I have a ClassCastException in string:
Map.Entry childEntry = children.hasNext() ? (Map.Entry) children.next() : null;
The contract of the API (and the documentation) currently says that TreeNode.getData() has to return a Map.Entry, with identifier/value pairs.
The identifiers are then used in other TreeNode methods.