### Question:
ReferentialIntegrityAnalyzerReducer implements AnalyzerResultReducer<ReferentialIntegrityAnalyzerResult> { @Override public ReferentialIntegrityAnalyzerResult reduce( final Collection<? extends ReferentialIntegrityAnalyzerResult> partialResults) { if (partialResults.isEmpty()) { return null; } final RowAnnotation reducerAnnotation = new RowAnnotationImpl(); final InMemoryRowAnnotationFactory2 reducerAnnotationFactory = new InMemoryRowAnnotationFactory2(); InputColumn<?>[] highlightedColumns = null; for (final ReferentialIntegrityAnalyzerResult partialResult : partialResults) { final List<InputRow> partialRows = partialResult.getSampleRows(); for (final InputRow partialRow : partialRows) { reducerAnnotationFactory.annotate(partialRow, reducerAnnotation); } highlightedColumns = partialResult.getHighlightedColumns(); } return new ReferentialIntegrityAnalyzerResult(reducerAnnotation, reducerAnnotationFactory, highlightedColumns); }  @Override ReferentialIntegrityAnalyzerResult reduce(
            final Collection<? extends ReferentialIntegrityAnalyzerResult> partialResults);  }### Answer:
@Test public void testVanilla() throws Throwable { final AnalysisJobBuilder jobBuilder1 = getAnalysisJobBuilder(); final AnalysisJobBuilder jobBuilder2 = getAnalysisJobBuilder(); final AnalysisJobBuilder jobBuilder3 = getAnalysisJobBuilder(); final ReferentialIntegrityAnalyzerResult partialResult1 = getPartialResult(jobBuilder1, 1, 100); final ReferentialIntegrityAnalyzerResult partialResult2 = getPartialResult(jobBuilder2, 101, 1); final ReferentialIntegrityAnalyzerResult partialResult3 = getPartialResult(jobBuilder3, 102, null); { final InputColumn<?> salesRepEmployeeNumber = jobBuilder1.getSourceColumnByName("SALESREPEMPLOYEENUMBER"); final int annotatedRowCount = partialResult1.getAnnotatedRowCount(); assertEquals(1, annotatedRowCount); final List<InputRow> rows = partialResult1.getSampleRows(); assertEquals(1, rows.size()); assertEquals(-1, rows.get(0).getValue(salesRepEmployeeNumber)); } { final InputColumn<?> salesRepEmployeeNumber = jobBuilder2.getSourceColumnByName("SALESREPEMPLOYEENUMBER"); final int annotatedRowCount = partialResult2.getAnnotatedRowCount(); assertEquals(1, annotatedRowCount); final List<InputRow> rows = partialResult2.getSampleRows(); assertEquals(1, rows.size()); assertEquals(-1, rows.get(0).getValue(salesRepEmployeeNumber)); } { final InputColumn<?> salesRepEmployeeNumber = jobBuilder3.getSourceColumnByName("SALESREPEMPLOYEENUMBER"); final int annotatedRowCount = partialResult3.getAnnotatedRowCount(); assertEquals(1, annotatedRowCount); final List<InputRow> rows = partialResult3.getSampleRows(); assertEquals(1, rows.size()); assertEquals(0, rows.get(0).getValue(salesRepEmployeeNumber)); } final Collection<ReferentialIntegrityAnalyzerResult> partialResults = new ArrayList<>(); partialResults.add(partialResult1); partialResults.add(partialResult2); partialResults.add(partialResult3); final ReferentialIntegrityAnalyzerReducer reducer = new ReferentialIntegrityAnalyzerReducer(); final ReferentialIntegrityAnalyzerResult reducedResult = reducer.reduce(partialResults); { final InputColumn<?> salesRepEmployeeNumber = jobBuilder1.getSourceColumnByName("SALESREPEMPLOYEENUMBER"); final int annotatedRowCount = reducedResult.getAnnotatedRowCount(); assertEquals(3, annotatedRowCount); final List<InputRow> rows = reducedResult.getSampleRows(); assertEquals(3, rows.size()); assertEquals(-1, rows.get(0).getValue(salesRepEmployeeNumber)); assertEquals(-1, rows.get(1).getValue(salesRepEmployeeNumber)); assertEquals(0, rows.get(2).getValue(salesRepEmployeeNumber)); } }