assertEquals(textRegions.get(1).getType(),
TwigRegionContext.TWIG_CONTENT);
assertEquals(textRegions.get(2).getType(),
TwigRegionContext.TWIG_CLOSE);
TwigScriptRegion scriptRegion = (TwigScriptRegion) textRegions
.get(1);
assertNotNull(scriptRegion);
assertEquals(12, scriptRegion.getTokenCount());
assertEquals(scriptRegion.getTwigToken(0).getType(),
TwigRegionContext.TWIG_LABEL);
assertEquals(scriptRegion.getTwigToken(1).getType(),
TwigRegionContext.TWIG_LABEL);
assertEquals(scriptRegion.getTwigToken(6).getType(),
TwigRegionContext.TWIG_CONSTANT_ENCAPSED_STRING);
assertEquals(scriptRegion.getTwigToken(16).getType(),
TwigRegionContext.TWIG_CONSTANT_ENCAPSED_STRING);
} catch (Exception e) {
fail();