DirectiveBasedJavascriptGroup jg = new DirectiveBasedJavascriptGroup("testDummy", file.getParentFile(),
file.getName(), ImmutableList.<DirectiveType<?>> of(DirectiveFactory.getMultiLineMockDirectiveType(),
new IncludeDirectiveType()), EnumSet.of(JavascriptGeneratorMode.TESTING));
DirectiveParser dp = new DirectiveParser(jg, jg.getStartFile());
dp.parseFile();
List<JavascriptProcessingError> error = dp.validate(new JavascriptValidator());
assertTrue("Should have thrown an error for encoutering a multi-line directive", error.size() == 1);
assertTrue("The only error should have been for an unmatched end directive.", error.listIterator().next()
.getMessage().equals("nested directive found, ignored"));
}