ProcessInstanceListBasicFiltersPresenter extends BasicFiltersPresenter { protected void addParentProcessIdFilter() { final DataSetLookup dataSetLookup = DataSetLookupFactory.newDataSetLookupBuilder() .dataset(PROCESS_INSTANCE_DATASET) .group(COLUMN_PARENT_PROCESS_INSTANCE_ID) .column(COLUMN_PARENT_PROCESS_INSTANCE_ID) .filter(COLUMN_PARENT_PROCESS_INSTANCE_ID, notEqualsTo(-1)) .sort(COLUMN_PARENT_PROCESS_INSTANCE_ID, SortOrder.ASCENDING) .buildLookup(); view.addDataSetSelectFilter(constants.Parent_Process_Instance_Id(), dataSetLookup, COLUMN_PARENT_PROCESS_INSTANCE_ID, COLUMN_PARENT_PROCESS_INSTANCE_ID, f -> addSearchFilter(f, equalsTo(COLUMN_PARENT_PROCESS_INSTANCE_ID, f.getValue()))); }  @Override String getDataSetId(); @Override void loadFilters();  }
@Test public void testParentProcessIdFilter() { presenter.addParentProcessIdFilter(); verify(getView()).addDataSetSelectFilter(eq(Constants.INSTANCE.Parent_Process_Instance_Id()), any(), eq(COLUMN_PARENT_PROCESS_INSTANCE_ID), eq(COLUMN_PARENT_PROCESS_INSTANCE_ID), any()); }