IParseResult result = parser.parse(ga.getPuppetManifestRule(), new StringReader(s));
assertFalse("Should not have errors for: " + s, result.hasSyntaxErrors());
assertEquals("parsed should be same as input", s, result.getRootNode().getText());
EObject root = result.getRootASTElement();
assertTrue("Should be PuppetManifest", root instanceof PuppetManifest);
PuppetManifest pm = (PuppetManifest) root;
assertTrue("Manifest should have statements", pm.getStatements().size() > 0);
EObject expr = pm.getStatements().get(0);
assertInstanceOf("Should be ResourceExpression", ResourceExpression.class, expr);
ResourceExpression resourceExpression = (ResourceExpression) expr;
assertInstanceOf(
"Should be LiteralNameOrReference", LiteralNameOrReference.class, resourceExpression.getResourceExpr());
LiteralNameOrReference name = (LiteralNameOrReference) resourceExpression.getResourceExpr();