// Check that Issue is in Index
assertThat(indexClient.get(IssueIndex.class).countAll()).isEqualTo(1);
// should find by key
Issue issueDoc = indexClient.get(IssueIndex.class).getByKey(issue.getKey());
// Check all normalized fields
assertThat(issueDoc.actionPlanKey()).isEqualTo(issue.getActionPlanKey());
assertThat(issueDoc.assignee()).isEqualTo(issue.getAssignee());
assertThat(issueDoc.authorLogin()).isEqualTo(issue.getAuthorLogin());
assertThat(issueDoc.closeDate()).isEqualTo(issue.getIssueCloseDate());
assertThat(issueDoc.effortToFix()).isEqualTo(issue.getEffortToFix());
assertThat(issueDoc.resolution()).isEqualTo(issue.getResolution());
assertThat(issueDoc.ruleKey()).isEqualTo(RuleKey.of(issue.getRuleRepo(), issue.getRule()));
assertThat(issueDoc.line()).isEqualTo(issue.getLine());
assertThat(issueDoc.message()).isEqualTo(issue.getMessage());
assertThat(issueDoc.reporter()).isEqualTo(issue.getReporter());
assertThat(issueDoc.key()).isEqualTo(issue.getKey());
assertThat(issueDoc.updateDate()).isEqualTo(issue.getIssueUpdateDate());
assertThat(issueDoc.status()).isEqualTo(issue.getStatus());
assertThat(issueDoc.severity()).isEqualTo(issue.getSeverity());
assertThat(issueDoc.attributes()).isEqualTo(KeyValueFormat.parse(issue.getIssueAttributes()));
assertThat(issueDoc.attribute("key")).isEqualTo("value");
}