[Tests] Refactoring.