diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/CompositeDateHistogramAggregationSourceTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/CompositeDateHistogramAggregationSourceTest.java new file mode 100644 index 000000000..8a9aaff79 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/aggregations/CompositeDateHistogramAggregationSourceTest.java @@ -0,0 +1,23 @@ +/* + * 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 CompositeDateHistogramAggregationSourceTest extends ModelTestCase { + + @Test + public void testSerializeSpecificFields() { + String json = "{\"calendar_interval\":\"1d\",\"fixed_interval\":\"1d\",\"offset\":1,\"time_zone\":\"+01:00\"}"; + CompositeDateHistogramAggregationSource aggregation = fromJson(json, CompositeDateHistogramAggregationSource._DESERIALIZER); + assertEquals(json, toJson(aggregation)); + } + +}