Adding API tests