api test & class