unit tests for /api/tests