From 63edf437d7e2556e872b82d2e6b5976bf97c6344 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com> Date: Wed, 10 Aug 2022 18:28:29 -0400 Subject: [PATCH] Updates matcher to use hasItem (#2018) Signed-off-by: Darshit Chanpura Signed-off-by: Darshit Chanpura --- .../security/sanity/tests/SingleClusterSanityIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/opensearch/security/sanity/tests/SingleClusterSanityIT.java b/src/test/java/org/opensearch/security/sanity/tests/SingleClusterSanityIT.java index c327687371..55d4a6ea0b 100644 --- a/src/test/java/org/opensearch/security/sanity/tests/SingleClusterSanityIT.java +++ b/src/test/java/org/opensearch/security/sanity/tests/SingleClusterSanityIT.java @@ -20,7 +20,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.anEmptyMap; -import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; @@ -44,7 +44,7 @@ private void verifyPluginInstallationOnAllNodes() throws Exception { List> plugins = (List>) node.get("plugins"); Set pluginNames = plugins.stream().map(map -> map.get("name")).collect(Collectors.toSet()); - MatcherAssert.assertThat(pluginNames, contains(SECURITY_PLUGIN_NAME)); + MatcherAssert.assertThat(pluginNames, hasItem(SECURITY_PLUGIN_NAME)); } MatcherAssert.assertThat(nodesInCluster, is(not(anEmptyMap()))); }