Change Forwarding module to follow the Intent change,
which is that Intent was changed to dispatch eventType "Removed"
when an intent was removed.

Change-Id: I1c6e7f915f94aa440a49a439e67ec17a145851e6
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 8d37611..d955828 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -522,7 +522,8 @@
         }
 
         for (PacketToPush packet : packets) {
-            log.debug("Start packetToPush to sw {}, outPort {}, path {}", packet.dpid, existingFlow.firstOutPort, path);
+            log.debug("Start packetToPush to sw {}, outPort {}, path {}",
+                    packet.dpid, existingFlow.firstOutPort, path);
             packetService.sendPacket(packet.eth, new SwitchPort(
                             packet.dpid, existingFlow.firstOutPort));
         }
@@ -532,12 +533,22 @@
     public void intentsChange(LinkedList<ChangedEvent> events) {
         for (ChangedEvent event : events) {
             log.debug("path intent ID {}, eventType {}", event.intent.getId() , event.eventType);
-            PathIntent pathIntent = (PathIntent) pathIntentMap.getIntent(event.intent.getId());
+
+            PathIntent pathIntent = null;
+            if (event.intent instanceof PathIntent) {
+                pathIntent = (PathIntent) event.intent;
+                log.trace("pathIntent {}", pathIntent);
+            }
+
             if (pathIntent == null) {
+                log.trace("pathIntent is null. "
+                        + "Remove the intent info from the local cache and return.");
                 continue;
             }
 
             if (!(pathIntent.getParentIntent() instanceof ShortestPathIntent)) {
+                log.trace("parentIntent is not ShortestPathIntent. return."
+                        + " Remove the intent info from the local cache and return.");
                 continue;
             }
 
@@ -545,6 +556,7 @@
                 case ADDED:
                     break;
                 case REMOVED:
+                    flowRemoved(pathIntent);
                     break;
                 case STATE_CHANGED:
                     IntentState state = pathIntent.getState();
@@ -563,6 +575,8 @@
                             break;
                         case DEL_PENDING:
                             break;
+                        case REROUTE_REQ:
+                            break;
                         default:
                             break;
                     }