SearchableElementFactory { public GuidedDecisionTableSearchableElement makeSearchableElement(final int row, final int column, final DTCellValue52 cellValue52, final GuidedDecisionTableView widget, final GuidedDecisionTable52 model, final GuidedDecisionTableModellerView.Presenter modeller) { final GuidedDecisionTableSearchableElement searchableElement = new GuidedDecisionTableSearchableElement(); searchableElement.setHighlightHelper(highlightHelper); searchableElement.setModeller(modeller); searchableElement.setValue(cellUtilities.asString(cellValue52)); searchableElement.setRow(row); searchableElement.setColumn(column); searchableElement.setWidget(widget); searchableElement.setModel(model); return searchableElement; } @Inject  SearchableElementFactory(final GuidedDecisionTableGridHighlightHelper highlightHelper); GuidedDecisionTableSearchableElement makeSearchableElement(final int row,
                                                                      final int column,
                                                                      final DTCellValue52 cellValue52,
                                                                      final GuidedDecisionTableView widget,
                                                                      final GuidedDecisionTable52 model,
                                                                      final GuidedDecisionTableModellerView.Presenter modeller);  }
@Test public void testMakeSearchableElement() { final int row = 0; final int column = 0; final String value = "value"; final DTCellValue52 cellValue52 = new DTCellValue52(value); final GuidedDecisionTableModellerView.Presenter modeller = mock(GuidedDecisionTableModellerView.Presenter.class); final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class); final GuidedDecisionTableSearchableElement element = factory.makeSearchableElement(row, column, cellValue52, null, model, modeller); assertEquals(row, element.getRow()); assertEquals(column, element.getColumn()); assertEquals(value, element.getValue()); assertEquals(modeller, element.getModeller()); assertEquals(highlightHelper, element.getHighlightHelper()); assertEquals(model, element.getModel()); }