Small refactoring of Grid tests