public Rule answer(InvocationOnMock iom) throws Throwable {
return Rule.create((String) iom.getArguments()[0], (String) iom.getArguments()[1], (String) iom.getArguments()[1]);
}
});
ValidationMessages messages = ValidationMessages.create();
RulesProfile profile = new AnnotationProfileParser(ruleFinder).parse("squid", "Foo way", "java", Lists.<Class> newArrayList(FakeRule.class), messages);
assertThat(profile.getName(), is("Foo way"));
assertThat(profile.getLanguage(), is("java"));
assertThat(profile.getActiveRule("squid", "fake").getSeverity(), is(RulePriority.BLOCKER));
assertThat(messages.hasErrors(), is(false));
}