JobListBasicFiltersPresenter extends BasicFiltersPresenter { @Override public void loadFilters() { view.addMultiSelectFilter(constants.Status(), JobStatusConverter.getStatesStrMapping(), f -> addSearchFilterList(COLUMN_STATUS, f)); final DataSetLookup dataSetLookup = DataSetLookupFactory.newDataSetLookupBuilder() .dataset(REQUEST_LIST_DATASET) .group(COLUMN_PROCESS_NAME) .column(COLUMN_PROCESS_NAME) .sort(COLUMN_PROCESS_NAME, SortOrder.ASCENDING) .buildLookup(); view.addDataSetSelectFilter(constants.Process_Name(), dataSetLookup, COLUMN_PROCESS_NAME, COLUMN_PROCESS_NAME, f -> addSearchFilter(f, equalsTo(COLUMN_PROCESS_NAME, f.getValue()))); view.addNumericFilter(constants.Process_Instance_Id(), constants.FilterByProcessInstanceId(), f -> addSearchFilter(f, equalsTo(COLUMN_PROCESS_INSTANCE_ID, f.getValue())) ); view.addTextFilter(constants.BusinessKey(), constants.FilterByBusinessKey(), f -> addSearchFilter(f, likeTo(COLUMN_BUSINESSKEY, f.getValue(), false)) ); view.addTextFilter(constants.Type(), constants.FilterByType(), f -> addSearchFilter(f, likeTo(COLUMN_COMMANDNAME, f.getValue(), false)) ); view.addTextFilter(constants.Process_Instance_Description(), constants.FilterByProcessDescription(), f -> addSearchFilter(f, likeTo(COLUMN_PROCESS_INSTANCE_DESCRIPTION, f.getValue(), false)) ); view.addDateRangeFilter(constants.Due_On(), constants.Due_On_Placeholder(), false, f -> addSearchFilter(f, between(COLUMN_TIMESTAMP, f.getValue().getStartDate(), f.getValue().getEndDate())) ); }  @Override String getDataSetId(); @Override void loadFilters();  }
@Override @Test public void testLoadFilters() { presenter.loadFilters(); final InOrder inOrder = inOrder(getView()); inOrder.verify(getView()).addMultiSelectFilter(eq(Constants.INSTANCE.Status()), any(), any()); inOrder.verify(getView()).addDataSetSelectFilter(eq(Constants.INSTANCE.Process_Name()), any(), any(), any(), any()); inOrder.verify(getView()).addNumericFilter(eq(Constants.INSTANCE.Process_Instance_Id()), any(), any()); inOrder.verify(getView()).addTextFilter(eq(Constants.INSTANCE.BusinessKey()), any(), any()); inOrder.verify(getView()).addTextFilter(eq(Constants.INSTANCE.Type()), any(), any()); inOrder.verify(getView()).addTextFilter(eq(Constants.INSTANCE.Process_Instance_Description()), any(), any()); inOrder.verify(getView()).addDateRangeFilter(eq(Constants.INSTANCE.Due_On()), any(), any(), any()); }