Add missing dependency during test run

- Inject LinkCollectionIntentCompiler dependency on JUnitTest run
- Add sanity check on LabelAllocator construction

Change-Id: Ic7f1a8a85f5dcc85c9ffe1d2c25c2dc509e08d30
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java b/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java
index 4086768..c150e26 100644
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java
@@ -35,6 +35,8 @@
 import org.onosproject.net.resource.ResourceService;
 import org.onosproject.net.resource.Resources;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -71,7 +73,7 @@
      * @param rs the resource service
      */
     public LabelAllocator(ResourceService rs) {
-        this.resourceService = rs;
+        this.resourceService = checkNotNull(rs);
         this.labelSelection = this.getLabelSelection(Behavior.RANDOM);
     }