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..ad031fa432 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregateTest.java @@ -0,0 +1,21 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +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)); + } +}