Skip to content

Commit 5825c52

Browse files
committed
test fix
1 parent e6279d2 commit 5825c52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java-client/src/test/java/co/elastic/clients/elasticsearch/model/BehaviorsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import co.elastic.clients.json.ObjectDeserializer;
4141
import co.elastic.clients.testkit.ModelTestCase;
4242
import co.elastic.clients.util.MapBuilder;
43+
import jakarta.json.stream.JsonParsingException;
4344
import org.junit.jupiter.api.Test;
4445

4546
import static co.elastic.clients.elasticsearch._types.query_dsl.Query.Kind.MatchAll;
@@ -331,8 +332,7 @@ public void testFunctionScoreQuery() {
331332
assertEquals(MatchAll, fsq.query().functionScore().query()._kind());
332333

333334
// should not work, shortcut for function score query is currently not supported
334-
fsq = fromJson(shortcut, FunctionScoreQuery.class);
335-
assertEquals(0, fsq.functions().size());
335+
assertThrows(JsonParsingException.class,() -> fromJson(shortcut, FunctionScoreQuery.class));
336336
}
337337

338338
@Test

0 commit comments

Comments
 (0)