From 8464b4755fc0f2da53909de6775e9ba4f84265d9 Mon Sep 17 00:00:00 2001 From: javanna Date: Sat, 8 Apr 2017 00:18:56 +0200 Subject: [PATCH] [TEST] replace FareRestRequest usage with ToXContent.MapParams --- .../search/aggregations/ParsedAggregationTests.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/ParsedAggregationTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/ParsedAggregationTests.java index 8962ba21956..0a83bf3eeb8 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/ParsedAggregationTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/ParsedAggregationTests.java @@ -31,7 +31,6 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.rest.action.search.RestSearchAction; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.rest.FakeRestRequest; import java.io.IOException; import java.util.Collections; @@ -57,8 +56,7 @@ public class ParsedAggregationTests extends ESTestCase { } TestInternalAggregation testAgg = new TestInternalAggregation(name, meta); XContentType xContentType = randomFrom(XContentType.values()); - FakeRestRequest params = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) - .withParams(Collections.singletonMap(RestSearchAction.TYPED_KEYS_PARAM, "true")).build(); + ToXContent.MapParams params = new ToXContent.MapParams(Collections.singletonMap(RestSearchAction.TYPED_KEYS_PARAM, "true")); BytesReference bytesAgg = XContentHelper.toXContent(testAgg, xContentType, params, randomBoolean()); try (XContentParser parser = createParser(xContentType.xContent(), bytesAgg)) { parser.nextToken();