Receiver { private void init(final DrlInitialize initialize) { try { final AnalyzerBuilder analyzerBuilder = new AnalyzerBuilder() .with(initialize) .with(checkRunner) .with(new Reporter() { @Override public void sendReport(final Set<Issue> issues) { latestReport = new Issues(initialize.getUuid(), issues); poster.post(latestReport); } @Override public void sendStatus(final Status status) { poster.post(status); } }); analyzer = analyzerBuilder.buildAnalyzer(); index = analyzerBuilder.getIndex(); configuration = analyzerBuilder.getConfiguration(); analyzer.resetChecks(); analyzer.analyze(); } catch (final BuildException e) { poster.post(new WebWorkerException("Initialization failed: " + e.getMessage())); } } Receiver(final Poster poster,
                    final CheckRunner checkRunner); void received(final Object o);  }
@Test public void testInit() throws Exception { final GuidedDecisionTable52 table1 = analyzerProvider.makeAnalyser() .withPersonAgeColumn(">") .withPersonApprovedActionSetField() .withData(DataBuilderProvider .row(0, true) .end()) .buildTable(); receiver.received(new DrlInitialize("testUUID", table1, new ModelMetaDataEnhancer(table1).getHeaderMetaData(), analyzerProvider.getFactTypes(), "dd-MMM-yyyy")); verify(poster).post(issuesArgumentCaptor.capture()); }