NSW forestry agreement under challenge