File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
java-client/src/test/java/co/elastic/clients/elasticsearch/model Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 2929import co .elastic .clients .elasticsearch ._types .query_dsl .Query ;
3030import co .elastic .clients .elasticsearch ._types .query_dsl .ShapeQuery ;
3131import co .elastic .clients .elasticsearch ._types .query_dsl .TermQuery ;
32+ import co .elastic .clients .elasticsearch .connector .UpdateIndexNameRequest ;
3233import co .elastic .clients .json .JsonData ;
3334import co .elastic .clients .testkit .ModelTestCase ;
3435import co .elastic .clients .util .MapBuilder ;
@@ -169,4 +170,16 @@ public void testShortcutProperty() {
169170 assertEquals ("some-field" , q .term ().field ());
170171 assertEquals ("some-value" , q .term ().value ().stringValue ());
171172 }
173+
174+ @ Test
175+ public void testWithNull () {
176+
177+ String jsonValue = "{\" index_name\" :\" value\" }" ;
178+ String jsonNull = "{\" index_name\" :null}" ;
179+ UpdateIndexNameRequest updateValue = UpdateIndexNameRequest .of (u -> u .connectorId ("connector" ).indexName ("value" ));
180+ UpdateIndexNameRequest updateNull = UpdateIndexNameRequest .of (u -> u .connectorId ("connector" ).indexNameWithNull ());
181+
182+ assertEquals (jsonValue ,toJson (updateValue ));
183+ assertEquals (jsonNull ,toJson (updateNull ));
184+ }
172185}
You can’t perform that action at this time.
0 commit comments