PsiElement () { final YAMLFile file = createDummyYamlWithText("? foo : bar"); final PsiElement at = file.findElementAt("? foo ".length()); assert at != null && at.getNode().getElementType() == YAMLTokenTypes.COLON; return at; }