add integration tests to test the api.
add integration tests to test the api.