}
@Test
public void shouldCacheFindByKey() {
setupData("shared");
RuleFinder finder = new CacheRuleFinder(getSessionFactory());
Rule rule = finder.findByKey("checkstyle", "com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck");
assertThat(rule.getConfigKey(), is("Checker/Treewalker/AnnotationUseStyleCheck"));
deleteRules();
rule = finder.findByKey("checkstyle", "com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck");
assertThat(rule, notNullValue());
}