diff --git a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalSpecTests.java b/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalSpecTests.java index 62155d8bcfd..6694360a2e7 100644 --- a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalSpecTests.java +++ b/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalSpecTests.java @@ -98,7 +98,7 @@ public class RankEvalSpecTests extends ESTestCase { RankEvalSpec testItem = new RankEvalSpec(specs, metric); if (randomBoolean()) { - final Map params = randomBoolean() ? null : Collections.singletonMap("key", "value"); + final Map params = randomBoolean() ? Collections.emptyMap() : Collections.singletonMap("key", "value"); ScriptType scriptType = randomFrom(ScriptType.values()); String script; if (scriptType == ScriptType.INLINE) {