Improved TestAPI test