tests: refactoring.