@Test
public void ruleSourceInErrorMessage() {

    String statement = "match (n) return n";
    Concept concept = createConcept(statement);
    when(store.executeQuery(eq(statement), anyMap())).thenThrow(new IllegalStateException("An error"));
    ReportPlugin reportWriter = mock(ReportPlugin.class);
    try {
        AnalyzerRuleVisitor analyzerRuleVisitor = new AnalyzerRuleVisitor(configuration, analyzerContext, ruleParameters, ruleInterpreterPlugins,
                reportWriter);
        analyzerRuleVisitor.visitConcept(concept, Severity.MINOR);
        fail("Expecting a " + RuleException.class.getName());
    } catch (RuleException e) {
        String message = e.getMessage();
        assertThat(message, containsString(RULESOURCE));
    }
}