Test blocks refactoring