diff --git a/test/test_mactime.py b/test/test_mactime.py
new file mode 100644
index 0000000..ab3d537
--- /dev/null
+++ b/test/test_mactime.py
@@ -0,0 +1,155 @@
+#!/usr/bin/env python
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner, running_extended_tests
+from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+
+
+class TestMactime(VppTestCase):
+    """ Mactime Unit Test Cases """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestMactime, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMactime, cls).tearDownClass()
+
+    def setUp(self):
+        super(TestMactime, self).setUp()
+
+    def tearDown(self):
+        super(TestMactime, self).tearDown()
+
+    def test_mactime_range_unittest(self):
+        """ Time Range Test """
+        error = self.vapi.cli("test time-range")
+
+        if error:
+            self.logger.critical(error)
+        self.assertNotIn('FAILED', error)
+
+    @unittest.skipUnless(running_extended_tests, "part of extended tests")
+    def test_mactime_unittest(self):
+        """ Mactime Plugin Code Coverage Test """
+        cmds = ["loopback create",
+                "mactime enable-disable disable",
+                "mactime enable-disable loop0",
+                "mactime enable-disable loop0 disable",
+                "mactime enable-disable sw_if_index 9999",
+                "bin mactime_enable_disable loop0",
+                "bin mactime_enable_disable loop0 disable",
+                "bin mactime_enable_disable sw_if_index 1",
+                "set interface state loop0 up",
+                "clear mactime",
+                "set ip arp loop0 192.168.1.1 00:d0:2d:5e:86:85",
+                "bin mactime_add_del_range name sallow "
+                "mac 00:d0:2d:5e:86:85 allow-static del",
+                "bin mactime_add_del_range name sallow "
+                "mac 00:d0:2d:5e:86:85 allow-static",
+                "bin mactime_add_del_range name sallow "
+                "mac 00:d0:2d:5e:86:85 allow-static del",
+                "bin mactime_add_del_range name sallow "
+                "mac 00:d0:2d:5e:86:85 allow-static",
+                "bin mactime_add_del_range name sblock "
+                "mac 01:00:5e:7f:ff:fa drop-static",
+                "bin mactime_add_del_range name ddrop "
+                "mac c8:bc:c8:5a:ba:f3 drop-range Sun - Sat "
+                "00:00 - 23:59",
+                "bin mactime_add_del_range name dallow "
+                "mac c8:bc:c8:5a:ba:f4 allow-range Sun - Sat "
+                "00:00 - 23:59",
+                "bin mactime_add_del_range name multi "
+                "mac c8:bc:c8:f0:f0:f0 allow-range Sun - Mon "
+                "00:00 - 23:59 Tue - Sat 00:00 - 23:59",
+                "bin mactime_add_del_range bogus",
+                "bin mactime_add_del_range mac 01:00:5e:7f:f0:f0 allow-static",
+                "bin mactime_add_del_range "
+                "name tooloooooooooooooooooooooooooooooooooooooooooooooooo"
+                "nnnnnnnnnnnnnnnnnnnnnnnnnnnng mac 00:00:de:ad:be:ef "
+                "allow-static",
+                "packet-generator new {\n"
+                " name allow\n"
+                " limit 15\n"
+                " size 128-128\n"
+                " interface loop0\n"
+                " node ethernet-input\n"
+                " data {\n"
+                "   IP6: 00:d0:2d:5e:86:85 -> 00:0d:ea:d0:00:00\n"
+                "   ICMP: db00::1 -> db00::2\n"
+                "   incrementing 30\n"
+                "   }\n",
+                "}\n",
+                "packet-generator new {\n"
+                " name deny\n"
+                " limit 15\n"
+                " size 128-128\n"
+                " interface loop0\n"
+                " node ethernet-input\n"
+                " data {\n"
+                "   IP6: 01:00:5e:7f:ff:fa -> 00:0d:ea:d0:00:00\n"
+                "   ICMP: db00::1 -> db00::2\n"
+                "   incrementing 30\n"
+                "   }\n",
+                "}\n",
+                "packet-generator new {\n"
+                " name ddrop\n"
+                " limit 15\n"
+                " size 128-128\n"
+                " interface loop0\n"
+                " node ethernet-input\n"
+                " data {\n"
+                "   IP6: c8:bc:c8:5a:ba:f3 -> 00:0d:ea:d0:00:00\n"
+                "   ICMP: db00::1 -> db00::2\n"
+                "   incrementing 30\n"
+                "   }\n",
+                "}\n",
+                "packet-generator new {\n"
+                " name dallow\n"
+                " limit 15\n"
+                " size 128-128\n"
+                " interface loop0\n"
+                " node ethernet-input\n"
+                " data {\n"
+                "   IP6: c8:bc:c8:5a:ba:f4 -> 00:0d:ea:d0:00:00\n"
+                "   ICMP: db00::1 -> db00::2\n"
+                "   incrementing 30\n"
+                "   }\n"
+                "}\n"
+                "packet-generator new {\n"
+                " name makeentry\n"
+                " limit 15\n"
+                " size 128-128\n"
+                " interface loop0\n"
+                " node ethernet-input\n"
+                " data {\n"
+                "   IP6: c8:bc:c8:5a:b0:0b -> 00:0d:ea:d0:00:00\n"
+                "   ICMP: db00::1 -> db00::2\n"
+                "   incrementing 30\n"
+                "   }\n"
+                "}\n"
+                "packet-generator new {\n"
+                " name tx\n"
+                " limit 15\n"
+                " size 128-128\n"
+                " interface local0\n"
+                " tx-interface loop0\n"
+                " node loop0-output\n"
+                " data {\n"
+                "   hex 0x01005e7ffffa000dead000000800"
+                "0102030405060708090a0b0c0d0e0f0102030405\n"
+                "   }\n"
+                "}\n"
+                "trace add pg-input 2",
+                "pa en",
+                "show mactime verbose 2",
+                "show trace",
+                "show error"]
+
+        for cmd in cmds:
+            self.logger.info(self.vapi.cli(cmd))
+
+if __name__ == '__main__':
+    unittest.main(testRunner=VppTestRunner)
