Fix "Driver service not bound yet" issue in optical compiler.

Change-Id: I16e03a108f0ebaa077b33de73cb9641d913b96e5
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java
index 1a7f778..1ec1192 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java
@@ -18,6 +18,7 @@
 import org.easymock.EasyMock;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onlab.packet.ChassisId;
 import org.onosproject.TestApplicationId;
@@ -25,6 +26,7 @@
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
 import org.onosproject.core.IdGenerator;
+import org.onosproject.net.AbstractProjectableModel;
 import org.onosproject.net.Annotations;
 import org.onosproject.net.ChannelSpacing;
 import org.onosproject.net.DefaultAnnotations;
@@ -69,6 +71,7 @@
 import org.onosproject.net.driver.Driver;
 import org.onosproject.net.driver.DriverHandler;
 import org.onosproject.net.driver.DriverService;
+import org.onosproject.net.driver.DriverServiceAdapter;
 import org.onosproject.net.driver.TestBehaviourImpl;
 import org.onosproject.net.driver.TestBehaviourTwoImpl;
 
@@ -354,6 +357,11 @@
         }
     }
 
+    @BeforeClass
+    public static void setUpClass() {
+        AbstractProjectableModel.setDriverService("key", new DriverServiceAdapter());
+    }
+
     @Before
     public void setUp() {
         sut = new OpticalCircuitIntentCompiler();