Removed the setServiceDirectory() method from the base web resource
This is a testing only API and potentially dangerous to allow to be public.
I modified the tests that use it to set the value using TestUtils.setField()
Change-Id: Ic590f4641f4e3de208dffa16b3df9a9a2106114b
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java b/apps/cfm/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java
index 702bc09..6fac3a3 100644
--- a/apps/cfm/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java
+++ b/apps/cfm/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java
@@ -21,7 +21,6 @@
import org.junit.Test;
import org.onlab.osgi.ServiceDirectory;
import org.onlab.osgi.TestServiceDirectory;
-import org.onlab.rest.BaseResource;
import org.onosproject.cfm.CfmCodecContext;
import org.onosproject.cfm.impl.CfmResourceTest;
import org.onosproject.codec.CodecService;
@@ -50,7 +49,6 @@
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
-
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -61,7 +59,9 @@
import java.util.List;
import static junit.framework.TestCase.fail;
-import static org.easymock.EasyMock.*;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
@@ -88,7 +88,7 @@
.add(CfmMepService.class, mepService)
.add(SoamService.class, soamService)
.add(CodecService.class, context.codecManager());
- BaseResource.setServiceDirectory(testDirectory);
+ setServiceDirectory(testDirectory);
DelayMeasurementStatCurrent.DmStatCurrentBuilder dmCurrBuilder1 =
(DelayMeasurementStatCurrent.DmStatCurrentBuilder)
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java b/apps/cfm/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java
index 9dd70e6..44b4960 100644
--- a/apps/cfm/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java
+++ b/apps/cfm/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java
@@ -21,7 +21,6 @@
import org.junit.Test;
import org.onlab.osgi.ServiceDirectory;
import org.onlab.osgi.TestServiceDirectory;
-import org.onlab.rest.BaseResource;
import org.onosproject.cfm.CfmCodecContext;
import org.onosproject.cfm.impl.CfmResourceTest;
import org.onosproject.codec.CodecService;
@@ -87,7 +86,7 @@
.add(CfmMepService.class, mepService)
.add(SoamService.class, soamService)
.add(CodecService.class, context.codecManager());
- BaseResource.setServiceDirectory(testDirectory);
+ setServiceDirectory(testDirectory);
lm1 = DefaultLmEntry.builder(
DelayMeasurementCreate.Version.Y17312008,