RuleCheck checker = new RuleCheck();
addBtmScript(checker, new File("src/test/resources/scripts"));
checker.addPackage("org.jboss.byteman.tests.auxiliary");
checker.addPackage("org.jboss.byteman.tests.bugfixes");
checker.addPackage("org.jboss.byteman.tests.javaops");
checker.addPackage("org.jboss.byteman.tests.helpertests");
checker.checkRules();
RuleCheckResult result= checker.getResult();
if(result.hasError() || result.hasWarning()) {
List<String> errors = result.getErrorMessages();
for(String error : errors) {