tests for node collapsing