Issue issue = mock(Issue.class);
when(issue.isNew()).thenReturn(true);
when(issue.ruleKey()).thenReturn(ruleKey);
when(issue.message()).thenReturn("issue message");
when(issue.componentKey()).thenReturn("componentKey");
when(issue.line()).thenReturn(12);
List<Issue> issues = new ArrayList<Issue>();
issues.add(issue);
when(projectIssues.issues()).thenReturn(issues);