diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.params b/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
index 7d7457b..c3a7346 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
@@ -19,14 +19,14 @@
     # 100. Do something else
     # Sample sequence: 0,1,2,3,[10,30,21,31,10,32,21,33,50,10,30,21,31,10,32,21,33,51,40,60,10,30,21,31,10,32,21,33,50,10,30,21,31,10,32,21,33,51,41,60]*500,100
     <testcases>
-        0,1,2,3,100,[10,40,60,10,30,21,31,41,90,60]*500,100
+        0,1,2,3,10,[30,21,31,32,21,33,50,30,21,31,32,21,33,51]*500,100
     </testcases>
 
     <TEST>
         <topo>1</topo>
         <IPv6>on</IPv6>
         <numCtrl>3</numCtrl>
-        <pauseTest>off</pauseTest>
+        <pauseTest>on</pauseTest>
         <caseSleep>0</caseSleep>
         <setIPv6CfgSleep>5</setIPv6CfgSleep>
         <loadTopoSleep>5</loadTopoSleep>
@@ -84,6 +84,16 @@
             <maxRerunNum>5</maxRerunNum>
         </IntentCheck>
 
+        <FlowCheck>
+            <status>on</status>
+            <typeIndex>11</typeIndex>
+            <typeString>CHECK_FLOW</typeString>
+            <CLI>check-flow</CLI>
+            <CLIParamNum>0</CLIParamNum>
+            <rerunInterval>5</rerunInterval>
+            <maxRerunNum>5</maxRerunNum>
+        </FlowCheck>
+
         <TrafficCheck>
             <status>on</status>
             <typeIndex>12</typeIndex>
diff --git a/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py b/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py
index fb72d00..de32193 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py
@@ -446,6 +446,7 @@
             sleepTime = int( main.params[ 'EVENT' ][ 'installAllHostIntents' ][ 'sleepBeforeCheck' ] )
             main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
             main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
+            main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
             main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
             if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
                 main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
@@ -482,6 +483,7 @@
             sleepTime = int( main.params[ 'EVENT' ][ 'removeAllHostIntents' ][ 'sleepBeforeCheck' ] )
             main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
             main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
+            main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
             main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
             if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
                 main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
@@ -518,6 +520,7 @@
             sleepTime = int( main.params[ 'EVENT' ][ 'installAllPointIntents' ][ 'sleepBeforeCheck' ] )
             main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
             main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
+            main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
             main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
             if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
                 main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
@@ -554,6 +557,7 @@
             sleepTime = int( main.params[ 'EVENT' ][ 'removeAllPointIntents' ][ 'sleepBeforeCheck' ] )
             main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
             main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
+            main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
             main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
             if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
                 main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
diff --git a/TestON/tests/CHOTestMonkey/dependencies/events/CheckEvent.py b/TestON/tests/CHOTestMonkey/dependencies/events/CheckEvent.py
index 01aa734..d0408f9 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/events/CheckEvent.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/events/CheckEvent.py
@@ -25,19 +25,55 @@
 
     def startCheckEvent( self, args=None ):
         checkResult = EventStates().PASS
-        # TODO: check intents that are expected in "FAILED" state?
-        installedIntentIDs = []
+        intentDict = {}
         for intent in main.intents:
-            if intent.isInstalled():
-                installedIntentIDs.append( intent.id )
+            intentDict[ intent.id ] = intent.expectedState
         for controller in main.controllers:
             if controller.isUp():
                 with controller.CLILock:
-                    intentState = controller.CLI.checkIntentState( intentsId=installedIntentIDs )
+                    intentState = controller.CLI.compareIntent( intentDict )
                 if not intentState:
-                    main.log.warn( "Intent Check - Not all intents are in INSTALLED state on ONOS%s" % ( controller.index ) )
+                    main.log.warn( "Intent Check - not all intent ids and states match that on ONOS%s" % ( controller.index ) )
                     checkResult = EventStates().FAIL
