This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
commit 0573544bafe759672656d3956c156a6498b85a35 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jan 29 12:57:10 2024 -0500 Simplify test Sort new method --- .../commons/configuration2/TestConfigurationMap.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java b/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java index 4b2c8719..21f7bd53 100644 --- a/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java +++ b/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java @@ -56,6 +56,14 @@ public class TestConfigurationMap { map = null; } + /** + * Attempts to create a ConfigurationMap with null configuration. This should cause an exception. + */ + @Test + public void testNullConfig() { + assertThrows(NullPointerException.class, () -> new ConfigurationMap(null)); + } + /** * Class under test for Object put(Object, Object) */ @@ -71,16 +79,4 @@ public class TestConfigurationMap { } } - /** - * Attempts to create a ConfigurationMap with null configuration. - * This should cause an exception. - */ - @Test - public void testNullConfig() { - assertThrows(NullPointerException.class, () -> { - final Configuration cf = null; - new ConfigurationMap(cf); - }); - } - }