diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java
new file mode 100644
index 0000000..d63a46c
--- /dev/null
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.distributedprimitives.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.store.serializers.KryoNamespaces;
+import org.onosproject.store.service.ConsistentMap;
+import org.onosproject.store.service.Serializer;
+import org.onosproject.store.service.StorageService;
+import org.onosproject.store.service.Versioned;
+
+/**
+ * CLI command to manipulate a distributed value.
+ */
+@Command(scope = "onos", name = "map-test",
+        description = "Manipulate a consistent map")
+public class ConsistentMapTestCommand extends AbstractShellCommand {
+
+    @Argument(index = 0, name = "name",
+            description = "map name",
+            required = true, multiValued = false)
+    String name = null;
+
+    @Argument(index = 1, name = "operation",
+            description = "operation name",
+            required = true, multiValued = false)
+    String operation = null;
+
+    @Argument(index = 2, name = "key",
+            description = "first arg",
+            required = false, multiValued = false)
+    String arg1 = null;
+
+    @Argument(index = 3, name = "value1",
+            description = "second arg",
+            required = false, multiValued = false)
+    String arg2 = null;
+
+    @Argument(index = 4, name = "value2",
+            description = "third arg",
+            required = false, multiValued = false)
+    String arg3 = null;
+
+    ConsistentMap<String, String> map;
+
+    @Override
+    protected void execute() {
+        StorageService storageService = get(StorageService.class);
+        map = storageService.<String, String>consistentMapBuilder()
+                                    .withName(name)
+                                    .withSerializer(Serializer.using(KryoNamespaces.BASIC))
+                                    .build();
+        if (operation.equals("get")) {
+            print(map.get(arg1));
+        } else if (operation.equals("put")) {
+            print(map.put(arg1, arg2));
+        } else if (operation.equals("size")) {
+            print("%d", map.size());
+        } else if (operation.equals("isEmpty")) {
+            print("%b", map.isEmpty());
+        } else if (operation.equals("putIfAbsent")) {
+            print(map.putIfAbsent(arg1, arg2));
+        } else if (operation.equals("putAndGet")) {
+            print(map.putAndGet(arg1, arg2));
+        } else if (operation.equals("clear")) {
+            map.clear();
+        } else if (operation.equals("remove")) {
+            if (arg2 == null) {
+                print(map.remove(arg1));
+            } else {
+                print("%b", map.remove(arg1, arg2));
+            }
+        } else if (operation.equals("containsKey")) {
+            print("%b", map.containsKey(arg1));
+        } else if (operation.equals("containsValue")) {
+            print("%b", map.containsValue(arg1));
+        } else if (operation.equals("replace")) {
+            if (arg3 == null) {
+                print(map.replace(arg1, arg2));
+            } else {
+                print("%b", map.replace(arg1, arg2, arg3));
+            }
+        }
+    }
+
+    void print(Versioned<String> value) {
+        if (value == null) {
+            print("null");
+        } else {
+            print("%s", value.value());
+        }
+    }
+}
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java
new file mode 100644
index 0000000..992e77e
--- /dev/null
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.distributedprimitives.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.store.service.AtomicCounter;
+import org.onosproject.store.service.StorageService;
+
+/**
+ * CLI command to increment a distributed counter.
+ */
+@Command(scope = "onos", name = "counter-test",
+        description = "Manipulate a distributed counter")
+public class CounterTestCommand extends AbstractShellCommand {
+
+    @Argument(index = 0, name = "counter",
+            description = "Counter name",
+            required = true, multiValued = false)
+    String counter = null;
+
+    @Argument(index = 1, name = "operation",
+            description = "operation name",
+            required = true, multiValued = false)
+    String operation = null;
+
+    @Argument(index = 2, name = "value1",
+            description = "first arg",
+            required = false, multiValued = false)
+    Long value1 = null;
+
+    @Argument(index = 3, name = "value2",
+            description = "second arg",
+            required = false, multiValued = false)
+    Long value2 = null;
+
+    AtomicCounter atomicCounter;
+
+    @Override
+    protected void execute() {
+        StorageService storageService = get(StorageService.class);
+        atomicCounter = storageService.getAsyncAtomicCounter(counter).asAtomicCounter();
+        if (operation.equals("get")) {
+            print("%d", atomicCounter.get());
+        } else if (operation.equals("set")) {
+            atomicCounter.set(value1);
+        } else if (operation.equals("incrementAndGet")) {
+            print("%d", atomicCounter.incrementAndGet());
+        } else if (operation.equals("getAndIncrement")) {
+            print("%d", atomicCounter.getAndIncrement());
+        } else if (operation.equals("getAndAdd")) {
+            print("%d", atomicCounter.getAndAdd(value1));
+        } else if (operation.equals("addAndGet")) {
+            print("%d", atomicCounter.addAndGet(value1));
+        } else if (operation.equals("compareAndSet")) {
+            print("%b", atomicCounter.compareAndSet(value1, value2));
+        } else if (operation.equals("destroy")) {
+            atomicCounter.destroy();
+        }
+    }
+}
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java
new file mode 100644
index 0000000..b7464c2
--- /dev/null
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java
@@ -0,0 +1,64 @@
+package org.onosproject.distributedprimitives.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.cluster.ClusterService;
+import org.onosproject.cluster.Leadership;
+import org.onosproject.cluster.NodeId;
+import org.onosproject.store.service.LeaderElector;
+import org.onosproject.store.service.StorageService;
+
+import com.google.common.base.Joiner;
+
+@Command(scope = "onos", name = "leader-test",
+description = "LeaderElector test cli fixture")
+public class LeaderElectorTestCommand extends AbstractShellCommand {
+    @Argument(index = 0, name = "name",
+            description = "leader elector name",
+            required = true, multiValued = false)
+    String name = null;
+
+    @Argument(index = 1, name = "operation",
+            description = "operation",
+            required = true, multiValued = false)
+    String operation = null;
+
+
+    @Argument(index = 2, name = "topic",
+            description = "topic name",
+            required = false, multiValued = false)
+    String topic = null;
+
+    LeaderElector leaderElector;
+
+    @Override
+    protected void execute() {
+        StorageService storageService = get(StorageService.class);
+        ClusterService clusterService = get(ClusterService.class);
+        NodeId localNodeId = clusterService.getLocalNode().id();
+        leaderElector = storageService.leaderElectorBuilder()
+                .withName(name)
+                .build()
+                .asLeaderElector();
+        if (operation.equals("run")) {
+            print(leaderElector.run(topic, localNodeId));
+        } else if (operation.equals("withdraw")) {
+            leaderElector.withdraw(topic);
+        } else if (operation.equals("show")) {
+            print(leaderElector.getLeadership(topic));
+        }
+    }
+
+    private void print(Leadership leadership) {
+        if (leadership.leader() != null) {
+            print("leader=%s#term=%d#candidates=%s",
+                    leadership.leaderNodeId(),
+                    leadership.leader().term(),
+                    leadership.candidates().isEmpty() ? "none" : Joiner.on(",").join(leadership.candidates()));
+        } else {
+            print("leader=none#candidates=%s",
+                    leadership.candidates().isEmpty() ? "none" : Joiner.on(",").join(leadership.candidates()));
+        }
+    }
+}
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ValueTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ValueTestCommand.java
new file mode 100644
index 0000000..fb736eb
--- /dev/null
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ValueTestCommand.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.distributedprimitives.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.store.serializers.KryoNamespaces;
+import org.onosproject.store.service.AtomicValue;
+import org.onosproject.store.service.Serializer;
+import org.onosproject.store.service.StorageService;
+
+/**
+ * CLI command to manipulate a distributed value.
+ */
+@Command(scope = "onos", name = "value-test",
+        description = "Manipulate a distributed value")
+public class ValueTestCommand extends AbstractShellCommand {
+
+    @Argument(index = 0, name = "value",
+            description = "Value name",
+            required = true, multiValued = false)
+    String value = null;
+
+    @Argument(index = 1, name = "operation",
+            description = "operation name",
+            required = true, multiValued = false)
+    String operation = null;
+
+    @Argument(index = 2, name = "value1",
+            description = "first arg",
+            required = false, multiValued = false)
+    String value1 = null;
+
+    @Argument(index = 3, name = "value2",
+            description = "second arg",
+            required = false, multiValued = false)
+    String value2 = null;
+
+    AtomicValue<String> atomicValue;
+
+    @Override
+    protected void execute() {
+        StorageService storageService = get(StorageService.class);
+        atomicValue = storageService.<String>atomicValueBuilder()
+                                    .withName(value)
+                                    .withSerializer(Serializer.using(KryoNamespaces.BASIC))
+                                    .build()
+                                    .asAtomicValue();
+        if (operation.equals("get")) {
+            print("%s", atomicValue.get());
+        } else if (operation.equals("set")) {
+            atomicValue.set(value1);
+        } else if (operation.equals("compareAndSet")) {
+            print("%b", atomicValue.compareAndSet(value1, value2));
+        } else if (operation.equals("destroy")) {
+            atomicValue.destroy();
+        }
+    }
+}
diff --git a/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 362ff4c..9fa828f 100644
--- a/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -34,6 +34,18 @@
         <command>
             <action class="org.onosproject.distributedprimitives.cli.TransactionalMapTestPutCommand"/>
         </command>
+        <command>
+            <action class="org.onosproject.distributedprimitives.cli.CounterTestCommand"/>
+        </command>
+        <command>
+            <action class="org.onosproject.distributedprimitives.cli.ConsistentMapTestCommand"/>
+        </command>
+        <command>
+            <action class="org.onosproject.distributedprimitives.cli.ValueTestCommand"/>
+        </command>
+        <command>
+            <action class="org.onosproject.distributedprimitives.cli.LeaderElectorTestCommand"/>
+        </command>
     </command-bundle>
 
 </blueprint>
