write some api tests