added assertions to API tests