Refactoring logic test.