BUG-1520 coverage tests for config-api
[controller.git] / opendaylight / config / config-api / src / test / java / org / opendaylight / controller / config / api / jmx / ObjectNameUtilTest.java
index d3d8469dfba7b0409a0c7738be2b43ca76f4a57b..02c1c4b9815ff55843e1abb74e99b0b529d48349 100644 (file)
@@ -14,6 +14,8 @@ import static org.junit.Assert.assertTrue;
 
 import com.google.common.base.Throwables;
 import com.google.common.collect.Maps;
+
+import java.util.HashMap;
 import java.util.Map;
 import javax.management.ObjectName;
 import junit.framework.Assert;
@@ -159,4 +161,15 @@ public class ObjectNameUtilTest {
 
         fail(test + " should have failed on " + ex);
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testCreateON() throws Exception {
+        ObjectNameUtil.createON(">}+!#");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testCreateON2() throws Exception {
+        Map<String, String> map = new HashMap<>();
+        ObjectNameUtil.createON(">}+!#", map);
+    }
 }