Tests refactoring

Refactored methods, added endpoint configuration in client