-        #TODO: check flows?
+        return checkResult
+
+class FlowCheck( CheckEvent ):
+    def __init__( self ):
+        CheckEvent.__init__( self )
+        self.typeString = main.params[ 'EVENT' ][ self.__class__.__name__ ][ 'typeString' ]
+        self.typeIndex = int( main.params[ 'EVENT' ][ self.__class__.__name__ ][ 'typeIndex' ] )
+
+    def startCheckEvent( self, args=None ):
+        import json
+        checkResult = EventStates().PASS
+        for controller in main.controllers:
+            if controller.isUp():
+                with controller.CLILock:
+                    flows = controller.CLI.flows()
+                    try:
+                        flows = json.loads( flows )
+                    except ( TypeError, ValueError ):
+                        main.log.exception( "Flow Check - Object not as expected: {!r}".format( flows ) )
+                        return EventStates().FAIL
+                    # Compare flow IDs in ONOS and Mininet
+                    flowIDList = []
+                    for item in flows:
+                        for flow in item[ "flows" ]:
+                            flowIDList.append( hex( int( flow[ 'id' ] ) ) )
+                    main.log.info( "Flow Check - current flow number on ONOS%s: %s" % ( controller.index, len( flowIDList ) ) )
+                    switchList = []
+                    for device in main.devices:
+                        switchList.append( device.name )
+                    with main.mininetLock:
+                        flowCompareResult = main.Mininet1.checkFlowId( switchList, flowIDList, debug=False )
+                    if not flowCompareResult:
+                        main.log.warn( "Flow Check - flows on ONOS%s do not match that in Mininet" % ( controller.index ) )
+                        checkResult = EventStates().FAIL
+                    # Check flow state
+                    flowState = controller.CLI.checkFlowsState( isPENDING=False )
+                    if not flowState:
+                        main.log.warn( "Flow Check - not all flows are in ADDED state on ONOS%s" % ( controller.index ) )
+                        checkResult = EventStates().FAIL
         return checkResult
 
 class TopoCheck( CheckEvent ):
@@ -72,33 +108,37 @@
                     #    main.log.warn( "Topo Check - link or device number discoverd by ONOS%s is incorrect" % ( controller.index ) )
                     #    checkResult = EventStates().FAIL
                     # Check links
-                    links = controller.CLI.links()
-                    links = json.loads( links )
-                    if not len( links ) == upLinkNum:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "Topo Check - link number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, upLinkNum, len( links ) ) )
-                    # Check devices
-                    devices = controller.CLI.devices()
-                    devices = json.loads( devices )
-                    availableDeviceNum = 0
-                    for device in devices:
-                        if device[ 'available' ] == True:
-                            availableDeviceNum += 1
-                    if not availableDeviceNum == upDeviceNum:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "Topo Check - device number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, upDeviceNum, availableDeviceNum ) )
-                    # Check hosts
-                    hosts = controller.CLI.hosts()
-                    hosts = json.loads( hosts )
-                    if not len( hosts ) == upHostNum:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "Topo Check - host number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, upHostNum, len( hosts ) ) )
-                    # Check clusters
-                    clusters = controller.CLI.clusters()
-                    clusters = json.loads( clusters )
-                    if not len( clusters ) == clusterNum:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "Topo Check - cluster number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, clusterNum, len( clusters ) ) )
+                    try:
+                        links = controller.CLI.links()
+                        links = json.loads( links )
+                        if not len( links ) == upLinkNum:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "Topo Check - link number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, upLinkNum, len( links ) ) )
+                        # Check devices
+                        devices = controller.CLI.devices()
+                        devices = json.loads( devices )
+                        availableDeviceNum = 0
+                        for device in devices:
+                            if device[ 'available' ] == True:
+                                availableDeviceNum += 1
+                        if not availableDeviceNum == upDeviceNum:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "Topo Check - device number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, upDeviceNum, availableDeviceNum ) )
+                        # Check hosts
+                        hosts = controller.CLI.hosts()
+                        hosts = json.loads( hosts )
+                        if not len( hosts ) == upHostNum:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "Topo Check - host number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, upHostNum, len( hosts ) ) )
+                        # Check clusters
+                        clusters = controller.CLI.clusters()
+                        clusters = json.loads( clusters )
+                        if not len( clusters ) == clusterNum:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "Topo Check - cluster number discoverd by ONOS%s is incorrect: %s expected and %s actual" % ( controller.index, clusterNum, len( clusters ) ) )
+                    except ( TypeError, ValueError ):
+                        main.log.exception( "Flow Check - Object not as expected" )
+                        return EventStates().FAIL
         return checkResult
 
 class ONOSCheck( CheckEvent ):
