tests for API