diff --git a/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java b/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java index 41cb4d12c..813742878 100644 --- a/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java +++ b/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java @@ -5,7 +5,6 @@ package org.opensearch.neuralsearch.ml; -import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -163,7 +162,7 @@ public void testInferenceSentences_whenNotConnectionException_thenNoRetry() { } public void test_inferenceSentencesWithMapResult_whenValidInput_thenSuccess() { - final Map map = ImmutableMap.of("key", "value"); + final Map map = Map.of("key", "value"); final ActionListener> resultListener = mock(ActionListener.class); Mockito.doAnswer(invocation -> { final ActionListener actionListener = invocation.getArgument(2); @@ -262,7 +261,9 @@ private ModelTensorOutput createModelTensorOutput(final Float[] output) { output, new long[] { 1, 2 }, MLResultDataType.FLOAT64, - ByteBuffer.wrap(new byte[12]) + ByteBuffer.wrap(new byte[12]), + "someValue", + Map.of() ); mlModelTensorList.add(tensor); final ModelTensors modelTensors = new ModelTensors(mlModelTensorList);