API Endpoint tests