Refactoring data test