Improved test endpoint handling