refactor api tests - use assertEquals