@Override
    public boolean isIndexed(QueryContext queryContext) {
        Index index = queryContext.matchIndex(attributeName, QueryContext.IndexMatchHint.PREFER_ORDERED);
        return index != null && index.isOrdered() && expressionCanBeUsedAsIndexPrefix();
    }
@Test
    public void likePredicateIsNotIndexed_whenUnderscoreWildcardIsUsed() {
        QueryContext queryContext = mock(QueryContext.class);
        when(queryContext.matchIndex("this", QueryContext.IndexMatchHint.PREFER_ORDERED)).thenReturn(createIndex(IndexType.SORTED));

        assertFalse(new LikePredicate("this", "string_").isIndexed(queryContext));
    }