diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ConnectionPointTest.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ConnectionPointTest.java
index 9a3419a..ae20d28 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ConnectionPointTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ConnectionPointTest.java
@@ -30,7 +30,7 @@
 import static org.junit.Assert.assertNotEquals;
 
 /**
- * Test SdxL2ConnectionPoint functionalities.
+ * Tests SdxL2ConnectionPoint functionality.
  */
 public class SdxL2ConnectionPointTest {
 
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ManagerTest.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ManagerTest.java
index fbe1ce4..f1d1321 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ManagerTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ManagerTest.java
@@ -16,12 +16,14 @@
 
 package org.onosproject.sdxl2;
 
+import com.google.common.collect.Sets;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onosproject.TestApplicationId;
 
 import java.util.HashSet;
+import java.util.Optional;
 import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
@@ -29,7 +31,7 @@
 
 
 /**
- * Test network manager.
+ * Tests SdxL2Manager functionality.
  */
 public class SdxL2ManagerTest {
 
@@ -39,7 +41,9 @@
     public void setUp() {
         manager = new SdxL2Manager();
         manager.appId = new TestApplicationId("sdxl2-test");
-        manager.sdxL2Store = new SdxL2TestStore();
+        SdxL2DistributedStore store = new SdxL2DistributedStore();
+        store.initForTest();
+        manager.sdxL2Store = store;
     }
 
     @After
@@ -81,4 +85,159 @@
         assertNotEquals(sdxl2, old);
     }
 
+    public static final String CP1 = "of:00000000000001/1";
+    public static final String CP2 = "of:00000000000002/1";
+    public static final String CP3 = "of:00000000000003/1";
+    public static final String CP4 = "of:00000000000003/2";
+    public static final String CP5 = "of:00000000000004/2";
+
+    public static final String VLANS1 = "1,2,3,4";
+    public static final String VLANS2 = "-1";
+    public static final String VLANS3 = "1,2,3";
+    public static final String VLANS4 = "2,2,2";
+    public static final String VLANS7 = "5";
+    public static final String VLANS8 = "3,2,1";
+
+    public static final String CEMAC1 = "52:40:00:12:44:01";
+
+    @Test
+    public void testaddSdxL2ConnectionPoint() {
+
+        manager.createSdxL2(SDXL2);
+        manager.createSdxL2(SDXL2_2);
+        manager.createSdxL2("test1");
+
+        SdxL2ConnectionPoint one = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM1", CP1, VLANS1, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, one);
+
+        SdxL2ConnectionPoint three = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM2", CP2, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, three);
+
+        SdxL2ConnectionPoint six = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM3", CP1, VLANS7, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, six);
+
+        SdxL2ConnectionPoint seven = SdxL2ConnectionPoint.sdxl2ConnectionPoint("MI3", CP3, VLANS3, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, seven);
+
+        SdxL2ConnectionPoint nine = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI1", CP4, VLANS8, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, nine);
+
+        SdxL2ConnectionPoint ten = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI2", CP5, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, ten);
+
+        SdxL2ConnectionPoint fourteen = SdxL2ConnectionPoint.sdxl2ConnectionPoint("RO1",
+                "of:0000000000000003/3", "1", "52:54:00:04:E5:9E");
+        manager.addSdxL2ConnectionPoint("test1", fourteen);
+
+        SdxL2ConnectionPoint fifteen = SdxL2ConnectionPoint.sdxl2ConnectionPoint("RO2",
+                "of:0000000000000009/3", "1", "52:54:00:68:F7:D9");
+        manager.addSdxL2ConnectionPoint("test1", fifteen);
+
+        SdxL2ConnectionPoint two = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM1", CP2, VLANS1, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, two);
+
+        SdxL2ConnectionPoint four = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM2", CP2, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, four);
+
+        SdxL2ConnectionPoint five = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM3", CP1, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, five);
+
+        SdxL2ConnectionPoint eight = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM4", CP3, VLANS4, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, eight);
+
+        SdxL2ConnectionPoint eleven = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI3", CP5, VLANS1, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, eleven);
+
+        SdxL2ConnectionPoint twelve = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI31", CP5, VLANS1, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, twelve);
+
+        SdxL2ConnectionPoint thirteen = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI31", CP5, VLANS8, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, thirteen);
+
+    }
+
+    @Test
+    public void testgetSdxL2ConnectionPoints() {
+
+        manager.createSdxL2(SDXL2);
+        manager.createSdxL2(SDXL2_2);
+
+        Set<String> allExt = Sets.newHashSet();
+        Set<String> allExtBySdxl2 = Sets.newHashSet();
+        Set<String> allExtBySdxl22 = Sets.newHashSet();
+
+        SdxL2ConnectionPoint one = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM1", CP1, VLANS1, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, one);
+        allExt.add(one.name());
+        allExtBySdxl2.add(one.name());
+        SdxL2ConnectionPoint three = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM2", CP2, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, three);
+        allExt.add(three.name());
+        allExtBySdxl2.add(three.name());
+        SdxL2ConnectionPoint six = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM3", CP1, VLANS7, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, six);
+        allExt.add(six.name());
+        allExtBySdxl22.add(six.name());
+        SdxL2ConnectionPoint seven = SdxL2ConnectionPoint.sdxl2ConnectionPoint("MI3", CP3, VLANS3, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, seven);
+        allExt.add(seven.name());
+        allExtBySdxl2.add(seven.name());
+        SdxL2ConnectionPoint nine = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI1", CP4, VLANS8, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, nine);
+        allExt.add(nine.name());
+        allExtBySdxl22.add(nine.name());
+        SdxL2ConnectionPoint ten = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI2", CP5, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, ten);
+        allExt.add(ten.name());
+        allExtBySdxl2.add(ten.name());
+
+        Set<String> all = manager.getSdxL2ConnectionPoints(Optional.ofNullable(null));
+        Set<String> allBySdxl2 = manager.getSdxL2ConnectionPoints(Optional.of(SDXL2));
+        Set<String> allBySdxl22 = manager.getSdxL2ConnectionPoints(Optional.of(SDXL2_2));
+
+        assertEquals(allExt, all);
+        assertNotEquals(allExtBySdxl2, all);
+        assertNotEquals(allExtBySdxl22, all);
+
+        assertNotEquals(allExt, allBySdxl2);
+        assertEquals(allExtBySdxl2, allBySdxl2);
+        assertNotEquals(allExtBySdxl22, allBySdxl2);
+
+        assertNotEquals(allExt, allBySdxl22);
+        assertNotEquals(allExtBySdxl2, allBySdxl22);
+        assertEquals(allExtBySdxl22, allBySdxl22);
+
+    }
+
+    @Test
+    public void testremoveSdxL2ConnectionPoint() {
+
+        manager.createSdxL2(SDXL2);
+        manager.createSdxL2(SDXL2_2);
+
+        SdxL2ConnectionPoint one = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM1", CP1, VLANS1, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, one);
+
+        SdxL2ConnectionPoint three = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM2", CP2, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, three);
+
+        SdxL2ConnectionPoint six = SdxL2ConnectionPoint.sdxl2ConnectionPoint("ROM3", CP1, VLANS7, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, six);
+
+        SdxL2ConnectionPoint seven = SdxL2ConnectionPoint.sdxl2ConnectionPoint("MI3", CP3, VLANS3, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, seven);
+
+        SdxL2ConnectionPoint nine = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI1", CP4, VLANS8, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2_2, nine);
+
+        SdxL2ConnectionPoint ten = SdxL2ConnectionPoint.sdxl2ConnectionPoint("FI2", CP5, VLANS2, CEMAC1);
+        manager.addSdxL2ConnectionPoint(SDXL2, ten);
+
+        manager.removeSdxL2ConnectionPoint(one.name());
+        manager.removeSdxL2ConnectionPoint(six.name());
+        manager.removeSdxL2ConnectionPoint(one.name());
+        manager.removeSdxL2ConnectionPoint("ROM");
+
+    }
+
 }
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2TestStore.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2TestStore.java
deleted file mode 100644
index 6cf3ef2..0000000
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2TestStore.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.sdxl2;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-import java.util.Set;
-
-/**
- * Stub class that emulates the behaviours of the SdxL2Store.
- */
-public final class SdxL2TestStore implements SdxL2Store {
-
-    private Set<String> sdxL2s = Sets.newHashSet();
-
-    private static String errorAddSdx = "It is not possible to add ";
-    private static String errorRemoveSdx = "It is not possible to remove ";
-
-    /**
-     * Create a named sdx-l2.
-     *
-     * @param sdxl2 sdx-l2 name
-     * @throws SdxL2Exception if sdxl2 exists
-     */
-    @Override
-    public void putSdxL2(String sdxl2) throws SdxL2Exception {
-        boolean inserted = sdxL2s.add(sdxl2);
-        if (!inserted) {
-            throw new SdxL2Exception(errorAddSdx + sdxl2);
-        }
-    }
-
-    /**
-     * Remove a named sdx-l2.
-     *
-     * @param sdxl2 sdx-l2 name
-     * @throws SdxL2Exception if sdxl2 does not exist
-     */
-    @Override
-    public void removeSdxL2(String sdxl2) throws SdxL2Exception {
-        boolean removed = sdxL2s.remove(sdxl2);
-        if (!removed) {
-            throw new SdxL2Exception(errorRemoveSdx + sdxl2);
-        }
-    }
-
-    /**
-     * Returns a set of sdxl2 names.
-     *
-     * @return a set of sdxl2 names
-     */
-    @Override
-    public Set<String> getSdxL2s() {
-        return ImmutableSet.copyOf(sdxL2s);
-    }
-
-}
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/package-info.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/package-info.java
index de39d20..a358545 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/package-info.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/package-info.java
@@ -15,6 +15,6 @@
  */
 
 /**
- * Test sdx-l2 functionalities.
+ * Tests SDX-L2 functionality.
  */
 package org.onosproject.sdxl2;
