static IndexComponentFilter findBestComponentFilter(
            IndexType type,
            List<IndexComponentCandidate> candidates,
            QueryDataType converterType
    ) {
        // First look for equality filters, assuming that they are more selective than ranges
        IndexComponentFilter equalityComponentFilter = searchForEquality(candidates, converterType);
        if (equalityComponentFilter != null) {
            return equalityComponentFilter;
        }

        // Look for ranges filters
        return searchForRange(type, candidates, converterType);
    }
@Test
    public void when_lowerBoundRangeFilterPresentAndNoBetterChoiceAndSortedIndex_then_itIsUsed() {
        IndexComponentFilter bestFilter = IndexComponentFilterResolver.findBestComponentFilter(
                indexType, WITH_LOWER_BOUND_RANGE_AS_BEST_CANDIDATES, QUERY_DATA_TYPE
        );

        if (indexType == IndexType.SORTED) {
            assertEquals(bestFilter.getFilter(), LOWER_BOUND_RANGE_CANDIDATE.getFilter());
        } else {
            assertNull(bestFilter);
        }
    }