Simplified a bit the api tests