Fix the list endpoints test npe issue