Tests refactoring.
Tests refactoring