Test cases refactoring