There was an error while loading. Please reload this page.
1 parent a99cacd commit 2c52b4fCopy full SHA for 2c52b4f
java-client/src/test/java/co/elastic/clients/elasticsearch/model/VariantsTest.java
@@ -21,6 +21,7 @@
21
22
import co.elastic.clients.elasticsearch._types.mapping.Property;
23
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
24
+import co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders;
25
import org.junit.Test;
26
27
public class VariantsTest extends ModelTestCase {
@@ -93,4 +94,11 @@ public void testInternalTag() {
93
94
95
assertTrue(property.ip().fields().get("a-field").float_().coerce());
96
}
97
+
98
+ @Test
99
+ public void testBuilders() {
100
+ Query q = new Query(QueryBuilders.exists().field("foo"));
101
102
+ assertEquals("{\"exists\":{\"field\":\"foo\"}}", toJson(q));
103
+ }
104
0 commit comments