Add tests for sorting children