@@ -126,44 +166,48 @@
         for controller in main.controllers:
             if controller.isUp():
                 # Check mastership
-                with controller.CLILock:
-                    roles = controller.CLI.roles()
-                roles = json.loads( roles )
-                for device in roles:
-                    dpid = device[ 'id' ]
-                    if dpidToMaster[ dpid ] == 'unknown':
-                        dpidToMaster[ dpid ] = device[ 'master' ]
-                    elif dpidToMaster[ dpid ] != device[ 'master' ]:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "ONOS Check - Mastership of %s on ONOS%s is inconsistent with that on ONOS1" % ( dpid, controller.index ) )
-                    if dpidToAvailability[ dpid ] and device[ 'master' ] == "none":
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "ONOS Check - Device %s has no master on ONOS%s" % ( dpid, controller.index ) )
-                # Check leaders
-                with controller.CLILock:
-                    leaders = controller.CLI.leaders()
-                leaders = json.loads( leaders )
-                ONOSTopics = [ j['topic'] for j in leaders ]
-                for topic in topics:
-                    if topic not in ONOSTopics:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "ONOS Check - Topic %s not in leaders on ONOS%s" % ( topic, controller.index ) )
-                # Check node state
-                with controller.CLILock:
-                    nodes = controller.CLI.nodes()
-                nodes = json.loads( nodes )
-                ipToState = {}
-                for node in nodes:
-                    ipToState[ node[ 'ip' ] ] = node[ 'state' ]
-                for c in main.controllers:
-                    if c.isUp() and ipToState[ c.ip ] == 'READY':
-                        pass
-                    elif not c.isUp() and ipToState[ c.ip ] == 'INACTIVE':
-                        pass
-                    else:
-                        checkResult = EventStates().FAIL
-                        main.log.warn( "ONOS Check - ONOS%s shows wrong node state: ONOS%s is %s but state is %s" % ( controller.index, c.index, c.status, ipToState[ c.ip ] ) )
-                # TODO: check partitions?
+                try:
+                    with controller.CLILock:
+                        roles = controller.CLI.roles()
+                    roles = json.loads( roles )
+                    for device in roles:
+                        dpid = device[ 'id' ]
+                        if dpidToMaster[ dpid ] == 'unknown':
+                            dpidToMaster[ dpid ] = device[ 'master' ]
+                        elif dpidToMaster[ dpid ] != device[ 'master' ]:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "ONOS Check - Mastership of %s on ONOS%s is inconsistent with that on ONOS1" % ( dpid, controller.index ) )
+                        if dpidToAvailability[ dpid ] and device[ 'master' ] == "none":
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "ONOS Check - Device %s has no master on ONOS%s" % ( dpid, controller.index ) )
+                    # Check leaders
+                    with controller.CLILock:
+                        leaders = controller.CLI.leaders()
+                    leaders = json.loads( leaders )
+                    ONOSTopics = [ j['topic'] for j in leaders ]
+                    for topic in topics:
+                        if topic not in ONOSTopics:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "ONOS Check - Topic %s not in leaders on ONOS%s" % ( topic, controller.index ) )
+                    # Check node state
+                    with controller.CLILock:
+                        nodes = controller.CLI.nodes()
+                    nodes = json.loads( nodes )
+                    ipToState = {}
+                    for node in nodes:
+                        ipToState[ node[ 'ip' ] ] = node[ 'state' ]
+                    for c in main.controllers:
+                        if c.isUp() and ipToState[ c.ip ] == 'READY':
+                            pass
+                        elif not c.isUp() and ipToState[ c.ip ] == 'INACTIVE':
+                            pass
+                        else:
+                            checkResult = EventStates().FAIL
+                            main.log.warn( "ONOS Check - ONOS%s shows wrong node state: ONOS%s is %s but state is %s" % ( controller.index, c.index, c.status, ipToState[ c.ip ] ) )
+                    # TODO: check partitions?
+                except ( TypeError, ValueError ):
+                    main.log.exception( "ONOS Check - Object not as expected" )
+                    return EventStates().FAIL
         return checkResult
 
 class TrafficCheck( CheckEvent ):
