Cleaning up intent tests setup/teardown to avoid cascading failures
with respect to binding ID generator.

Change-Id: Ia4778f16ff5a3ecb26062e7d7b2c36493081140d
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkManagerTest.java b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkManagerTest.java
index 202046e..765b4cb 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkManagerTest.java
+++ b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkManagerTest.java
@@ -70,7 +70,6 @@
 import org.onosproject.net.group.GroupService;
 import org.onosproject.net.host.HostService;
 import org.onosproject.net.intent.FakeIntentManager;
-import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.IntentState;
 import org.onosproject.net.intent.Key;
@@ -83,11 +82,11 @@
 import org.onosproject.net.topology.TopologyService;
 import org.onosproject.store.service.TestStorageService;
 
-import java.util.Collection;
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Set;
+import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
 import static org.junit.Assert.*;
@@ -107,7 +106,6 @@
     private TestListener listener = new TestListener();
     private TestableIntentService intentService = new FakeIntentManager();
     private TopologyService topologyService;
-    private IdGenerator idGenerator = new MockIdGenerator();
 
     private ConnectPoint cp6;
     private ConnectPoint cp7;
@@ -117,8 +115,7 @@
     @Before
     public void setUp() throws Exception {
         virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
-        Intent.unbindIdGenerator(idGenerator);
-        Intent.bindIdGenerator(idGenerator);
+        MockIdGenerator.cleanBind();
 
         coreService = new TestCoreService();
         TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
@@ -145,7 +142,7 @@
         manager.removeListener(listener);
         manager.deactivate();
         NetTestTools.injectEventDispatcher(manager, null);
-        Intent.unbindIdGenerator(idGenerator);
+        MockIdGenerator.cleanBind();
     }
 
     /**