Allow creation of integration tests

- created an interface IntegrationTest that marks integration tests
- modified JUnit plugin rules in pom file to not run integration tests
  by default
- marked FlowPusherTest as an integration test

Change-Id: I9719465afd365802377e110e44824fe111cb44c4
diff --git a/pom.xml b/pom.xml
index 4a7fc59..2209d2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,6 +111,7 @@
         <configuration>
           <argLine>-XX:MaxPermSize=256m</argLine>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
+          <excludedGroups>net.onrc.onos.core.util.IntegrationTest</excludedGroups>
         </configuration>
       </plugin>
       <!-- exec:java -->
diff --git a/src/test/java/net/onrc/onos/core/flowprogrammer/FlowPusherTest.java b/src/test/java/net/onrc/onos/core/flowprogrammer/FlowPusherTest.java
index a8ef220..7ffe8e9 100644
--- a/src/test/java/net/onrc/onos/core/flowprogrammer/FlowPusherTest.java
+++ b/src/test/java/net/onrc/onos/core/flowprogrammer/FlowPusherTest.java
@@ -1,18 +1,5 @@
 package net.onrc.onos.core.flowprogrammer;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
 import net.floodlightcontroller.core.FloodlightContext;
 import net.floodlightcontroller.core.IFloodlightProviderService;
 import net.floodlightcontroller.core.IOFSwitch;
@@ -27,11 +14,13 @@
 import net.onrc.onos.core.util.FlowEntryMatch;
 import net.onrc.onos.core.util.FlowEntryUserState;
 import net.onrc.onos.core.util.FlowId;
+import net.onrc.onos.core.util.IntegrationTest;
 import net.onrc.onos.core.util.Port;
-
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
+import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.openflow.protocol.OFBarrierRequest;
 import org.openflow.protocol.OFFlowMod;
 import org.openflow.protocol.OFMatch;
@@ -40,6 +29,20 @@
 import org.openflow.protocol.action.OFAction;
 import org.openflow.protocol.factory.BasicFactory;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+@Category(IntegrationTest.class)
 public class FlowPusherTest {
     private FlowPusher pusher;
     private FloodlightContext context;
diff --git a/src/test/java/net/onrc/onos/core/util/IntegrationTest.java b/src/test/java/net/onrc/onos/core/util/IntegrationTest.java
new file mode 100644
index 0000000..7402a1b
--- /dev/null
+++ b/src/test/java/net/onrc/onos/core/util/IntegrationTest.java
@@ -0,0 +1,10 @@
+package net.onrc.onos.core.util;
+
+/**
+ * Marker interface used to separate unit tests from integration tests. All
+ * integration tests should be marked with:
+ * @Category(IntegrationTest.class)
+ * so that they can be run separately.
+ */
+public interface IntegrationTest {
+}