From 9d4a996a9aceaded4c2b313c52581b331b4d91a9 Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Thu, 5 Oct 2023 10:58:24 -0700 Subject: [PATCH] Addressed PR comments Signed-off-by: Owais Kazi --- .../ml/client/MachineLearningNodeClientTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java b/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java index 23e4c81c73..3ff76108c4 100644 --- a/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java +++ b/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java @@ -74,9 +74,7 @@ import org.opensearch.search.suggest.Suggest; import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import static org.junit.Assert.assertEquals; import static org.mockito.Answers.RETURNS_DEEP_STUBS; @@ -650,7 +648,8 @@ public void createConnector() { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(MLCreateConnectorResponse.class); Map params = Map.ofEntries(Map.entry("endpoint", "endpoint"), Map.entry("temp", "7")); - Map credentials = Map.ofEntries(Map.entry("key1", "key1"), Map.entry("key2", "key2")); + Map credentials = Map.ofEntries(Map.entry("key1", "value1"), Map.entry("key2", "value2")); + List backendRoles = Arrays.asList("IT", "HR"); MLCreateConnectorInput mlCreateConnectorInput = MLCreateConnectorInput.builder() .name("test") @@ -660,7 +659,7 @@ public void createConnector() { .parameters(params) .credential(credentials) .actions(null) - .backendRoles(null) + .backendRoles(backendRoles) .addAllBackendRoles(false) .access(AccessMode.from("private")) .dryRun(false)