Make REST API unit tests choose a free port to allow concurrent builds

Change-Id: I05579d38e9374c40ef67251a30869361e31fc6d8
diff --git a/web/api/src/test/java/org/onosproject/rest/IntentsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/IntentsResourceTest.java
index 4a6c2e5..2d650a5 100644
--- a/web/api/src/test/java/org/onosproject/rest/IntentsResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/IntentsResourceTest.java
@@ -44,7 +44,6 @@
 import com.google.common.base.MoreObjects;
 import com.sun.jersey.api.client.UniformInterfaceException;
 import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.test.framework.JerseyTest;
 
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.expect;
@@ -60,7 +59,7 @@
 /**
  * Unit tests for Intents REST APIs.
  */
-public class IntentsResourceTest extends JerseyTest {
+public class IntentsResourceTest extends ResourceTest {
     final IntentService mockIntentService = createMock(IntentService.class);
     final HashSet<Intent> intents = new HashSet<>();
     private static final ApplicationId APP_ID =
@@ -110,10 +109,6 @@
         }
     }
 
-    public IntentsResourceTest() {
-        super("org.onosproject.rest");
-    }
-
     /**
      * Hamcrest matcher to check that an intent representation in JSON matches
      * the actual intent.