diff options
Diffstat (limited to 'clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/JSONObjectWrapperTest.java')
-rw-r--r-- | clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/JSONObjectWrapperTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/JSONObjectWrapperTest.java b/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/JSONObjectWrapperTest.java new file mode 100644 index 00000000000..160ef498023 --- /dev/null +++ b/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/JSONObjectWrapperTest.java @@ -0,0 +1,16 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.clustercontroller.utils.util; + +import junit.framework.TestCase; + +public class JSONObjectWrapperTest extends TestCase { + + public void testExceptionWrapping() { + JSONObjectWrapper wrapper = new JSONObjectWrapper(); + try{ + wrapper.put(null, "foo"); + } catch (NullPointerException e) { + assertEquals("Null key.", e.getMessage()); + } + } +} |