### Question:
ConsensusWarpFieldBuilder { public AffineWarpField build() { return build(AffineWarpField.getDefaultInterpolatorFactory()); } ConsensusWarpFieldBuilder(final double width,
                                     final double height,
                                     final int rowCount,
                                     final int columnCount); int getNumberOfCells(); int getNumberOfConsensusSetsInGrid(); void addConsensusSetData(final Affine2D alignmentModel,
                                    final List<RealPoint> points); AffineWarpField build(); AffineWarpField build(final InterpolatorFactory<RealComposite<DoubleType>, RandomAccessible<RealComposite<DoubleType>>> interpolatorFactory); String toIndexGridString(); ConsensusWarpFieldBuilder mergeBuilders(final ConsensusWarpFieldBuilder otherBuilder); static double[] getAffineMatrixElements(final RealRandomAccess<RealComposite<DoubleType>> warpFieldAccessor,
                                                   final double[] location); static LeafTransformSpec buildSimpleWarpFieldTransformSpec(final AffineWarpField warpField,
                                                                      final Map<HierarchicalStack, AffineWarpField> tierStackToConsensusFieldMap,
                                                                      final double[] locationOffsets,
                                                                      final String warpFieldTransformId); static LeafTransformSpec buildInterpolatedWarpFieldTransformSpec(final AffineWarpField warpField,
                                                                            final Map<HierarchicalStack, AffineWarpField> tierStackToConsensusFieldMap,
                                                                            final double[] locationOffsets,
                                                                            final String warpFieldTransformId);  }### Answer:
@Test public void testBuild() throws Exception { final List<List<PointMatch>> consensusSets = CanvasFeatureMatcherTest.findAndValidateFoldTestConsensusSets(); final int consensusGridResolution = 16; final ConsensusWarpFieldBuilder consensusWarpFieldBuilder = new ConsensusWarpFieldBuilder(963.0, 1024.0, consensusGridResolution, consensusGridResolution); int setNumber = 0; for (final List<PointMatch> pointMatchList : consensusSets) { final List<RealPoint> pointList = pointMatchList.stream() .map(pointMatch -> new RealPoint(pointMatch.getP1().getL())) .collect(Collectors.toList()); final AffineModel2D alignmentModel = new AffineModel2D(); alignmentModel.set(1.0, 0.0, 0.0, 1.0, (setNumber * 100), (setNumber * 100)); consensusWarpFieldBuilder.addConsensusSetData(alignmentModel, pointList); setNumber++; } LOG.info("Consensus Grid is ...\n\n{}\n", consensusWarpFieldBuilder.toIndexGridString()); Assert.assertEquals("invalid number of consensus sets left in grid after nearest neighbor analysis", 3, consensusWarpFieldBuilder.getNumberOfConsensusSetsInGrid()); final AffineWarpFieldTransform affineWarpFieldTransform = new AffineWarpFieldTransform(new double[] {0.0, 0.0}, consensusWarpFieldBuilder.build()); LOG.info("Warp Field Data String is {}", affineWarpFieldTransform.toDataString()); }