diff --git a/core/src/test/java/org/elasticsearch/common/settings/loader/PropertiesSettingsLoaderTests.java b/core/src/test/java/org/elasticsearch/common/settings/loader/PropertiesSettingsLoaderTests.java index bbeadfd1a87..ab96f763a88 100644 --- a/core/src/test/java/org/elasticsearch/common/settings/loader/PropertiesSettingsLoaderTests.java +++ b/core/src/test/java/org/elasticsearch/common/settings/loader/PropertiesSettingsLoaderTests.java @@ -49,4 +49,9 @@ public class PropertiesSettingsLoaderTests extends ESTestCase { assertEquals(e.getMessage(), "duplicate settings key [foo] found, previous value [bar], current value [baz]"); } + public void testThatNoDuplicatesPropertiesDoesNotAcceptNullValues() { + PropertiesSettingsLoader.NoDuplicatesProperties properties = loader.new NoDuplicatesProperties(); + expectThrows(NullPointerException.class, () -> properties.put("key", null)); + } + }