diff --git a/cord-robot/CORDRobot/__init__.py b/cord-robot/CORDRobot/__init__.py
index 8c357f6..d4a5b53 100644
--- a/cord-robot/CORDRobot/__init__.py
+++ b/cord-robot/CORDRobot/__init__.py
@@ -18,7 +18,7 @@
 
 from .CORDDictUtils import CORDDictUtils
 from .restApi import restApi
-from .testCaseUtils import TestCaseUtils
+from .testCaseUtils import testCaseUtils
 
 
 # return the library version
@@ -28,7 +28,7 @@
 
 
 # Inherit all the other sub-classes
-class CORDRobot(CORDDictUtils, restApi, TestCaseUtils):
+class CORDRobot(CORDDictUtils, restApi, testCaseUtils):
 
     ROBOT_LIBRARY_SCOPE = "GLOBAL"
 
diff --git a/cord-robot/CORDRobot/testCaseUtils.py b/cord-robot/CORDRobot/testCaseUtils.py
index 88f1913..30a9d25 100755
--- a/cord-robot/CORDRobot/testCaseUtils.py
+++ b/cord-robot/CORDRobot/testCaseUtils.py
@@ -26,7 +26,7 @@
 import sys
 
 
-class TestCaseUtils():
+class testCaseUtils():
 
     @staticmethod
     def config_dirs(self, log_dir, root_dir=None, voltha_dir=None):
@@ -78,7 +78,7 @@
         if i == 0:
             output.write(child.before)
             output.close()
-            TestCaseUtils.remove_leading_line(log_dir, log_file1)
+            testCaseUtils.remove_leading_line(log_dir, log_file1)
         elif i == 1:
             if log_file2 is not None and cmd2 is not None:
                 output = open(log_dir + "/" + log_file2, "wb")
@@ -88,7 +88,7 @@
                 )
                 output.write(child.before)
                 output.close()
-                TestCaseUtils.remove_leading_line(log_dir, log_file2)
+                testCaseUtils.remove_leading_line(log_dir, log_file2)
             if log_file3 is not None and cmd3 is not None:
                 output = open(log_dir + "/" + log_file3, "wb")
                 child.sendline(cmd3)
@@ -97,7 +97,7 @@
                 )
                 output.write(child.before)
                 output.close()
-                TestCaseUtils.remove_leading_line(log_dir, log_file3)
+                testCaseUtils.remove_leading_line(log_dir, log_file3)
         child.close()
 
     @staticmethod
@@ -223,11 +223,11 @@
 
     @staticmethod
     def discover_rg_pod_name():
-        return TestCaseUtils.extract_pod_name("rg0").strip()
+        return testCaseUtils.extract_pod_name("rg0").strip()
 
     @staticmethod
     def retrieve_authorized_users_device_id_and_port_number(status_line):
-        fields = TestCaseUtils.parse_fields(status_line, ",")
+        fields = testCaseUtils.parse_fields(status_line, ",")
         deviceField = fields[2].strip()
         deviceStr, equal, deviceId = deviceField.partition("=")
         device_Id = deviceId
@@ -237,7 +237,7 @@
         return device_Id, portNumber
 
     def add_subscriber_access(self, device_id, port_number):
-        TestCaseUtils.write_log_of_onos_cli_command(
+        testCaseUtils.write_log_of_onos_cli_command(
             self.get_dir("log"),
             "voltha_add_subscriber_access.log",
             "volt-add-subscriber-access %s %s" % (device_id, port_number),
