@Test
  public void testRunTests() throws Exception {

    for (RuleInspector ruleInspector : cache.all()) {
      assertNoIssues(ruleInspector);
    }

    this.checkRunManager.run(null, null);

    for (RuleInspector ruleInspector : cache.all()) {
      assertHasIssues(ruleInspector);
    }
  }
  @Before
  public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();

    checkStorage =
        new CheckStorage(
            new CheckFactory(configuration) {
              @Override
              public HashSet<Check> makeSingleChecks(final RuleInspector ruleInspector) {
                final HashSet<Check> result = new HashSet<>();
                result.add(new MockSingleCheck(ruleInspector));
                return result;
              }
            });

    ruleInspectors = new ArrayList<>();
    when(cache.all()).thenReturn(ruleInspectors);

    ruleInspector1 = mockRowInspector(1);
    ruleInspectors.add(ruleInspector1);
    ruleInspector2 = mockRowInspector(2);
    ruleInspectors.add(ruleInspector2);
    ruleInspector3 = mockRowInspector(3);
    ruleInspectors.add(ruleInspector3);

    checkRunManager.addChecks(ruleInspector1.getChecks());
    checkRunManager.addChecks(ruleInspector2.getChecks());
    checkRunManager.addChecks(ruleInspector3.getChecks());
  }