Added a test for get_all_leaf_nodes