Bring l2 Sdx app up to ONOS 1.12

Change-Id: Iee676e74e57120656cb3c18d27b2fd2801aa3c96
diff --git a/sdx-l2/pom.xml b/sdx-l2/pom.xml
index ec15294..f43f122 100644
--- a/sdx-l2/pom.xml
+++ b/sdx-l2/pom.xml
@@ -20,20 +20,20 @@
 <parent>
     <groupId>org.onosproject</groupId>
     <artifactId>onos-dependencies</artifactId>
-    <version>1.7.0</version>
+    <version>1.12.0</version>
     <relativePath/>
 </parent>
 
 <groupId>org.onosproject</groupId>
 <artifactId>onos-app-sdx-l2</artifactId>
-<version>1.9.0-SNAPSHOT</version>
+<version>1.12.0-SNAPSHOT</version>
 <packaging>bundle</packaging>
 
 <description>SDX-L2 application to create and manage Ethernet circuits</description>
 <url>http://www.geant.org</url>
 
 <properties>
-    <onos.version>1.7.0</onos.version>
+    <onos.version>1.12.0</onos.version>
     <onos.app.name>org.onosproject.sdx-l2</onos.app.name>
     <onos.app.title>SDX-L2 App</onos.app.title>
     <onos.app.category>Utility</onos.app.category>
diff --git a/sdx-l2/src/main/java/org/onosproject/sdxl2/SdxL2DistributedStore.java b/sdx-l2/src/main/java/org/onosproject/sdxl2/SdxL2DistributedStore.java
index f99caac..02950e5 100644
--- a/sdx-l2/src/main/java/org/onosproject/sdxl2/SdxL2DistributedStore.java
+++ b/sdx-l2/src/main/java/org/onosproject/sdxl2/SdxL2DistributedStore.java
@@ -286,7 +286,7 @@
     public void addVC(String sdxl2, SdxL2ConnectionPoint sdxl2cplhs, SdxL2ConnectionPoint sdxl2cprhs)
             throws SdxL2Exception {
         Set<String> vcs = ImmutableSet.copyOf(
-                sdxL2VCs.keySet().parallelStream().filter((vctemp->vctemp.contains(sdxl2cplhs.toString())
+                sdxL2VCs.keySet().parallelStream().filter((vctemp -> vctemp.contains(sdxl2cplhs.toString())
                         || vctemp.contains(sdxl2cprhs.toString()))).collect(Collectors.toSet()));
         for (String vctemp : vcs) {
             String[] splitted = vctemp.split("~");
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MacVCManagerTest.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MacVCManagerTest.java
index 4787928..a407bf4 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MacVCManagerTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MacVCManagerTest.java
@@ -86,7 +86,7 @@
      * Prepares environment before starting testing.
      */
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         SdxL2DistributedStore store = new SdxL2DistributedStore();
         store.initForTest();
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 31d20d0..ac94986 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ManagerTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2ManagerTest.java
@@ -23,8 +23,6 @@
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.onosproject.TestApplicationId;
-import org.onosproject.core.IdGenerator;
-import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.MockIdGenerator;
 
 import java.util.Collections;
@@ -98,10 +96,10 @@
     @Rule
     public ExpectedException exceptionRemoveCP = ExpectedException.none();
     private SdxL2Manager manager;
-    private IdGenerator idGenerator = new MockIdGenerator();
 
     @Before
     public void setUp() {
+        MockIdGenerator.cleanBind();
         manager = new SdxL2Manager();
         manager.appId = new TestApplicationId("sdxl2-test");
         SdxL2DistributedStore store = new SdxL2DistributedStore();
@@ -109,12 +107,11 @@
         manager.sdxL2Store = store;
         manager.vcManager = new SdxL2MacVCManager(
                 manager.appId, manager.sdxL2Store, new IntentServiceTest());
-        Intent.bindIdGenerator(idGenerator);
     }
 
     @After
     public void tearDown() {
-        Intent.unbindIdGenerator(idGenerator);
+        MockIdGenerator.unbind();
     }
 
     /**
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MplsVCManagerTest.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MplsVCManagerTest.java
index bc0a725..83f1d74 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MplsVCManagerTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2MplsVCManagerTest.java
@@ -75,7 +75,7 @@
      * Prepares environment before starting testing.
      */
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         SdxL2DistributedStore store = new SdxL2DistributedStore();
         store.initForTest();
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VCManagerTest.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VCManagerTest.java
index 547d594..3974cbe 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VCManagerTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VCManagerTest.java
@@ -24,8 +24,6 @@
 import org.junit.rules.ExpectedException;
 import org.onosproject.TestApplicationId;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.IdGenerator;
-import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.MockIdGenerator;
 
@@ -88,18 +86,18 @@
     @Rule
     public ExpectedException exceptionRemoveVC = ExpectedException.none();
     private SdxL2MacVCManager manager;
-    private IdGenerator idGenerator = new MockIdGenerator();
 
     /**
      * Prepare environment before starting testing VCs.
      */
     @Before
     public void setUp() {
+
         SdxL2DistributedStore store = new SdxL2DistributedStore();
         store.initForTest();
         manager = new SdxL2MacVCManager(
                 APPID, store, new IntentServiceTest());
-        Intent.bindIdGenerator(idGenerator);
+        MockIdGenerator.cleanBind();
     }
 
     /**
@@ -107,7 +105,7 @@
      */
     @After
     public void tearDown() {
-        Intent.unbindIdGenerator(idGenerator);
+        MockIdGenerator.unbind();
     }
 
     /**
diff --git a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VlanVCManagerTest.java b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VlanVCManagerTest.java
index 3b85426..4a37829 100644
--- a/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VlanVCManagerTest.java
+++ b/sdx-l2/src/test/java/org/onosproject/sdxl2/SdxL2VlanVCManagerTest.java
@@ -78,7 +78,7 @@
      */
     @Override
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         SdxL2DistributedStore store = new SdxL2DistributedStore();
         store.initForTest();