diff --git a/core/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java b/core/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java index 4459cf40412..7d2e64b79e4 100644 --- a/core/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java +++ b/core/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java @@ -276,7 +276,7 @@ public abstract class BaseQueryTestCase> ext */ protected final void assertLuceneQuery(QB queryBuilder, Query query, QueryParseContext context) { if (queryBuilder.queryName() != null) { - Query namedQuery = context.copyNamedFilters().get(queryBuilder.queryName()); + Query namedQuery = context.copyNamedQueries().get(queryBuilder.queryName()); assertThat(namedQuery, equalTo(query)); } }