Added tests for replace_node_heading