tests for the api