From 132c6a2a637c079ab084c68143f2e7b2608e466e Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Wed, 11 Dec 2024 14:08:24 +1300 Subject: [PATCH] Add failing test Signed-off-by: Thomas Farr --- .../_types/aggregations/FilterAggregateTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregateTest.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregateTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregateTest.java new file mode 100644 index 0000000000..9974dc0032 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregateTest.java @@ -0,0 +1,13 @@ +package org.opensearch.client.opensearch._types.aggregations; + +import org.junit.Test; +import org.opensearch.client.opensearch.model.ModelTestCase; + +public class FilterAggregateTest extends ModelTestCase { + @Test + public void serializesNestedAggregates() { + String json = "{\"sum#l2_result\":{\"value\":1.0},\"doc_count\":1}"; + FilterAggregate aggregate = fromJson(json, FilterAggregate._DESERIALIZER); + assertEquals(json, toJson(aggregate)); + } +}