diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java index 038dbf4f51..6e6bd6f72a 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java @@ -21,7 +21,7 @@ import static org.opensearch.ml.utils.TestHelper.getMetricsCorrelationRestRequest; import java.io.IOException; -import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -385,7 +385,7 @@ public void testAnomalyLocalizationExecutionResponse() throws Exception { bucket1.setOverallAggValue(65.0); Result result = new Result(); - result.setBuckets(Arrays.asList(bucket1)); + result.setBuckets(Collections.singletonList(bucket1)); AnomalyLocalizationOutput output = new AnomalyLocalizationOutput(); Map results = new HashMap<>();