ResourceCache resourceCache = mock(ResourceCache.class);
DeprecatedViolations deprecatedViolations = new DeprecatedViolations(issueCache, ruleFinder, resourceCache);
@Test
public void test_toViolation() throws Exception {
RuleKey ruleKey = RuleKey.of("squid", "AvoidCycles");
when(ruleFinder.findByKey(ruleKey)).thenReturn(new Rule("squid", "AvoidCycles"));
when(resourceCache.get("org.apache:struts")).thenReturn(new Project("org.apache:struts"));
DefaultIssue issue = newIssue(ruleKey);