parser tests refactoring