Fix for missing case in set test cli

    -Also avoid bug in toArray by using the current set size

Change-Id: Ie838b9fe755859a1cb5af11934f29049466eb93f
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java
index 19d3216..792eab9 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java
@@ -74,7 +74,7 @@
         if (set.isEmpty()) {
             print("[]");
         } else {
-            for (String e : set.toArray(new String[0])) {
+            for (String e : set.toArray(new String[set.size()])) {
                 if (output.isEmpty()) {
                     output += e;
                 } else {
@@ -84,7 +84,9 @@
             print("[%s]", output);
         }
         // Check if given values are in the set
-        if (values.length == 1) {
+        if (values == null) {
+            return;
+        } else if (values.length == 1) {
             // contains
             if (set.contains(values[0])) {
                 print("Set %s contains the value %s", setName, values[0]);