Extract common ID generation logic using IdBlockAllocator

- Define IdGenerator<T> interface
- Implement AbstractIdBlockAllocatorBasedIdGenerator<T>, which
  has the common logic for the existing IntentId, FlowId, MatchActionId,
  and MatchActionOperationsId generator implementations.

Change-Id: I7aeea249df1710719760ed477bffe62853577e0f
diff --git a/src/test/java/net/onrc/onos/api/newintent/IntentIdGenerator.java b/src/test/java/net/onrc/onos/api/newintent/IntentIdGenerator.java
new file mode 100644
index 0000000..2f5e013
--- /dev/null
+++ b/src/test/java/net/onrc/onos/api/newintent/IntentIdGenerator.java
@@ -0,0 +1,16 @@
+package net.onrc.onos.api.newintent;
+
+import net.onrc.onos.core.util.IdGenerator;
+
+/**
+ * This interface is for generator of IntentId. It is defined only for
+ * testing purpose to keep type safety on mock creation.
+ *
+ * <p>
+ * {@link #getNewId()} generates a globally unique {@link IntentId} instance
+ * on each invocation. Application developers should not generate IntentId
+ * by themselves. Instead use an implementation of this interface.
+ * </p>
+ */
+public interface IntentIdGenerator extends IdGenerator<IntentId> {
+}