OntologyCheckRunner { OntologyCheckRunner(Collection<OntologyCheck> checks) { super(); allChecks = new HashMap<TimePoint, Set<OntologyCheck>>(); for (TimePoint timePoint : TimePoint.values()) { allChecks.put(timePoint, new HashSet<OntologyCheck>()); } Set<OntologyCheck> done = new HashSet<OntologyCheck>(); for (OntologyCheck check : checks) { if (check == null) { throw new IllegalArgumentException("null is not a valid check"); } if (done.add(check)) { identifyChecks(check); } } } OntologyCheckRunner(Collection<OntologyCheck> checks);   }
@Test public void testOntologyCheckRunner() throws Exception { Collection<OntologyCheck> checks = new ArrayList<OntologyCheck>(); checks.add(new OntologyCheckRunnerTestChecks(TimePoint.AfterLoad)); checks.add(new OntologyCheckRunnerTestChecks(null)); checks.add(new OntologyCheckRunnerTestChecks(TimePoint.AfterMireot)); checks.add(new OntologyCheckRunnerTestChecks(TimePoint.AfterReasoning)); OntologyCheckRunner runner = new OntologyCheckRunner(checks); assertNotNull(runner); Map<OntologyCheck, Collection<CheckWarning>> results1 = runner.verify(null, null, TimePoint.AfterLoad); assertEquals(2, results1.size()); Map<OntologyCheck, Collection<CheckWarning>> results2 = runner.verify(null, null, TimePoint.AfterMireot); assertEquals(1, results2.size()); Map<OntologyCheck, Collection<CheckWarning>> results3 = runner.verify(null, null, TimePoint.AfterReasoning); assertEquals(1, results3.size()); }