Improving api tests