Run test on buck

Change-Id: If4a4e9744dfaa48c9bca0ff95c77fb057b82c45d
diff --git a/apps/config/BUCK b/apps/config/BUCK
index c409e6c..3b8cde9 100644
--- a/apps/config/BUCK
+++ b/apps/config/BUCK
@@ -10,7 +10,7 @@
     '//cli:onos-cli',
 ]
 
-osgi_jar (
+osgi_jar_with_tests (
     deps = COMPILE_DEPS,
 )
 
diff --git a/apps/config/src/test/java/org/onosproject/d/config/DeviceResourceIdsTest.java b/apps/config/src/test/java/org/onosproject/d/config/DeviceResourceIdsTest.java
index c0cc522..83baf5a 100644
--- a/apps/config/src/test/java/org/onosproject/d/config/DeviceResourceIdsTest.java
+++ b/apps/config/src/test/java/org/onosproject/d/config/DeviceResourceIdsTest.java
@@ -22,7 +22,6 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.onosproject.d.config.DeviceResourceIds;
 import org.onosproject.net.DeviceId;
 import org.onosproject.yang.model.ResourceId;
 
diff --git a/apps/config/src/test/java/org/onosproject/d/config/DynamicDeviceConfigServiceViewTest.java b/apps/config/src/test/java/org/onosproject/d/config/DynamicDeviceConfigServiceViewTest.java
index 797ab1c..78193fb 100644
--- a/apps/config/src/test/java/org/onosproject/d/config/DynamicDeviceConfigServiceViewTest.java
+++ b/apps/config/src/test/java/org/onosproject/d/config/DynamicDeviceConfigServiceViewTest.java
@@ -36,17 +36,17 @@
 
 public class DynamicDeviceConfigServiceViewTest {
 
-    static DeviceId DID = DeviceId.deviceId("test:device");
+    static DeviceId did = DeviceId.deviceId("test:device");
     /**
      * Absolute ResourceId to {@code DID}.
      */
-    static ResourceId RID = DeviceResourceIds.toResourceId(DID);
+    static ResourceId rid = DeviceResourceIds.toResourceId(did);
 
 
     /**
      * Device relative ResourceId pointing to intf node.
      */
-    static ResourceId REL_INTF = ResourceId.builder()
+    static ResourceId relIntf = ResourceId.builder()
                 .addBranchPointSchema("intf", "test")
                 .build();
 
@@ -72,7 +72,7 @@
         viewEvent = null;
 
         service = new TestDynamicConfigService();
-        view = DynamicDeviceConfigServiceView.deviceView(service, DID);
+        view = DynamicDeviceConfigServiceView.deviceView(service, did);
     }
 
     // FIXME add test scenario where irrelevant event get discarded.
@@ -80,7 +80,7 @@
     @Test
     public void testListener() throws CloneNotSupportedException, InterruptedException {
         ResourceId realIntf = ResourceId.builder()
-            .append(RID)
+            .append(rid)
             .addBranchPointSchema("intf", "test")
             .build();
 
@@ -107,26 +107,26 @@
         assertTrue(recieved.await(5, TimeUnit.SECONDS));
 
         assertFalse("Expect relative path but was" + viewRelevantEvent.subject(),
-                    ResourceIds.isPrefix(RID, viewRelevantEvent.subject()));
+                    ResourceIds.isPrefix(rid, viewRelevantEvent.subject()));
         assertFalse("Expect relative path but was" + viewEvent.subject(),
-                    ResourceIds.isPrefix(RID, viewEvent.subject()));
+                    ResourceIds.isPrefix(rid, viewEvent.subject()));
 
         view.removeListener(lsnr);
     }
 
     @Test
     public void testCreateNode() {
-        view.createNode(REL_INTF, node);
+        view.createNode(relIntf, node);
 
-        assertTrue(ResourceIds.isPrefix(RID, realPath));
+        assertTrue(ResourceIds.isPrefix(rid, realPath));
     }
 
     @Test
     public void testReadNode() {
         Filter filter = null;
-        DataNode returned = view.readNode(REL_INTF, filter);
+        DataNode returned = view.readNode(relIntf, filter);
 
-        assertTrue(ResourceIds.isPrefix(RID, realPath));
+        assertTrue(ResourceIds.isPrefix(rid, realPath));
 
         // FIXME test realFilter
 
@@ -135,38 +135,38 @@
 
     @Test
     public void testNodeExist() {
-        view.nodeExist(REL_INTF);
+        view.nodeExist(relIntf);
 
-        assertTrue(ResourceIds.isPrefix(RID, realPath));
+        assertTrue(ResourceIds.isPrefix(rid, realPath));
     }
 
     @Test
     public void testUpdateNode() {
-        view.updateNode(REL_INTF, node);
+        view.updateNode(relIntf, node);
 
-        assertTrue(ResourceIds.isPrefix(RID, realPath));
+        assertTrue(ResourceIds.isPrefix(rid, realPath));
     }
 
     @Test
     public void testReplaceNode() {
-        view.replaceNode(REL_INTF, node);
+        view.replaceNode(relIntf, node);
 
-        assertTrue(ResourceIds.isPrefix(RID, realPath));
+        assertTrue(ResourceIds.isPrefix(rid, realPath));
     }
 
     @Test
     public void testDeleteNode() {
-        view.deleteNode(REL_INTF);
+        view.deleteNode(relIntf);
 
-        assertTrue(ResourceIds.isPrefix(RID, realPath));
+        assertTrue(ResourceIds.isPrefix(rid, realPath));
     }
 
     @Test
     public void testInvokeRpc() {
         RpcInput input = null;
-        view.invokeRpc(REL_INTF, input);
+        view.invokeRpc(relIntf, input);
 
-        assertTrue(ResourceIds.isPrefix(RID, realId));
+        assertTrue(ResourceIds.isPrefix(rid, realId));
     }
 
     private final class TestDynamicConfigService
diff --git a/apps/config/src/test/java/org/onosproject/d/config/ResourceIdsTest.java b/apps/config/src/test/java/org/onosproject/d/config/ResourceIdsTest.java
index dc17b11..73f682c 100644
--- a/apps/config/src/test/java/org/onosproject/d/config/ResourceIdsTest.java
+++ b/apps/config/src/test/java/org/onosproject/d/config/ResourceIdsTest.java
@@ -23,7 +23,7 @@
 
 public class ResourceIdsTest {
 
-    final ResourceId DEVICES = ResourceId.builder()
+    static final ResourceId DEVICES = ResourceId.builder()
             .addBranchPointSchema(DeviceResourceIds.ROOT_NAME, DCS_NAMESPACE)
             .addBranchPointSchema(DeviceResourceIds.DEVICES_NAME, DCS_NAMESPACE)
             .build();