test code refactorings