bsn_gentable: add TableStats test
diff --git a/tests-1.3/bsn_gentable.py b/tests-1.3/bsn_gentable.py
index 193b6ac..3b22e27 100644
--- a/tests-1.3/bsn_gentable.py
+++ b/tests-1.3/bsn_gentable.py
@@ -78,6 +78,10 @@
         request = ofp.message.bsn_gentable_desc_stats_request()
         return get_stats(self, request)
 
+    def do_table_stats(self):
+        request = ofp.message.bsn_gentable_stats_request()
+        return get_stats(self, request)
+
 class ClearAll(BaseGenTableTest):
     """
     Test clearing entire table
@@ -202,3 +206,22 @@
                 self.assertEqual(entry.max_entries, 1000)
 
         self.assertIn(TABLE_ID, seen)
+
+class TableStats(BaseGenTableTest):
+    """
+    Test retrieving table stats
+    """
+    def runTest(self):
+        entries = self.do_table_stats()
+        seen = set()
+        for entry in entries:
+            logging.debug(entry.show())
+            self.assertNotIn(entry.table_id, seen)
+            seen.add(entry.table_id)
+            if entry.table_id == TABLE_ID:
+                self.assertEqual(entry.entry_count, 0)
+                self.assertEqual(entry.checksum, 0)
+
+        # TODO add/modify/remove flows and verify entry_count/checksum
+
+        self.assertIn(TABLE_ID, seen)