tests: refactoring