diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java index f647ae56f0..bcf4d1081c 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java @@ -221,7 +221,7 @@ public void testNeuralQuery() { assertEquals("passage_embedding", searchRequest.query().neural().field()); assertEquals("Hi world", searchRequest.query().neural().queryText()); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().neural().modelId()); - assertEquals(100, searchRequest.query().neural().k()); + assertEquals((Integer) 100, searchRequest.query().neural().k()); } @Test @@ -251,7 +251,7 @@ public void testNeuralQueryFromJson() { searchRequest.query().neural().queryImage() ); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().neural().modelId()); - assertEquals(100, searchRequest.query().neural().k()); + assertEquals((Integer) 100, searchRequest.query().neural().k()); } @Test @@ -279,10 +279,10 @@ public void testHybridQuery() { assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(1).neural().field()); assertEquals("Hi world", searchRequest.query().hybrid().queries().get(1).neural().queryText()); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().hybrid().queries().get(1).neural().modelId()); - assertEquals(100, searchRequest.query().hybrid().queries().get(1).neural().k()); + assertEquals((Integer) 100, searchRequest.query().hybrid().queries().get(1).neural().k()); assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(2).knn().field()); assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().vector().length); - assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().k()); + assertEquals((Integer) 2, searchRequest.query().hybrid().queries().get(2).knn().k()); } @Test @@ -301,9 +301,9 @@ public void testHybridQueryFromJson() { assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(1).neural().field()); assertEquals("Hi world", searchRequest.query().hybrid().queries().get(1).neural().queryText()); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().hybrid().queries().get(1).neural().modelId()); - assertEquals(100, searchRequest.query().hybrid().queries().get(1).neural().k()); + assertEquals((Integer) 100, searchRequest.query().hybrid().queries().get(1).neural().k()); assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(2).knn().field()); assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().vector().length); - assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().k()); + assertEquals((Integer) 2, searchRequest.query().hybrid().queries().get(2).knn().k()); } }