diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md
index 693dacf..7c1ac47 100644
--- a/docs/guides/python_chip_controller_building.md
+++ b/docs/guides/python_chip_controller_building.md
@@ -624,10 +624,10 @@
 ```python
 # devCtrl.WriteAttribute(<nodeid>, [(<endpointid>, Clusters.<cluster>.Attributes.<attribute>(value=<attribute value>))])
 # e.g.
-await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.Int8u(value=1))])
-await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.Boolean(value=True))])
-await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.OctetString(value=b'123123\x00'))])
-await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.CharString(value='233233'))])
+await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.Int8u(value=1))])
+await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.Boolean(value=True))])
+await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.OctetString(value=b'123123\x00'))])
+await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.CharString(value='233233'))])
 ```
 
 ### `zclsubscribe <Cluster> <Attribute> <Nodeid> <Endpoint> <MinInterval> <MaxInterval>`
diff --git a/docs/guides/repl/Matter_Basic_Interactions.ipynb b/docs/guides/repl/Matter_Basic_Interactions.ipynb
index fe2e366..0693f19 100644
--- a/docs/guides/repl/Matter_Basic_Interactions.ipynb
+++ b/docs/guides/repl/Matter_Basic_Interactions.ipynb
@@ -98,7 +98,7 @@
     "\n",
     "### Namespaces\n",
     "\n",
-    "Objects in clusters are organized into namespaces. All clusters can be found under the `Clusters` namespace, with the appropriate cluster in upper camel case within that. (e.g `Clusters.TestCluster`).\n",
+    "Objects in clusters are organized into namespaces. All clusters can be found under the `Clusters` namespace, with the appropriate cluster in upper camel case within that. (e.g `Clusters.UnitTesting`).\n",
     "\n",
     "Within that, `Commands`, `Structs` and `Attributes` delimit the respective types in the cluster.\n",
     "\n",
@@ -146,10 +146,10 @@
     }
    ],
    "source": [
-    "v = Clusters.TestCluster.Structs.SimpleStruct()\n",
+    "v = Clusters.UnitTesting.Structs.SimpleStruct()\n",
     "v.a = 20\n",
     "v.b = True\n",
-    "v.c = Clusters.TestCluster.Enums.SimpleEnum.kValueA\n",
+    "v.c = Clusters.UnitTesting.Enums.SimpleEnum.kValueA\n",
     "v.d = b'1234'\n",
     "v.e = 30\n",
     "v.g = 23.234\n",
@@ -194,7 +194,7 @@
     }
    ],
    "source": [
-    "Clusters.TestCluster.Commands.TestAddArguments()"
+    "Clusters.UnitTesting.Commands.TestAddArguments()"
    ]
   },
   {
@@ -214,7 +214,7 @@
     {
      "data": {
       "text/html": [
-       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #000080; text-decoration-color: #000080\">╭──────── </span><span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Commands.TestAddArguments'</span><span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">&gt;</span><span style=\"color: #000080; text-decoration-color: #000080\"> ─────────╮</span>\n",
+       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #000080; text-decoration-color: #000080\">╭──────── </span><span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Commands.TestAddArguments'</span><span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">&gt;</span><span style=\"color: #000080; text-decoration-color: #000080\"> ─────────╮</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">def </span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">TestCluster.Commands.TestAddArguments</span><span style=\"font-weight: bold\">(</span>arg1: <span style=\"color: #008000; text-decoration-color: #008000\">'uint'</span> = <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>, arg2: <span style=\"color: #008000; text-decoration-color: #008000\">'uint'</span> = <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">)</span> -&gt; <span style=\"color: #800080; text-decoration-color: #800080; font-style: italic\">None</span>: <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                                                                        <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">TestAddArguments</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080\">arg1: </span><span style=\"color: #008000; text-decoration-color: #008000\">'uint'</span><span style=\"color: #008080; text-decoration-color: #008080\"> = </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"color: #008080; text-decoration-color: #008080\">, arg2: </span><span style=\"color: #008000; text-decoration-color: #008000\">'uint'</span><span style=\"color: #008080; text-decoration-color: #008080\"> = </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">)</span>                                   <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
@@ -246,7 +246,7 @@
        "</pre>\n"
       ],
       "text/plain": [
-       "\u001b[34m╭─\u001b[0m\u001b[34m─────── \u001b[0m\u001b[1;34m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Commands.TestAddArguments'\u001b[0m\u001b[1;34m>\u001b[0m\u001b[34m ────────\u001b[0m\u001b[34m─╮\u001b[0m\n",
+       "\u001b[34m╭─\u001b[0m\u001b[34m─────── \u001b[0m\u001b[1;34m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Commands.TestAddArguments'\u001b[0m\u001b[1;34m>\u001b[0m\u001b[34m ────────\u001b[0m\u001b[34m─╮\u001b[0m\n",
        "\u001b[34m│\u001b[0m \u001b[3;96mdef \u001b[0m\u001b[1;31mTestCluster.Commands.TestAddArguments\u001b[0m\u001b[1m(\u001b[0marg1: \u001b[32m'uint'\u001b[0m = \u001b[1;36m0\u001b[0m, arg2: \u001b[32m'uint'\u001b[0m = \u001b[1;36m0\u001b[0m\u001b[1m)\u001b[0m -> \u001b[3;35mNone\u001b[0m: \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m                                                                                        \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m \u001b[1;35mTestAddArguments\u001b[0m\u001b[1;36m(\u001b[0m\u001b[36marg1: \u001b[0m\u001b[32m'uint'\u001b[0m\u001b[36m = \u001b[0m\u001b[1;36m0\u001b[0m\u001b[36m, arg2: \u001b[0m\u001b[32m'uint'\u001b[0m\u001b[36m = \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;36m)\u001b[0m                                   \u001b[34m│\u001b[0m\n",
@@ -282,7 +282,7 @@
     }
    ],
    "source": [
-    "matterhelp(Clusters.TestCluster.Commands.TestAddArguments)"
+    "matterhelp(Clusters.UnitTesting.Commands.TestAddArguments)"
    ]
   },
   {
@@ -346,7 +346,7 @@
     }
    ],
    "source": [
-    "a = Clusters.TestCluster.Structs.NullablesAndOptionalsStruct()\n",
+    "a = Clusters.UnitTesting.Structs.NullablesAndOptionalsStruct()\n",
     "a.nullableInt = Clusters.Types.NullValue\n",
     "a"
    ]
@@ -436,7 +436,7 @@
     }
    ],
    "source": [
-    "Clusters.TestCluster.Structs.SimpleStruct()"
+    "Clusters.UnitTesting.Structs.SimpleStruct()"
    ]
   },
   {
@@ -864,7 +864,7 @@
     }
    ],
    "source": [
-    "await devCtrl.SendCommand(2, 1, Clusters.TestCluster.Commands.TestListInt8UReverseRequest([1, 3, 5, 7]))"
+    "await devCtrl.SendCommand(2, 1, Clusters.UnitTesting.Commands.TestListInt8UReverseRequest([1, 3, 5, 7]))"
    ]
   },
   {
@@ -899,8 +899,8 @@
        "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
        "<span style=\"font-weight: bold\">{</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">}</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"font-weight: bold\">}</span>\n",
        "<span style=\"font-weight: bold\">}</span>\n",
@@ -910,8 +910,8 @@
        "\n",
        "\u001b[1m{\u001b[0m\n",
        "\u001b[2;32m│   \u001b[0m\u001b[1;36m1\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m\n",
+       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m\n",
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m}\u001b[0m\n",
        "\u001b[2;32m│   \u001b[0m\u001b[1m}\u001b[0m\n",
        "\u001b[1m}\u001b[0m\n"
@@ -922,7 +922,7 @@
     }
    ],
    "source": [
-    "a = await devCtrl.ReadAttribute(2, [Clusters.TestCluster.Attributes.Int16u])\n",
+    "a = await devCtrl.ReadAttribute(2, [Clusters.UnitTesting.Attributes.Int16u])\n",
     "a"
    ]
   },
@@ -937,14 +937,14 @@
       "text/html": [
        "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
        "<span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
        "<span style=\"font-weight: bold\">}</span>\n",
        "</pre>\n"
       ],
       "text/plain": [
        "\n",
        "\u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m\n",
+       "\u001b[2;32m│   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m\n",
        "\u001b[1m}\u001b[0m\n"
       ]
      },
@@ -953,7 +953,7 @@
     }
    ],
    "source": [
-    "a[1][Clusters.TestCluster]"
+    "a[1][Clusters.UnitTesting]"
    ]
   },
   {
@@ -977,7 +977,7 @@
     }
    ],
    "source": [
-    "a[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.Int16u]"
+    "a[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.Int16u]"
    ]
   },
   {
@@ -1002,9 +1002,9 @@
        "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
        "<span style=\"font-weight: bold\">{</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Boolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Boolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">}</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"font-weight: bold\">}</span>\n",
        "<span style=\"font-weight: bold\">}</span>\n",
@@ -1014,9 +1014,9 @@
        "\n",
        "\u001b[1m{\u001b[0m\n",
        "\u001b[2;32m│   \u001b[0m\u001b[1;36m1\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Boolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m\n",
+       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Boolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m\n",
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m}\u001b[0m\n",
        "\u001b[2;32m│   \u001b[0m\u001b[1m}\u001b[0m\n",
        "\u001b[1m}\u001b[0m\n"
@@ -1027,7 +1027,7 @@
     }
    ],
    "source": [
-    "await devCtrl.ReadAttribute(2, [Clusters.TestCluster.Attributes.Int16u, Clusters.TestCluster.Attributes.Boolean])"
+    "await devCtrl.ReadAttribute(2, [Clusters.UnitTesting.Attributes.Int16u, Clusters.UnitTesting.Attributes.Boolean])"
    ]
   },
   {
@@ -1305,8 +1305,8 @@
      "text": [
       "2022-01-25 16:58:32 johnsj-macbookpro1.roam.corp.google.com root[27801] ERROR For path: Endpoint = 0, Attribute = <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.Networks'>, got IM Error: InteractionModelError: UnsupportedRead (0x8f)\n",
       "2022-01-25 16:58:32 johnsj-macbookpro1.roam.corp.google.com root[27801] ERROR For path: Endpoint = 1, Attribute = <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.Networks'>, got IM Error: InteractionModelError: UnsupportedRead (0x8f)\n",
-      "2022-01-25 16:58:32 johnsj-macbookpro1.roam.corp.google.com root[27801] ERROR For path: Endpoint = 1, Attribute = <class 'chip.clusters.Objects.TestCluster.Attributes.GeneralErrorBoolean'>, got IM Error: InteractionModelError: InvalidDataType (0x8d)\n",
-      "2022-01-25 16:58:32 johnsj-macbookpro1.roam.corp.google.com root[27801] ERROR For path: Endpoint = 1, Attribute = <class 'chip.clusters.Objects.TestCluster.Attributes.ClusterErrorBoolean'>, got IM Error: InteractionModelError: Failure (0x1)\n"
+      "2022-01-25 16:58:32 johnsj-macbookpro1.roam.corp.google.com root[27801] ERROR For path: Endpoint = 1, Attribute = <class 'chip.clusters.Objects.UnitTesting.Attributes.GeneralErrorBoolean'>, got IM Error: InteractionModelError: InvalidDataType (0x8d)\n",
+      "2022-01-25 16:58:32 johnsj-macbookpro1.roam.corp.google.com root[27801] ERROR For path: Endpoint = 1, Attribute = <class 'chip.clusters.Objects.UnitTesting.Attributes.ClusterErrorBoolean'>, got IM Error: InteractionModelError: Failure (0x1)\n"
      ]
     },
     {
@@ -2122,46 +2122,46 @@
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.AccountLogin'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.AccountLogin.Attributes.ClusterRevision'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">}</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Boolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Bitmap8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Bitmap16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Bitmap32'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Bitmap64'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int24u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int32u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int40u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int48u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int56u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int64u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int24s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int32s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int40s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int48s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int56s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int64s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Enum8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Enum16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.FloatSingle'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.FloatDouble'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.OctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ListInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Boolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Bitmap8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Bitmap16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Bitmap32'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Bitmap64'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int24u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int32u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int40u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int48u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int56u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int64u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int24s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int32s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int40s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int48s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int56s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int64s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Enum8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Enum16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.FloatSingle'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.FloatDouble'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.OctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ListInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">]</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ListOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ListOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b''</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">]</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ListStructOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ListStructOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">TestListStructOctet</span><span style=\"font-weight: bold\">(</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">fabricIndex</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">operationalCert</span>=<span style=\"color: #008000; text-decoration-color: #008000\">b''</span>\n",
@@ -2179,13 +2179,13 @@
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">operationalCert</span>=<span style=\"color: #008000; text-decoration-color: #008000\">b''</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"font-weight: bold\">)</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">]</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.LongOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.CharString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">''</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.LongCharString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">''</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.EpochUs'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.EpochS'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.VendorId'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ListNullablesAndOptionalsStruct'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.LongOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.CharString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">''</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.LongCharString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">''</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.EpochUs'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.EpochS'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.VendorId'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ListNullablesAndOptionalsStruct'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">NullablesAndOptionalsStruct</span><span style=\"font-weight: bold\">(</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">nullableInt</span>=<span style=\"color: #800080; text-decoration-color: #800080\">Null</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">optionalInt</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-style: italic\">None</span>,\n",
@@ -2201,8 +2201,8 @@
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">nullableOptionalList</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-style: italic\">None</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"font-weight: bold\">)</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">]</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.EnumAttr'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">SimpleEnum.kUnspecified:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.StructAttr'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">SimpleStruct</span><span style=\"font-weight: bold\">(</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.EnumAttr'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">SimpleEnum.kUnspecified:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.StructAttr'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">SimpleStruct</span><span style=\"font-weight: bold\">(</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">a</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">b</span>=<span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">c</span>=<span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">SimpleEnum.kUnspecified:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
@@ -2212,64 +2212,64 @@
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">g</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">h</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">)</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">70</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-20</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">200</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-100</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ListLongOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">70</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-20</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">200</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-100</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ListLongOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #008000; text-decoration-color: #008000\">b'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">]</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ListFabricScoped'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ListFabricScoped'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">TestFabricScoped</span><span style=\"font-weight: bold\">(</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">fabricIndex</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"font-weight: bold\">)</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">]</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.TimedWriteBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.GeneralErrorBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ValueDecodeFailure</span><span style=\"font-weight: bold\">(</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.TimedWriteBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.GeneralErrorBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ValueDecodeFailure</span><span style=\"font-weight: bold\">(</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">TLVValue</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-style: italic\">None</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">Reason</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">InteractionModelError</span><span style=\"font-weight: bold\">(&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">Status.InvalidDataType:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">141</span><span style=\"font-weight: bold\">&gt;)</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">)</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ClusterErrorBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ValueDecodeFailure</span><span style=\"font-weight: bold\">(</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ClusterErrorBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ValueDecodeFailure</span><span style=\"font-weight: bold\">(</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">TLVValue</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-style: italic\">None</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   │   </span><span style=\"color: #808000; text-decoration-color: #808000\">Reason</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">InteractionModelError</span><span style=\"font-weight: bold\">(&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">Status.Failure:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"font-weight: bold\">&gt;)</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">)</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap32'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap64'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt24u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt32u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt40u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt48u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt56u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt64u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt24s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt32s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt40s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt48s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt56s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableInt64s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableEnum8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableEnum16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableFloatSingle'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableFloatDouble'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableCharString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">''</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableEnumAttr'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">SimpleEnum.kUnspecified:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableStruct'</span><span style=\"font-weight: bold\">&gt;</span>: Null,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">70</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-20</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">200</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-100</span>,\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.ClusterRevision'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableBoolean'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap32'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap64'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt24u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt32u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt40u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt48u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt56u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt64u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt24s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt32s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt40s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt48s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt56s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableInt64s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableEnum8'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableEnum16'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableFloatSingle'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableFloatDouble'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.0</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableOctetString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">b''</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableCharString'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008000; text-decoration-color: #008000\">''</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableEnumAttr'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">SimpleEnum.kUnspecified:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableStruct'</span><span style=\"font-weight: bold\">&gt;</span>: Null,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt8u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">70</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt8s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-20</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">200</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt16s'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">-100</span>,\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.ClusterRevision'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">}</span>,\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.ElectricalMeasurement'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.ElectricalMeasurement.Attributes.MeasurementType'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
@@ -3138,46 +3138,46 @@
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.AccountLogin'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.AccountLogin.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n",
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m}\u001b[0m,\n",
-       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Boolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Bitmap8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Bitmap16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Bitmap32'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Bitmap64'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int24u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int32u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int40u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int48u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int56u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int64u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int24s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int32s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int40s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int48s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int56s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int64s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Enum8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Enum16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.FloatSingle'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.FloatDouble'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.OctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32mb''\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ListInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
+       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Boolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Bitmap8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Bitmap16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Bitmap32'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Bitmap64'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int24u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int32u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int40u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int48u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int56u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int64u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int24s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int32s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int40s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int48s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int56s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int64s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Enum8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Enum16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.FloatSingle'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.FloatDouble'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.OctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32mb''\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ListInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;36m0\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;36m0\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;36m0\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;36m0\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m]\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ListOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ListOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb''\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb''\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb''\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb''\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m]\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ListStructOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ListStructOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;35mTestListStructOctet\u001b[0m\u001b[1m(\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33mfabricIndex\u001b[0m=\u001b[1;36m0\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33moperationalCert\u001b[0m=\u001b[32mb\u001b[0m\u001b[32m''\u001b[0m\n",
@@ -3195,13 +3195,13 @@
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33moperationalCert\u001b[0m=\u001b[32mb\u001b[0m\u001b[32m''\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1m)\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m]\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.LongOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32mb''\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.CharString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32m''\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.LongCharString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32m''\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.EpochUs'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.EpochS'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.VendorId'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ListNullablesAndOptionalsStruct'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.LongOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32mb''\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.CharString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32m''\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.LongCharString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32m''\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.EpochUs'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.EpochS'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.VendorId'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ListNullablesAndOptionalsStruct'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;35mNullablesAndOptionalsStruct\u001b[0m\u001b[1m(\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33mnullableInt\u001b[0m=\u001b[35mNull\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33moptionalInt\u001b[0m=\u001b[3;35mNone\u001b[0m,\n",
@@ -3217,8 +3217,8 @@
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33mnullableOptionalList\u001b[0m=\u001b[3;35mNone\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1m)\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m]\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.EnumAttr'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mSimpleEnum.kUnspecified:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.StructAttr'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mSimpleStruct\u001b[0m\u001b[1m(\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.EnumAttr'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mSimpleEnum.kUnspecified:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.StructAttr'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mSimpleStruct\u001b[0m\u001b[1m(\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33ma\u001b[0m=\u001b[1;36m0\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mb\u001b[0m=\u001b[3;91mFalse\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mc\u001b[0m=\u001b[1m<\u001b[0m\u001b[1;95mSimpleEnum.kUnspecified:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
@@ -3228,64 +3228,64 @@
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mg\u001b[0m=\u001b[1;36m0\u001b[0m\u001b[1;36m.0\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mh\u001b[0m=\u001b[1;36m0\u001b[0m\u001b[1;36m.0\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m)\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m70\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-20\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m200\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.RangeRestrictedInt16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-100\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ListLongOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m70\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-20\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m200\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.RangeRestrictedInt16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-100\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ListLongOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[32mb'0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m]\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ListFabricScoped'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ListFabricScoped'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1;35mTestFabricScoped\u001b[0m\u001b[1m(\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   │   \u001b[0m\u001b[33mfabricIndex\u001b[0m=\u001b[1;36m1\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[1m)\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m]\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.TimedWriteBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.GeneralErrorBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mValueDecodeFailure\u001b[0m\u001b[1m(\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.TimedWriteBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.GeneralErrorBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mValueDecodeFailure\u001b[0m\u001b[1m(\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mTLVValue\u001b[0m=\u001b[3;35mNone\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mReason\u001b[0m=\u001b[1;35mInteractionModelError\u001b[0m\u001b[1m(\u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mStatus.InvalidDataType:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m141\u001b[0m\u001b[1m>\u001b[0m\u001b[1m)\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m)\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ClusterErrorBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mValueDecodeFailure\u001b[0m\u001b[1m(\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ClusterErrorBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mValueDecodeFailure\u001b[0m\u001b[1m(\u001b[0m\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mTLVValue\u001b[0m=\u001b[3;35mNone\u001b[0m,\n",
        "\u001b[2;32m│   │   │   │   \u001b[0m\u001b[33mReason\u001b[0m=\u001b[1;35mInteractionModelError\u001b[0m\u001b[1m(\u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mStatus.Failure:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m>\u001b[0m\u001b[1m)\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m)\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap32'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableBitmap64'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt24u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt32u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt40u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt48u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt56u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt64u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt24s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt32s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt40s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt48s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt56s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableInt64s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableEnum8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableEnum16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableFloatSingle'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableFloatDouble'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32mb''\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableCharString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32m''\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableEnumAttr'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mSimpleEnum.kUnspecified:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableStruct'\u001b[0m\u001b[1m>\u001b[0m: Null,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m70\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-20\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m200\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.NullableRangeRestrictedInt16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-100\u001b[0m,\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableBoolean'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;91mFalse\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap32'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableBitmap64'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt24u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt32u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt40u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt48u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt56u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt64u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt24s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt32s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt40s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt48s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt56s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableInt64s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableEnum8'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableEnum16'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableFloatSingle'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableFloatDouble'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0.0\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableOctetString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32mb''\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableCharString'\u001b[0m\u001b[1m>\u001b[0m: \u001b[32m''\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableEnumAttr'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mSimpleEnum.kUnspecified:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableStruct'\u001b[0m\u001b[1m>\u001b[0m: Null,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt8u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m70\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt8s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-20\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m200\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.NullableRangeRestrictedInt16s'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m-100\u001b[0m,\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n",
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m}\u001b[0m,\n",
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.ElectricalMeasurement'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
        "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.ElectricalMeasurement.Attributes.MeasurementType'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
@@ -3597,7 +3597,7 @@
    ],
    "source": [
     "# Force an event to get emitted.\n",
-    "await devCtrl.SendCommand(2, 1, Clusters.TestCluster.Commands.TestEmitTestEventRequest())\n",
+    "await devCtrl.SendCommand(2, 1, Clusters.UnitTesting.Commands.TestEmitTestEventRequest())\n",
     "\n",
     "await devCtrl.ReadEvent(2, [('*')])"
    ]
@@ -4075,7 +4075,7 @@
     }
    ],
    "source": [
-    "await devCtrl.SendCommand(2, 1, Clusters.TestCluster.Commands.TestEmitTestEventRequest())\n",
+    "await devCtrl.SendCommand(2, 1, Clusters.UnitTesting.Commands.TestEmitTestEventRequest())\n",
     "time.sleep(3)"
    ]
   },
@@ -4140,7 +4140,7 @@
     }
    ],
    "source": [
-    "await devCtrl.WriteAttribute(2, [ (1, Clusters.TestCluster.Attributes.Int16u(2)) ])"
+    "await devCtrl.WriteAttribute(2, [ (1, Clusters.UnitTesting.Attributes.Int16u(2)) ])"
    ]
   },
   {
@@ -4155,8 +4155,8 @@
        "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
        "<span style=\"font-weight: bold\">{</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
-       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.TestCluster.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
+       "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   │   </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.UnitTesting.Attributes.Int16u'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   │   </span><span style=\"font-weight: bold\">}</span>\n",
        "<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│   </span><span style=\"font-weight: bold\">}</span>\n",
        "<span style=\"font-weight: bold\">}</span>\n",
@@ -4166,8 +4166,8 @@
        "\n",
        "\u001b[1m{\u001b[0m\n",
        "\u001b[2;32m│   \u001b[0m\u001b[1;36m1\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
-       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.TestCluster.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m2\u001b[0m\n",
+       "\u001b[2;32m│   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
+       "\u001b[2;32m│   │   │   \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.UnitTesting.Attributes.Int16u'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m2\u001b[0m\n",
        "\u001b[2;32m│   │   \u001b[0m\u001b[1m}\u001b[0m\n",
        "\u001b[2;32m│   \u001b[0m\u001b[1m}\u001b[0m\n",
        "\u001b[1m}\u001b[0m\n"
@@ -4178,7 +4178,7 @@
     }
    ],
    "source": [
-    "await devCtrl.ReadAttribute(2, [ (1, Clusters.TestCluster.Attributes.Int16u) ])"
+    "await devCtrl.ReadAttribute(2, [ (1, Clusters.UnitTesting.Attributes.Int16u) ])"
    ]
   }
  ],
diff --git a/docs/guides/repl/Matter_REPL_Intro.ipynb b/docs/guides/repl/Matter_REPL_Intro.ipynb
index 83cc3ad..2960cba 100644
--- a/docs/guides/repl/Matter_REPL_Intro.ipynb
+++ b/docs/guides/repl/Matter_REPL_Intro.ipynb
@@ -670,7 +670,7 @@
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                                                                           <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                             <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">E.g</span>                                           <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                             <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">    </span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">(</span><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf; font-weight: bold\">1</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">, </span>                                      <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
-       "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                             <span style=\"color: #bf7fbf; text-decoration-color: #bf7fbf; font-weight: bold\">Clusters.TestCluster.Attributes.XYZAttribute</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">…</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
+       "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                             <span style=\"color: #bf7fbf; text-decoration-color: #bf7fbf; font-weight: bold\">Clusters.UnitTesting.Attributes.XYZAttribute</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">…</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                             <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">-- Write </span><span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">'hello'</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\"> to the XYZ attribute on the </span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                                             <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">test cluster to endpoint </span><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf; font-weight: bold\">1</span>                    <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
        "<span style=\"color: #000080; text-decoration-color: #000080\">│</span>                          <span style=\"color: #808000; text-decoration-color: #808000; font-style: italic\">ZCLAttributeList</span> = <span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">def </span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ZCLAttributeList</span><span style=\"font-weight: bold\">()</span>:                       <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
@@ -893,7 +893,7 @@
        "\u001b[34m│\u001b[0m                                                                                           \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m                                             \u001b[2mE.g\u001b[0m                                           \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m                                             \u001b[2m    \u001b[0m\u001b[1;2m(\u001b[0m\u001b[1;2;36m1\u001b[0m\u001b[2m, \u001b[0m                                      \u001b[34m│\u001b[0m\n",
-       "\u001b[34m│\u001b[0m                                             \u001b[1;2;35mClusters.TestCluster.Attributes.XYZAttribute\u001b[0m\u001b[1;2m…\u001b[0m \u001b[34m│\u001b[0m\n",
+       "\u001b[34m│\u001b[0m                                             \u001b[1;2;35mClusters.UnitTesting.luster.Attributes.XYZAttribute\u001b[0m\u001b[1;2m…\u001b[0m \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m                                             \u001b[2m-- Write \u001b[0m\u001b[2;32m'hello'\u001b[0m\u001b[2m to the XYZ attribute on the \u001b[0m \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m                                             \u001b[2mtest cluster to endpoint \u001b[0m\u001b[1;2;36m1\u001b[0m                    \u001b[34m│\u001b[0m\n",
        "\u001b[34m│\u001b[0m                          \u001b[3;33mZCLAttributeList\u001b[0m = \u001b[3;96mdef \u001b[0m\u001b[1;31mZCLAttributeList\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m:                       \u001b[34m│\u001b[0m\n",
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 6d46116..62cf857 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -3528,7 +3528,7 @@
   readonly attribute int16u clusterRevision = 65533;
 }
 
-server cluster TestCluster = 4294048773 {
+server cluster UnitTesting = 4294048773 {
   enum SimpleEnum : ENUM8 {
     kUnspecified = 0;
     kValueA = 1;
@@ -4705,7 +4705,7 @@
     ram      attribute clusterRevision default = 3;
   }
 
-  server cluster TestCluster {
+  server cluster UnitTesting {
     ram      attribute boolean;
     ram      attribute bitmap8;
     ram      attribute bitmap16;
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
index 99d72ee..186bc91 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
@@ -8055,7 +8055,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -8107,7 +8107,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -19159,7 +19159,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -19331,7 +19331,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
index 11646ab..9c29b7e 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
@@ -2952,7 +2952,7 @@
   timed command Logout(): DefaultSuccess = 3;
 }
 
-server cluster TestCluster = 4294048773 {
+server cluster UnitTesting = 4294048773 {
   enum SimpleEnum : ENUM8 {
     kUnspecified = 0;
     kValueA = 1;
@@ -3801,7 +3801,7 @@
     ram      attribute clusterRevision default = 1;
   }
 
-  server cluster TestCluster {
+  server cluster UnitTesting {
     ram      attribute boolean;
     ram      attribute bitmap8;
     ram      attribute bitmap16;
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
index 5897329..b15e878 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
@@ -8055,7 +8055,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -8107,7 +8107,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -18951,7 +18951,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -19123,7 +19123,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap
index ca91d4a..36f576d 100644
--- a/examples/thermostat/thermostat-common/thermostat.zap
+++ b/examples/thermostat/thermostat-common/thermostat.zap
@@ -7011,7 +7011,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -7063,7 +7063,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -14129,7 +14129,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -14173,7 +14173,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap
index 98bad2e..cd1dd1a 100644
--- a/examples/tv-app/tv-common/tv-app.zap
+++ b/examples/tv-app/tv-common/tv-app.zap
@@ -6921,7 +6921,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -6973,7 +6973,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -9219,7 +9219,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -9271,7 +9271,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
diff --git a/scripts/idl/test_xml_parser.py b/scripts/idl/test_xml_parser.py
index 5f8882a..4a43d3f 100755
--- a/scripts/idl/test_xml_parser.py
+++ b/scripts/idl/test_xml_parser.py
@@ -53,7 +53,7 @@
             <!-- Comments should be supported -->
             <configurator>
               <cluster>
-                <name>Test Cluster</name>
+                <name>Test</name>
                 <code>0x1234</code>
 
                 <attribute side="server" code="11" type="INT32U" min="0" max="2" isNullable="true" reportable="true" writable="false">SomeIntAttribute</attribute>
@@ -83,7 +83,7 @@
                          Idl(clusters=[
                              Cluster(
                                  side=ClusterSide.CLIENT,
-                                 name='TestCluster',
+                                 name='Test',
                                  code=0x1234,
                                  attributes=[
                                      Attribute(definition=Field(data_type=DataType(name='INT32U'), code=11, name='SomeIntAttribute',
@@ -150,7 +150,7 @@
         idl = XmlToIdl('''<?xml version="1.0"?>
             <configurator>
               <cluster>
-                <name>Test Cluster</name>
+                <name>Test</name>
                 <code>0x0001</code>
 
                 <event side="server" code="0x1234" name="FabricEvent" priority="info" isFabricSensitive="true" optional="false">
@@ -173,7 +173,7 @@
         ''')
         self.assertEqual(idl,
                          Idl(clusters=[Cluster(side=ClusterSide.CLIENT,
-                                               name='TestCluster',
+                                               name='Test',
                                                code=1,
                                                events=[Event(priority=EventPriority.INFO,
                                                              name='FabricEvent',
diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp
index 8647c7b..acf56b7 100644
--- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp
+++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp
@@ -38,9 +38,9 @@
 using namespace chip;
 using namespace chip::app;
 using namespace chip::app::Clusters;
-using namespace chip::app::Clusters::TestCluster;
-using namespace chip::app::Clusters::TestCluster::Commands;
-using namespace chip::app::Clusters::TestCluster::Attributes;
+using namespace chip::app::Clusters::UnitTesting;
+using namespace chip::app::Clusters::UnitTesting::Commands;
+using namespace chip::app::Clusters::UnitTesting::Attributes;
 
 // The number of elements in the test attribute list
 constexpr uint8_t kAttributeListLength = 4;
@@ -75,7 +75,7 @@
 {
 public:
     // Register for the Test Cluster cluster on all endpoints.
-    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), TestCluster::Id) {}
+    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), Clusters::UnitTesting::Id) {}
 
     CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override;
     CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override;
@@ -115,7 +115,7 @@
 Structs::SimpleStruct::Type gStructAttributeValue;
 NullableStruct::TypeInfo::Type gNullableStructAttributeValue;
 
-TestCluster::Structs::TestFabricScoped::Type gListFabricScopedAttributeValue[kAttributeListLength];
+chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type gListFabricScopedAttributeValue[kAttributeListLength];
 uint8_t gListFabricScoped_fabricSensitiveInt8uList[kAttributeListLength][kFabricSensitiveIntListLength];
 size_t gListFabricScopedAttributeLen = 0;
 char gListFabricScoped_fabricSensitiveCharBuf[kAttributeListLength][kFabricSensitiveCharLength];
@@ -433,7 +433,7 @@
     }
     if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem)
     {
-        chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType entry;
+        chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType entry;
         ReturnErrorOnFailure(aDecoder.Decode(entry));
         size_t index = gListOperationalCertLen;
 
@@ -674,8 +674,8 @@
 
 } // namespace
 
-bool emberAfTestClusterClusterTestCallback(app::CommandHandler *, const app::ConcreteCommandPath & commandPath,
-                                           const Test::DecodableType & commandData)
+bool emberAfUnitTestingClusterTestCallback(app::CommandHandler *, const app::ConcreteCommandPath & commandPath,
+                                           const Clusters::UnitTesting::Commands::Test::DecodableType & commandData)
 {
     // Setup the test variables
     emAfLoadAttributeDefaults(commandPath.mEndpointId, true, MakeOptional(commandPath.mClusterId));
@@ -700,7 +700,7 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestSpecificCallback(CommandHandler * apCommandObj, const ConcreteCommandPath & commandPath,
+bool emberAfUnitTestingClusterTestSpecificCallback(CommandHandler * apCommandObj, const ConcreteCommandPath & commandPath,
                                                    const TestSpecific::DecodableType & commandData)
 {
     TestSpecificResponse::Type responseData;
@@ -709,13 +709,13 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestNotHandledCallback(CommandHandler *, const ConcreteCommandPath & commandPath,
+bool emberAfUnitTestingClusterTestNotHandledCallback(CommandHandler *, const ConcreteCommandPath & commandPath,
                                                      const TestNotHandled::DecodableType & commandData)
 {
     return false;
 }
 
-bool emberAfTestClusterClusterTestAddArgumentsCallback(CommandHandler * apCommandObj, const ConcreteCommandPath & commandPath,
+bool emberAfUnitTestingClusterTestAddArgumentsCallback(CommandHandler * apCommandObj, const ConcreteCommandPath & commandPath,
                                                        const TestAddArguments::DecodableType & commandData)
 {
     if (commandData.arg1 > UINT8_MAX - commandData.arg2)
@@ -737,21 +737,21 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestStructArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestStructArgumentRequestCallback(
     app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
     const Commands::TestStructArgumentRequest::DecodableType & commandData)
 {
     return SendBooleanResponse(commandObj, commandPath, commandData.arg1.b);
 }
 
-bool emberAfTestClusterClusterTestNestedStructArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestNestedStructArgumentRequestCallback(
     app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
     const Commands::TestNestedStructArgumentRequest::DecodableType & commandData)
 {
     return SendBooleanResponse(commandObj, commandPath, commandData.arg1.c.b);
 }
 
-bool emberAfTestClusterClusterTestListStructArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestListStructArgumentRequestCallback(
     app::CommandHandler * commandObj, app::ConcreteCommandPath const & commandPath,
     Commands::TestListStructArgumentRequest::DecodableType const & commandData)
 {
@@ -773,7 +773,7 @@
     return SendBooleanResponse(commandObj, commandPath, shouldReturnTrue);
 }
 
-bool emberAfTestClusterClusterTestEmitTestEventRequestCallback(
+bool emberAfUnitTestingClusterTestEmitTestEventRequestCallback(
     CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
     const Commands::TestEmitTestEventRequest::DecodableType & commandData)
 {
@@ -794,7 +794,7 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback(
+bool emberAfUnitTestingClusterTestEmitTestFabricScopedEventRequestCallback(
     CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
     const Commands::TestEmitTestFabricScopedEventRequest::DecodableType & commandData)
 {
@@ -810,7 +810,7 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestListInt8UArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestListInt8UArgumentRequestCallback(
     CommandHandler * commandObj, ConcreteCommandPath const & commandPath,
     Commands::TestListInt8UArgumentRequest::DecodableType const & commandData)
 {
@@ -832,7 +832,7 @@
     return SendBooleanResponse(commandObj, commandPath, shouldReturnTrue);
 }
 
-bool emberAfTestClusterClusterTestNestedStructListArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestNestedStructListArgumentRequestCallback(
     app::CommandHandler * commandObj, app::ConcreteCommandPath const & commandPath,
     Commands::TestNestedStructListArgumentRequest::DecodableType const & commandData)
 {
@@ -854,7 +854,7 @@
     return SendBooleanResponse(commandObj, commandPath, shouldReturnTrue);
 }
 
-bool emberAfTestClusterClusterTestListNestedStructListArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestListNestedStructListArgumentRequestCallback(
     app::CommandHandler * commandObj, app::ConcreteCommandPath const & commandPath,
     Commands::TestListNestedStructListArgumentRequest::DecodableType const & commandData)
 {
@@ -889,7 +889,7 @@
     return SendBooleanResponse(commandObj, commandPath, shouldReturnTrue);
 }
 
-bool emberAfTestClusterClusterTestListInt8UReverseRequestCallback(
+bool emberAfUnitTestingClusterTestListInt8UReverseRequestCallback(
     CommandHandler * commandObj, ConcreteCommandPath const & commandPath,
     Commands::TestListInt8UReverseRequest::DecodableType const & commandData)
 {
@@ -925,7 +925,7 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestEnumsRequestCallback(CommandHandler * commandObj, ConcreteCommandPath const & commandPath,
+bool emberAfUnitTestingClusterTestEnumsRequestCallback(CommandHandler * commandObj, ConcreteCommandPath const & commandPath,
                                                        TestEnumsRequest::DecodableType const & commandData)
 {
     TestEnumsResponse::Type response;
@@ -936,7 +936,7 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTestNullableOptionalRequestCallback(
+bool emberAfUnitTestingClusterTestNullableOptionalRequestCallback(
     CommandHandler * commandObj, ConcreteCommandPath const & commandPath,
     Commands::TestNullableOptionalRequest::DecodableType const & commandData)
 {
@@ -958,7 +958,7 @@
     return true;
 }
 
-bool emberAfTestClusterClusterSimpleStructEchoRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
+bool emberAfUnitTestingClusterSimpleStructEchoRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
                                                               const Commands::SimpleStructEchoRequest::DecodableType & commandData)
 {
     Commands::SimpleStructResponse::Type response;
@@ -975,14 +975,14 @@
     return true;
 }
 
-bool emberAfTestClusterClusterTimedInvokeRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
+bool emberAfUnitTestingClusterTimedInvokeRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
                                                          const Commands::TimedInvokeRequest::DecodableType & commandData)
 {
     commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success);
     return true;
 }
 
-bool emberAfTestClusterClusterTestSimpleOptionalArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestSimpleOptionalArgumentRequestCallback(
     CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
     const Commands::TestSimpleOptionalArgumentRequest::DecodableType & commandData)
 {
@@ -995,7 +995,7 @@
 // -----------------------------------------------------------------------------
 // Plugin initialization
 
-void MatterTestClusterPluginServerInitCallback(void)
+void MatterUnitTestingPluginServerInitCallback(void)
 {
     registerAttributeAccessOverride(&gAttrAccess);
 }
diff --git a/src/app/tests/TestBufferedReadCallback.cpp b/src/app/tests/TestBufferedReadCallback.cpp
index 6a2e7ad..bdd9885 100644
--- a/src/app/tests/TestBufferedReadCallback.cpp
+++ b/src/app/tests/TestBufferedReadCallback.cpp
@@ -116,10 +116,10 @@
     case ValidationInstruction::kSimpleAttributeA: {
         ChipLogProgress(DataManagement, "\t\t -- Validating A");
 
-        Clusters::TestCluster::Attributes::Int8u::TypeInfo::Type value;
+        Clusters::UnitTesting::Attributes::Int8u::TypeInfo::Type value;
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::Int8u::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::Int8u::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::NotList);
         NL_TEST_ASSERT(gSuite, DataModel::Decode(*apData, value) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(gSuite, value == mCurrentInstruction);
@@ -129,10 +129,10 @@
     case ValidationInstruction::kSimpleAttributeB: {
         ChipLogProgress(DataManagement, "\t\t -- Validating B");
 
-        Clusters::TestCluster::Attributes::Int32u::TypeInfo::Type value;
+        Clusters::UnitTesting::Attributes::Int32u::TypeInfo::Type value;
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::Int32u::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::Int32u::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::NotList);
         NL_TEST_ASSERT(gSuite, DataModel::Decode(*apData, value) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(gSuite, value == mCurrentInstruction);
@@ -142,12 +142,12 @@
     case ValidationInstruction::kListAttributeC_Empty: {
         ChipLogProgress(DataManagement, "\t\t -- Validating C[]");
 
-        Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::DecodableType value;
+        Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::DecodableType value;
         size_t len;
 
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::ListStructOctetString::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::ListStructOctetString::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll);
         NL_TEST_ASSERT(gSuite, DataModel::Decode(*apData, value) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(gSuite, value.ComputeSize(&len) == CHIP_NO_ERROR);
@@ -169,12 +169,12 @@
 
         ChipLogProgress(DataManagement, "\t\t -- Validating C[%" PRIu32 "]", expectedListLength);
 
-        Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::DecodableType value;
+        Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::DecodableType value;
         size_t len;
 
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::ListStructOctetString::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::ListStructOctetString::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll);
         NL_TEST_ASSERT(gSuite, DataModel::Decode(*apData, value) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(gSuite, value.ComputeSize(&len) == CHIP_NO_ERROR);
@@ -197,12 +197,12 @@
     case ValidationInstruction::kListAttributeD_Empty: {
         ChipLogProgress(DataManagement, "\t\t -- Validating D[]");
 
-        Clusters::TestCluster::Attributes::ListInt8u::TypeInfo::DecodableType value;
+        Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::DecodableType value;
         size_t len;
 
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::ListInt8u::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::ListInt8u::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll);
         NL_TEST_ASSERT(gSuite, DataModel::Decode(*apData, value) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(gSuite, value.ComputeSize(&len) == CHIP_NO_ERROR);
@@ -224,12 +224,12 @@
 
         ChipLogProgress(DataManagement, "\t\t -- Validating D[%" PRIu32 "]", expectedListLength);
 
-        Clusters::TestCluster::Attributes::ListInt8u::TypeInfo::DecodableType value;
+        Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::DecodableType value;
         size_t len;
 
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::ListInt8u::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::ListInt8u::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll);
         NL_TEST_ASSERT(gSuite, DataModel::Decode(*apData, value) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(gSuite, value.ComputeSize(&len) == CHIP_NO_ERROR);
@@ -253,8 +253,8 @@
         ChipLogProgress(DataManagement, "\t\t -- Validating C|e");
 
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::ListStructOctetString::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::ListStructOctetString::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll);
         NL_TEST_ASSERT(gSuite, aStatus.mStatus == Protocols::InteractionModel::Status::Failure);
         break;
@@ -264,8 +264,8 @@
         ChipLogProgress(DataManagement, "\t\t -- Validating D|e");
 
         NL_TEST_ASSERT(gSuite,
-                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::TestCluster::Id &&
-                           aPath.mAttributeId == Clusters::TestCluster::Attributes::ListInt8u::Id &&
+                       aPath.mEndpointId == 0 && aPath.mClusterId == Clusters::UnitTesting::Id &&
+                           aPath.mAttributeId == Clusters::UnitTesting::Attributes::ListInt8u::Id &&
                            aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll);
         NL_TEST_ASSERT(gSuite, aStatus.mStatus == Protocols::InteractionModel::Status::Failure);
 
@@ -297,7 +297,7 @@
 {
     System::PacketBufferHandle handle;
     System::PacketBufferTLVWriter writer;
-    ConcreteDataAttributePath path(0, Clusters::TestCluster::Id, 0);
+    ConcreteDataAttributePath path(0, Clusters::UnitTesting::Id, 0);
     System::PacketBufferTLVReader reader;
     ReadClient::Callback * callback = &mReadCallback;
     StatusIB status;
@@ -318,8 +318,8 @@
         case ValidationInstruction::kSimpleAttributeA: {
             ChipLogProgress(DataManagement, "\t -- Generating A");
 
-            Clusters::TestCluster::Attributes::Int8u::TypeInfo::Type value = index;
-            path.mAttributeId                                              = Clusters::TestCluster::Attributes::Int8u::Id;
+            Clusters::UnitTesting::Attributes::Int8u::TypeInfo::Type value = index;
+            path.mAttributeId                                              = Clusters::UnitTesting::Attributes::Int8u::Id;
             path.mListOp                                                   = ConcreteDataAttributePath::ListOperation::NotList;
             NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
             break;
@@ -328,8 +328,8 @@
         case ValidationInstruction::kSimpleAttributeB: {
             ChipLogProgress(DataManagement, "\t -- Generating B");
 
-            Clusters::TestCluster::Attributes::Int32u::TypeInfo::Type value = index;
-            path.mAttributeId                                               = Clusters::TestCluster::Attributes::Int32u::Id;
+            Clusters::UnitTesting::Attributes::Int32u::TypeInfo::Type value = index;
+            path.mAttributeId                                               = Clusters::UnitTesting::Attributes::Int32u::Id;
             path.mListOp                                                    = ConcreteDataAttributePath::ListOperation::NotList;
             NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
             break;
@@ -338,8 +338,8 @@
         case ValidationInstruction::kListAttributeC_Empty: {
             ChipLogProgress(DataManagement, "\t -- Generating C[]");
 
-            Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
-            path.mAttributeId = Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+            Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
+            path.mAttributeId = Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
             path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
             NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
             break;
@@ -348,8 +348,8 @@
         case ValidationInstruction::kListAttributeC_NotEmpty: {
             ChipLogProgress(DataManagement, "\t -- Generating C[2]");
 
-            Clusters::TestCluster::Structs::TestListStructOctet::Type listData[2];
-            Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value(listData);
+            Clusters::UnitTesting::Structs::TestListStructOctet::Type listData[2];
+            Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value(listData);
 
             uint8_t index2 = 0;
             for (auto & item : listData)
@@ -358,7 +358,7 @@
                 index2++;
             }
 
-            path.mAttributeId = Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+            path.mAttributeId = Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
             path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
 
             NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
@@ -368,8 +368,8 @@
         case ValidationInstruction::kListAttributeD_Empty: {
             ChipLogProgress(DataManagement, "\t -- Generating D[]");
 
-            Clusters::TestCluster::Attributes::ListInt8u::TypeInfo::Type value;
-            path.mAttributeId = Clusters::TestCluster::Attributes::ListInt8u::Id;
+            Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::Type value;
+            path.mAttributeId = Clusters::UnitTesting::Attributes::ListInt8u::Id;
             path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
             NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
             break;
@@ -379,7 +379,7 @@
             ChipLogProgress(DataManagement, "\t -- Generating D[2]");
 
             uint8_t listData[2];
-            Clusters::TestCluster::Attributes::ListInt8u::TypeInfo::Type value(listData);
+            Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::Type value(listData);
 
             uint8_t index2 = 0;
             for (auto & item : listData)
@@ -388,7 +388,7 @@
                 index2++;
             }
 
-            path.mAttributeId = Clusters::TestCluster::Attributes::ListInt8u::Id;
+            path.mAttributeId = Clusters::UnitTesting::Attributes::ListInt8u::Id;
             path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
 
             NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
@@ -398,7 +398,7 @@
         case ValidationInstruction::kListAttributeC_Error: {
             ChipLogProgress(DataManagement, "\t -- Generating C|e");
 
-            path.mAttributeId = Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+            path.mAttributeId = Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
             path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
             status.mStatus    = Protocols::InteractionModel::Status::Failure;
             hasData           = false;
@@ -409,7 +409,7 @@
         case ValidationInstruction::kListAttributeD_Error: {
             ChipLogProgress(DataManagement, "\t -- Generating D|e");
 
-            path.mAttributeId = Clusters::TestCluster::Attributes::ListInt8u::Id;
+            path.mAttributeId = Clusters::UnitTesting::Attributes::ListInt8u::Id;
             path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
             status.mStatus    = Protocols::InteractionModel::Status::Failure;
             hasData           = false;
@@ -419,12 +419,12 @@
 
         case ValidationInstruction::kListAttributeC_NotEmpty_Chunked: {
             hasData = false;
-            Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
+            Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
 
             {
                 ChipLogProgress(DataManagement, "\t -- Generating C[]");
 
-                path.mAttributeId = Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+                path.mAttributeId = Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
                 path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
                 NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
 
@@ -438,13 +438,13 @@
 
             for (int i = 0; i < 512; i++)
             {
-                Clusters::TestCluster::Structs::TestListStructOctet::Type listItem;
+                Clusters::UnitTesting::Structs::TestListStructOctet::Type listItem;
 
                 handle = System::PacketBufferHandle::New(1000);
                 writer.Init(std::move(handle), true);
                 status = StatusIB();
 
-                path.mAttributeId = Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+                path.mAttributeId = Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
                 path.mListOp      = ConcreteDataAttributePath::ListOperation::AppendItem;
 
                 listItem.member1 = (uint64_t) i;
@@ -462,12 +462,12 @@
 
         case ValidationInstruction::kListAttributeD_NotEmpty_Chunked: {
             hasData = false;
-            Clusters::TestCluster::Attributes::ListInt8u::TypeInfo::Type value;
+            Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::Type value;
 
             {
                 ChipLogProgress(DataManagement, "\t -- Generating D[]");
 
-                path.mAttributeId = Clusters::TestCluster::Attributes::ListInt8u::Id;
+                path.mAttributeId = Clusters::UnitTesting::Attributes::ListInt8u::Id;
                 path.mListOp      = ConcreteDataAttributePath::ListOperation::ReplaceAll;
                 NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
 
@@ -485,7 +485,7 @@
                 writer.Init(std::move(handle), true);
                 status = StatusIB();
 
-                path.mAttributeId = Clusters::TestCluster::Attributes::ListInt8u::Id;
+                path.mAttributeId = Clusters::UnitTesting::Attributes::ListInt8u::Id;
                 path.mListOp      = ConcreteDataAttributePath::ListOperation::AppendItem;
 
                 NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), (uint8_t)(i)) == CHIP_NO_ERROR);
diff --git a/src/app/tests/TestClusterStateCache.cpp b/src/app/tests/TestClusterStateCache.cpp
index 93c7550..d2b85fa 100644
--- a/src/app/tests/TestClusterStateCache.cpp
+++ b/src/app/tests/TestClusterStateCache.cpp
@@ -82,19 +82,19 @@
         switch (mAttributeType)
         {
         case kAttributeA:
-            return Clusters::TestCluster::Attributes::Int16u::Id;
+            return Clusters::UnitTesting::Attributes::Int16u::Id;
             break;
 
         case kAttributeB:
-            return Clusters::TestCluster::Attributes::OctetString::Id;
+            return Clusters::UnitTesting::Attributes::OctetString::Id;
             break;
 
         case kAttributeC:
-            return Clusters::TestCluster::Attributes::StructAttr::Id;
+            return Clusters::UnitTesting::Attributes::StructAttr::Id;
             break;
 
         default:
-            return Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+            return Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
             break;
         }
     }
@@ -184,7 +184,7 @@
     uint8_t index = 0;
     for (auto & instruction : mInstructionList)
     {
-        ConcreteDataAttributePath path(instruction.mEndpointId, Clusters::TestCluster::Id, 0);
+        ConcreteDataAttributePath path(instruction.mEndpointId, Clusters::UnitTesting::Id, 0);
         Platform::ScopedMemoryBufferWithSize<uint8_t> handle;
         handle.Calloc(3000);
         TLV::ScopedBufferTLVWriter writer(std::move(handle), 3000);
@@ -202,7 +202,7 @@
             case AttributeInstruction::kAttributeA: {
                 ChipLogProgress(DataManagement, "\t -- Generating A");
 
-                Clusters::TestCluster::Attributes::Int16u::TypeInfo::Type value = instruction.mInstructionId;
+                Clusters::UnitTesting::Attributes::Int16u::TypeInfo::Type value = instruction.mInstructionId;
                 NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
                 break;
             }
@@ -210,7 +210,7 @@
             case AttributeInstruction::kAttributeB: {
                 ChipLogProgress(DataManagement, "\t -- Generating B");
 
-                Clusters::TestCluster::Attributes::OctetString::TypeInfo::Type value;
+                Clusters::UnitTesting::Attributes::OctetString::TypeInfo::Type value;
                 uint8_t buf[] = { 'h', 'e', 'l', 'l', 'o' };
                 value         = buf;
 
@@ -221,7 +221,7 @@
             case AttributeInstruction::kAttributeC: {
                 ChipLogProgress(DataManagement, "\t -- Generating C");
 
-                Clusters::TestCluster::Attributes::StructAttr::TypeInfo::Type value;
+                Clusters::UnitTesting::Attributes::StructAttr::TypeInfo::Type value;
                 value.a = instruction.mInstructionId;
                 value.b = true;
                 NL_TEST_ASSERT(gSuite, DataModel::Encode(writer, TLV::AnonymousTag(), value) == CHIP_NO_ERROR);
@@ -232,14 +232,14 @@
                 ChipLogProgress(DataManagement, "\t -- Generating D");
 
                 // buf[200] is 1.6k
-                Clusters::TestCluster::Structs::TestListStructOctet::Type buf[200];
+                Clusters::UnitTesting::Structs::TestListStructOctet::Type buf[200];
 
                 for (auto & i : buf)
                 {
                     i.member1 = instruction.mInstructionId;
                 }
 
-                Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
+                Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
                 path.mListOp = ConcreteDataAttributePath::ListOperation::ReplaceAll;
 
                 value = buf;
@@ -278,7 +278,7 @@
 public:
     CacheValidator(AttributeInstructionListType & instructionList, ForwardedDataCallbackValidator & dataCallbackValidator);
 
-    Clusters::TestCluster::Attributes::TypeInfo::DecodableType clusterValue;
+    Clusters::UnitTesting::Attributes::TypeInfo::DecodableType clusterValue;
 
 private:
     void OnDone(ReadClient *) override {}
@@ -316,8 +316,8 @@
         case AttributeInstruction::kAttributeA: {
             ChipLogProgress(DataManagement, "\t\t -- Validating A");
 
-            Clusters::TestCluster::Attributes::Int16u::TypeInfo::DecodableType v = 0;
-            err = cache->Get<Clusters::TestCluster::Attributes::Int16u::TypeInfo>(path, v);
+            Clusters::UnitTesting::Attributes::Int16u::TypeInfo::DecodableType v = 0;
+            err = cache->Get<Clusters::UnitTesting::Attributes::Int16u::TypeInfo>(path, v);
             if (err == CHIP_ERROR_IM_STATUS_CODE_RECEIVED)
             {
                 gotStatus = true;
@@ -335,8 +335,8 @@
         case AttributeInstruction::kAttributeB: {
             ChipLogProgress(DataManagement, "\t\t -- Validating B");
 
-            Clusters::TestCluster::Attributes::OctetString::TypeInfo::DecodableType v;
-            err = cache->Get<Clusters::TestCluster::Attributes::OctetString::TypeInfo>(path, v);
+            Clusters::UnitTesting::Attributes::OctetString::TypeInfo::DecodableType v;
+            err = cache->Get<Clusters::UnitTesting::Attributes::OctetString::TypeInfo>(path, v);
             if (err == CHIP_ERROR_IM_STATUS_CODE_RECEIVED)
             {
                 gotStatus = true;
@@ -354,8 +354,8 @@
         case AttributeInstruction::kAttributeC: {
             ChipLogProgress(DataManagement, "\t\t -- Validating C");
 
-            Clusters::TestCluster::Attributes::StructAttr::TypeInfo::DecodableType v;
-            err = cache->Get<Clusters::TestCluster::Attributes::StructAttr::TypeInfo>(path, v);
+            Clusters::UnitTesting::Attributes::StructAttr::TypeInfo::DecodableType v;
+            err = cache->Get<Clusters::UnitTesting::Attributes::StructAttr::TypeInfo>(path, v);
             if (err == CHIP_ERROR_IM_STATUS_CODE_RECEIVED)
             {
                 gotStatus = true;
@@ -373,8 +373,8 @@
         case AttributeInstruction::kAttributeD: {
             ChipLogProgress(DataManagement, "\t\t -- Validating D");
 
-            Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::DecodableType v;
-            err = cache->Get<Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo>(path, v);
+            Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::DecodableType v;
+            err = cache->Get<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(path, v);
             if (err == CHIP_ERROR_IM_STATUS_CODE_RECEIVED)
             {
                 gotStatus = true;
@@ -452,7 +452,7 @@
 
             auto status = statusList.front();
             NL_TEST_ASSERT(gSuite, status.mPath.mEndpointId == instruction.mEndpointId);
-            NL_TEST_ASSERT(gSuite, status.mPath.mClusterId == Clusters::TestCluster::Id);
+            NL_TEST_ASSERT(gSuite, status.mPath.mClusterId == Clusters::UnitTesting::Id);
             NL_TEST_ASSERT(gSuite, status.mPath.mAttributeId == instruction.GetAttributeId());
             NL_TEST_ASSERT(gSuite, status.mStatus.mStatus == Protocols::InteractionModel::Status::Failure);
         }
@@ -473,7 +473,7 @@
         for (auto & instruction : mInstructionSet)
         {
             if (instruction.mEndpointId == path.mEndpointId && instruction.GetAttributeId() == path.mAttributeId &&
-                path.mClusterId == Clusters::TestCluster::Id)
+                path.mClusterId == Clusters::UnitTesting::Id)
             {
 
                 //
@@ -532,8 +532,8 @@
         mInstructionSet.erase(instruction);
         mInstructionSet.insert(instruction);
         mExpectedAttributes.insert(
-            ConcreteAttributePath(instruction.mEndpointId, Clusters::TestCluster::Id, instruction.GetAttributeId()));
-        mExpectedClusters.insert(std::make_tuple(instruction.mEndpointId, Clusters::TestCluster::Id));
+            ConcreteAttributePath(instruction.mEndpointId, Clusters::UnitTesting::Id, instruction.GetAttributeId()));
+        mExpectedClusters.insert(std::make_tuple(instruction.mEndpointId, Clusters::UnitTesting::Id));
         mExpectedEndpoints.insert(instruction.mEndpointId);
     }
 }
diff --git a/src/app/tests/TestDataModelSerialization.cpp b/src/app/tests/TestDataModelSerialization.cpp
index 3c922f3..9756f7b 100644
--- a/src/app/tests/TestDataModelSerialization.cpp
+++ b/src/app/tests/TestDataModelSerialization.cpp
@@ -173,18 +173,18 @@
     // Encode
     //
     {
-        TestCluster::Structs::SimpleStruct::Type t;
+        Clusters::UnitTesting::Structs::SimpleStruct::Type t;
         uint8_t buf[4]  = { 0, 1, 2, 3 };
         char strbuf[10] = "chip";
 
         t.a = 20;
         t.b = true;
-        t.c = TestCluster::SimpleEnum::kValueA;
+        t.c = Clusters::UnitTesting::SimpleEnum::kValueA;
         t.d = buf;
 
         t.e = Span<char>{ strbuf, strlen(strbuf) };
 
-        t.f.Set(TestCluster::SimpleBitmap::kValueC);
+        t.f.Set(Clusters::UnitTesting::SimpleBitmap::kValueC);
 
         err = DataModel::Encode(_this->mWriter, TLV::AnonymousTag(), t);
         NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
@@ -199,7 +199,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::SimpleStruct::Type t;
+        Clusters::UnitTesting::Structs::SimpleStruct::Type t;
 
         _this->SetupReader();
 
@@ -208,7 +208,7 @@
 
         NL_TEST_ASSERT(apSuite, t.a == 20);
         NL_TEST_ASSERT(apSuite, t.b == true);
-        NL_TEST_ASSERT(apSuite, t.c == TestCluster::SimpleEnum::kValueA);
+        NL_TEST_ASSERT(apSuite, t.c == Clusters::UnitTesting::SimpleEnum::kValueA);
 
         NL_TEST_ASSERT(apSuite, t.d.size() == 4);
 
@@ -218,7 +218,7 @@
         }
 
         NL_TEST_ASSERT(apSuite, StringMatches(t.e, "chip"));
-        NL_TEST_ASSERT(apSuite, t.f.HasOnly(TestCluster::SimpleBitmap::kValueC));
+        NL_TEST_ASSERT(apSuite, t.f.HasOnly(Clusters::UnitTesting::SimpleBitmap::kValueC));
     }
 }
 
@@ -235,18 +235,18 @@
     // Encode
     //
     {
-        TestCluster::Structs::SimpleStruct::Type t;
+        Clusters::UnitTesting::Structs::SimpleStruct::Type t;
         uint8_t buf[4]  = { 0, 1, 2, 3 };
         char strbuf[10] = "chip";
 
         t.a = 20;
         t.b = true;
-        t.c = static_cast<TestCluster::SimpleEnum>(10);
+        t.c = static_cast<Clusters::UnitTesting::SimpleEnum>(10);
         t.d = buf;
 
         t.e = Span<char>{ strbuf, strlen(strbuf) };
 
-        t.f.Set(TestCluster::SimpleBitmap::kValueC);
+        t.f.Set(Clusters::UnitTesting::SimpleBitmap::kValueC);
 
         err = DataModel::Encode(_this->mWriter, TLV::AnonymousTag(), t);
         NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
@@ -261,7 +261,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::SimpleStruct::Type t;
+        Clusters::UnitTesting::Structs::SimpleStruct::Type t;
 
         _this->SetupReader();
 
@@ -283,7 +283,7 @@
     // Encode
     //
     {
-        TestCluster::Structs::NestedStruct::Type t;
+        Clusters::UnitTesting::Structs::NestedStruct::Type t;
         uint8_t buf[4]  = { 0, 1, 2, 3 };
         char strbuf[10] = "chip";
 
@@ -291,7 +291,7 @@
         t.b   = true;
         t.c.a = 11;
         t.c.b = true;
-        t.c.c = TestCluster::SimpleEnum::kValueB;
+        t.c.c = Clusters::UnitTesting::SimpleEnum::kValueB;
         t.c.d = buf;
 
         t.c.e = Span<char>{ strbuf, strlen(strbuf) };
@@ -309,7 +309,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::NestedStruct::DecodableType t;
+        Clusters::UnitTesting::Structs::NestedStruct::DecodableType t;
 
         _this->SetupReader();
 
@@ -320,7 +320,7 @@
         NL_TEST_ASSERT(apSuite, t.b == true);
         NL_TEST_ASSERT(apSuite, t.c.a == 11);
         NL_TEST_ASSERT(apSuite, t.c.b == true);
-        NL_TEST_ASSERT(apSuite, t.c.c == TestCluster::SimpleEnum::kValueB);
+        NL_TEST_ASSERT(apSuite, t.c.c == Clusters::UnitTesting::SimpleEnum::kValueB);
 
         NL_TEST_ASSERT(apSuite, t.c.d.size() == 4);
 
@@ -346,11 +346,11 @@
     // Encode
     //
     {
-        TestCluster::Structs::NestedStructList::Type t;
+        Clusters::UnitTesting::Structs::NestedStructList::Type t;
         uint8_t buf[4]     = { 0, 1, 2, 3 };
         uint32_t intBuf[4] = { 10000, 10001, 10002, 10003 };
         char strbuf[10]    = "chip";
-        TestCluster::Structs::SimpleStruct::Type structList[4];
+        Clusters::UnitTesting::Structs::SimpleStruct::Type structList[4];
         uint8_t i = 0;
         ByteSpan spanList[4];
 
@@ -358,7 +358,7 @@
         t.b   = true;
         t.c.a = 11;
         t.c.b = true;
-        t.c.c = TestCluster::SimpleEnum::kValueB;
+        t.c.c = Clusters::UnitTesting::SimpleEnum::kValueB;
         t.c.d = buf;
         t.e   = intBuf;
 
@@ -394,7 +394,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::NestedStructList::DecodableType t;
+        Clusters::UnitTesting::Structs::NestedStructList::DecodableType t;
         int i;
 
         _this->SetupReader();
@@ -406,7 +406,7 @@
         NL_TEST_ASSERT(apSuite, t.b == true);
         NL_TEST_ASSERT(apSuite, t.c.a == 11);
         NL_TEST_ASSERT(apSuite, t.c.b == true);
-        NL_TEST_ASSERT(apSuite, t.c.c == TestCluster::SimpleEnum::kValueB);
+        NL_TEST_ASSERT(apSuite, t.c.c == Clusters::UnitTesting::SimpleEnum::kValueB);
 
         NL_TEST_ASSERT(apSuite, StringMatches(t.c.e, "chip"));
 
@@ -491,9 +491,9 @@
     // Encode
     //
     {
-        TestCluster::Structs::DoubleNestedStructList::Type t;
-        TestCluster::Structs::NestedStructList::Type n[4];
-        TestCluster::Structs::SimpleStruct::Type structList[4];
+        Clusters::UnitTesting::Structs::DoubleNestedStructList::Type t;
+        Clusters::UnitTesting::Structs::NestedStructList::Type n[4];
+        Clusters::UnitTesting::Structs::SimpleStruct::Type structList[4];
         uint8_t i;
 
         t.a = n;
@@ -523,7 +523,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::DoubleNestedStructList::DecodableType t;
+        Clusters::UnitTesting::Structs::DoubleNestedStructList::DecodableType t;
 
         _this->SetupReader();
 
@@ -568,25 +568,25 @@
     // Encode
     //
     {
-        TestCluster::Structs::SimpleStruct::Type t;
+        Clusters::UnitTesting::Structs::SimpleStruct::Type t;
         uint8_t buf[4]  = { 0, 1, 2, 3 };
         char strbuf[10] = "chip";
 
         t.a = 20;
         t.b = true;
-        t.c = TestCluster::SimpleEnum::kValueA;
+        t.c = Clusters::UnitTesting::SimpleEnum::kValueA;
         t.d = buf;
 
         t.e = Span<char>{ strbuf, strlen(strbuf) };
 
         // Encode every field manually except a.
         {
-            err =
-                EncodeStruct(_this->mWriter, TLV::AnonymousTag(),
-                             MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kB)), t.b),
-                             MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kC)), t.c),
-                             MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kD)), t.d),
-                             MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kE)), t.e));
+            err = EncodeStruct(
+                _this->mWriter, TLV::AnonymousTag(),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kB)), t.b),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kC)), t.c),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kD)), t.d),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kE)), t.e));
             NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
         }
 
@@ -600,7 +600,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::SimpleStruct::DecodableType t;
+        Clusters::UnitTesting::Structs::SimpleStruct::DecodableType t;
 
         _this->SetupReader();
 
@@ -614,7 +614,7 @@
         NL_TEST_ASSERT(apSuite, t.a == 150);
 
         NL_TEST_ASSERT(apSuite, t.b == true);
-        NL_TEST_ASSERT(apSuite, t.c == TestCluster::SimpleEnum::kValueA);
+        NL_TEST_ASSERT(apSuite, t.c == Clusters::UnitTesting::SimpleEnum::kValueA);
 
         NL_TEST_ASSERT(apSuite, t.d.size() == 4);
 
@@ -639,13 +639,13 @@
     // Encode
     //
     {
-        TestCluster::Structs::SimpleStruct::Type t;
+        Clusters::UnitTesting::Structs::SimpleStruct::Type t;
         uint8_t buf[4]  = { 0, 1, 2, 3 };
         char strbuf[10] = "chip";
 
         t.a = 20;
         t.b = true;
-        t.c = TestCluster::SimpleEnum::kValueA;
+        t.c = Clusters::UnitTesting::SimpleEnum::kValueA;
         t.d = buf;
 
         t.e = Span<char>{ strbuf, strlen(strbuf) };
@@ -654,12 +654,13 @@
         {
             err = EncodeStruct(
                 _this->mWriter, TLV::AnonymousTag(),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kA)), t.a),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kB)), t.b),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kC)), t.c),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kD)), t.d),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kE)), t.e),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kE) + 1), t.a));
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kA)), t.a),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kB)), t.b),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kC)), t.c),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kD)), t.d),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kE)), t.e),
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kE) + 1),
+                                 t.a));
             NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
         }
 
@@ -673,7 +674,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::SimpleStruct::DecodableType t;
+        Clusters::UnitTesting::Structs::SimpleStruct::DecodableType t;
 
         _this->SetupReader();
 
@@ -683,7 +684,7 @@
 
         NL_TEST_ASSERT(apSuite, t.a == 20);
         NL_TEST_ASSERT(apSuite, t.b == true);
-        NL_TEST_ASSERT(apSuite, t.c == TestCluster::SimpleEnum::kValueA);
+        NL_TEST_ASSERT(apSuite, t.c == Clusters::UnitTesting::SimpleEnum::kValueA);
 
         NL_TEST_ASSERT(apSuite, t.d.size() == 4);
 
@@ -712,13 +713,13 @@
         // Encode
         //
         {
-            TestCluster::Structs::SimpleStruct::Type t;
+            Clusters::UnitTesting::Structs::SimpleStruct::Type t;
             uint8_t buf[4]  = { 0, 1, 2, 3 };
             char strbuf[10] = "chip";
 
             t.a = 20;
             t.b = true;
-            t.c = TestCluster::SimpleEnum::kValueA;
+            t.c = Clusters::UnitTesting::SimpleEnum::kValueA;
             t.d = buf;
 
             t.e = Span<char>{ strbuf, strlen(strbuf) };
@@ -727,11 +728,12 @@
             {
                 err = EncodeStruct(
                     _this->mWriter, TLV::AnonymousTag(),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kA)), t.b),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kB)), t.b),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kC)), t.c),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kD)), t.d),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kE)), t.e));
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kA)), t.b),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kB)), t.b),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kC)), t.c),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kD)), t.d),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kE)),
+                                     t.e));
                 NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
             }
 
@@ -745,7 +747,7 @@
         // Decode
         //
         {
-            TestCluster::Structs::SimpleStruct::DecodableType t;
+            Clusters::UnitTesting::Structs::SimpleStruct::DecodableType t;
 
             _this->SetupReader();
 
@@ -764,13 +766,13 @@
         // Encode
         //
         {
-            TestCluster::Structs::SimpleStruct::Type t;
+            Clusters::UnitTesting::Structs::SimpleStruct::Type t;
             uint8_t buf[4]  = { 0, 1, 2, 3 };
             char strbuf[10] = "chip";
 
             t.a = 20;
             t.b = true;
-            t.c = TestCluster::SimpleEnum::kValueA;
+            t.c = Clusters::UnitTesting::SimpleEnum::kValueA;
             t.d = buf;
 
             t.e = Span<char>{ strbuf, strlen(strbuf) };
@@ -779,11 +781,12 @@
             {
                 err = EncodeStruct(
                     _this->mWriter, TLV::AnonymousTag(),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kA)), t.a),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kB)), t.b),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kC)), t.c),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kD)), t.e),
-                    MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::SimpleStruct::Fields::kE)), t.e));
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kA)), t.a),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kB)), t.b),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kC)), t.c),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kD)), t.e),
+                    MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::SimpleStruct::Fields::kE)),
+                                     t.e));
                 NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
             }
 
@@ -797,7 +800,7 @@
         // Decode
         //
         {
-            TestCluster::Structs::SimpleStruct::DecodableType t;
+            Clusters::UnitTesting::Structs::SimpleStruct::DecodableType t;
 
             _this->SetupReader();
 
@@ -819,7 +822,7 @@
     // Encode
     //
     {
-        TestCluster::Structs::NestedStructList::Type t;
+        Clusters::UnitTesting::Structs::NestedStructList::Type t;
         uint32_t intBuf[4] = { 10000, 10001, 10002, 10003 };
 
         t.e = intBuf;
@@ -828,7 +831,8 @@
         {
             err = EncodeStruct(
                 _this->mWriter, TLV::AnonymousTag(),
-                MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::Structs::NestedStructList::Fields::kD)), t.e));
+                MakeTagValuePair(TLV::ContextTag(to_underlying(Clusters::UnitTesting::Structs::NestedStructList::Fields::kD)),
+                                 t.e));
             NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
         }
 
@@ -842,7 +846,7 @@
     // Decode
     //
     {
-        TestCluster::Structs::NestedStructList::DecodableType t;
+        Clusters::UnitTesting::Structs::NestedStructList::DecodableType t;
 
         _this->SetupReader();
 
@@ -863,7 +867,8 @@
 }
 
 namespace {
-bool SimpleStructsEqual(const TestCluster::Structs::SimpleStruct::Type & s1, const TestCluster::Structs::SimpleStruct::Type & s2)
+bool SimpleStructsEqual(const Clusters::UnitTesting::Structs::SimpleStruct::Type & s1,
+                        const Clusters::UnitTesting::Structs::SimpleStruct::Type & s2)
 {
     return s1.a == s2.a && s1.b == s2.b && s1.c == s2.c && s1.d.data_equal(s2.d) && s1.e.data_equal(s2.e) && s1.f == s2.f;
 }
@@ -914,16 +919,17 @@
 
     const char structStr[]      = "something";
     const uint8_t structBytes[] = { 1, 8, 17 };
-    TestCluster::Structs::SimpleStruct::Type myStruct;
+    Clusters::UnitTesting::Structs::SimpleStruct::Type myStruct;
     myStruct.a = 17;
     myStruct.b = true;
-    myStruct.c = TestCluster::SimpleEnum::kValueB;
+    myStruct.c = Clusters::UnitTesting::SimpleEnum::kValueB;
     myStruct.d = ByteSpan(structBytes);
     myStruct.e = CharSpan::fromCharString(structStr);
-    myStruct.f = TestCluster::SimpleBitmap(2);
+    myStruct.f = Clusters::UnitTesting::SimpleBitmap(2);
 
-    TestCluster::SimpleEnum enumListVals[] = { TestCluster::SimpleEnum::kValueA, TestCluster::SimpleEnum::kValueC };
-    DataModel::List<TestCluster::SimpleEnum> enumList(enumListVals);
+    Clusters::UnitTesting::SimpleEnum enumListVals[] = { Clusters::UnitTesting::SimpleEnum::kValueA,
+                                                         Clusters::UnitTesting::SimpleEnum::kValueC };
+    DataModel::List<Clusters::UnitTesting::SimpleEnum> enumList(enumListVals);
 
     // Encode
     {
@@ -1076,15 +1082,15 @@
 
 void TestDataModelSerialization::NullablesOptionalsStruct(nlTestSuite * apSuite, void * apContext)
 {
-    using EncType = TestCluster::Structs::NullablesAndOptionalsStruct::Type;
-    using DecType = TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType;
+    using EncType = Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type;
+    using DecType = Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType;
     NullablesOptionalsEncodeDecodeCheck<EncType, DecType>(apSuite, apContext);
 }
 
 void TestDataModelSerialization::NullablesOptionalsCommand(nlTestSuite * apSuite, void * apContext)
 {
-    using EncType = TestCluster::Commands::TestComplexNullableOptionalRequest::Type;
-    using DecType = TestCluster::Commands::TestComplexNullableOptionalRequest::DecodableType;
+    using EncType = Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Type;
+    using DecType = Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::DecodableType;
     NullablesOptionalsEncodeDecodeCheck<EncType, DecType>(apSuite, apContext);
 }
 
diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp
index 6437b25..d984b0c 100644
--- a/src/app/tests/TestWriteInteraction.cpp
+++ b/src/app/tests/TestWriteInteraction.cpp
@@ -382,7 +382,7 @@
     const uint8_t byteSpanData[] = { 0xde, 0xad, 0xbe, 0xef };
     const char charSpanData[]    = "a simple test string";
 
-    app::Clusters::TestCluster::Structs::SimpleStruct::Type dataTx;
+    app::Clusters::UnitTesting::Structs::SimpleStruct::Type dataTx;
     dataTx.a = 12;
     dataTx.b = true;
     dataTx.d = chip::ByteSpan(byteSpanData);
@@ -402,7 +402,7 @@
     NL_TEST_ASSERT(apSuite, callback.mOnSuccessCalled == 1);
 
     {
-        app::Clusters::TestCluster::Structs::SimpleStruct::Type dataRx;
+        app::Clusters::UnitTesting::Structs::SimpleStruct::Type dataRx;
         TLV::TLVReader reader;
         reader.Init(attributeDataTLV, attributeDataTLVLen);
         reader.Next();
@@ -447,7 +447,7 @@
     attributePathParams.mClusterId   = 3;
     attributePathParams.mAttributeId = 4;
 
-    DataModel::Nullable<app::Clusters::TestCluster::Structs::SimpleStruct::Type> dataTx;
+    DataModel::Nullable<app::Clusters::UnitTesting::Structs::SimpleStruct::Type> dataTx;
 
     Optional<DataVersion> version(kAcceptedDataVersion);
 
@@ -496,10 +496,10 @@
     attributePathParams.mClusterId   = 3;
     attributePathParams.mAttributeId = 4;
 
-    app::Clusters::TestCluster::Structs::SimpleStruct::Type dataTxValue;
+    app::Clusters::UnitTesting::Structs::SimpleStruct::Type dataTxValue;
     dataTxValue.a = 12;
     dataTxValue.b = true;
-    DataModel::Nullable<app::Clusters::TestCluster::Structs::SimpleStruct::Type> dataTx;
+    DataModel::Nullable<app::Clusters::UnitTesting::Structs::SimpleStruct::Type> dataTx;
     dataTx.SetNonNull(dataTxValue);
     Optional<DataVersion> version(kRejectedDataVersion);
     writeClient.EncodeAttribute(attributePathParams, dataTx, version);
diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml
index e1ddaba..f84068e 100644
--- a/src/app/tests/suites/TestCluster.yaml
+++ b/src/app/tests/suites/TestCluster.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/tests/suites/TestClusterComplexTypes.yaml b/src/app/tests/suites/TestClusterComplexTypes.yaml
index 9b88113..2044bf8 100644
--- a/src/app/tests/suites/TestClusterComplexTypes.yaml
+++ b/src/app/tests/suites/TestClusterComplexTypes.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/tests/suites/TestClusterMultiFabric.yaml b/src/app/tests/suites/TestClusterMultiFabric.yaml
index 6a1bef0..448fef8 100644
--- a/src/app/tests/suites/TestClusterMultiFabric.yaml
+++ b/src/app/tests/suites/TestClusterMultiFabric.yaml
@@ -65,7 +65,7 @@
 
     - label: "Write TestFabricScoped list from alpha"
       identity: "alpha"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "writeAttribute"
       attribute: "list_fabric_scoped"
       arguments:
@@ -118,7 +118,7 @@
 
     - label: "Write TestFabricScoped list from beta"
       identity: "beta"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "writeAttribute"
       attribute: "list_fabric_scoped"
       arguments:
@@ -168,7 +168,7 @@
 
     - label: "Read back TestFabricScoped list from alpha"
       identity: "alpha"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "readAttribute"
       attribute: "list_fabric_scoped"
       response:
@@ -218,7 +218,7 @@
 
     - label: "Read back TestFabricScoped list from beta"
       identity: "beta"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "readAttribute"
       attribute: "list_fabric_scoped"
       response:
@@ -268,7 +268,7 @@
 
     - label: "Read back TestFabricScoped list from alpha (fabricFiltered false)"
       identity: "alpha"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "readAttribute"
       fabricFiltered: false
       attribute: "list_fabric_scoped"
@@ -366,7 +366,7 @@
 
     - label: "Read back TestFabricScoped list from beta (fabricFiltered false)"
       identity: "beta"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "readAttribute"
       fabricFiltered: false
       attribute: "list_fabric_scoped"
@@ -453,7 +453,7 @@
 
     - label: "Write smaller TestFabricScoped list from alpha (again)"
       identity: "alpha"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "writeAttribute"
       attribute: "list_fabric_scoped"
       arguments:
@@ -483,7 +483,7 @@
 
     - label: "Read back unchanged TestFabricScoped list from beta (again)"
       identity: "beta"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "readAttribute"
       attribute: "list_fabric_scoped"
       response:
@@ -533,7 +533,7 @@
 
     - label: "Read back TestFabricScoped list from alpha (again)"
       identity: "alpha"
-      cluster: "Test Cluster"
+      cluster: "Unit Testing"
       command: "readAttribute"
       attribute: "list_fabric_scoped"
       response:
diff --git a/src/app/tests/suites/TestConfigVariables.yaml b/src/app/tests/suites/TestConfigVariables.yaml
index eff8a39..b8cc8de 100644
--- a/src/app/tests/suites/TestConfigVariables.yaml
+++ b/src/app/tests/suites/TestConfigVariables.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
     arg1:
         type: int8u
diff --git a/src/app/tests/suites/TestConstraints.yaml b/src/app/tests/suites/TestConstraints.yaml
index 312e7b8..f96c8d1 100644
--- a/src/app/tests/suites/TestConstraints.yaml
+++ b/src/app/tests/suites/TestConstraints.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/tests/suites/TestDelayCommands.yaml b/src/app/tests/suites/TestDelayCommands.yaml
index 8e89bdf..ee23990 100644
--- a/src/app/tests/suites/TestDelayCommands.yaml
+++ b/src/app/tests/suites/TestDelayCommands.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/tests/suites/TestEvents.yaml b/src/app/tests/suites/TestEvents.yaml
index 7c6592f..9fbdfb4 100644
--- a/src/app/tests/suites/TestEvents.yaml
+++ b/src/app/tests/suites/TestEvents.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/tests/suites/TestLogCommands.yaml b/src/app/tests/suites/TestLogCommands.yaml
index 8d9a1b6..c343b2e 100644
--- a/src/app/tests/suites/TestLogCommands.yaml
+++ b/src/app/tests/suites/TestLogCommands.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/tests/suites/TestSaveAs.yaml b/src/app/tests/suites/TestSaveAs.yaml
index 8913168..efafc4c 100644
--- a/src/app/tests/suites/TestSaveAs.yaml
+++ b/src/app/tests/suites/TestSaveAs.yaml
@@ -16,7 +16,7 @@
 
 config:
     nodeId: 0x12344321
-    cluster: "Test Cluster"
+    cluster: "Unit Testing"
     endpoint: 1
 
 tests:
diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
index da8acf5..1da90ce 100644
--- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
@@ -138,9 +138,9 @@
     
   <cluster>
     <domain>CHIP</domain>
-    <name>Test Cluster</name>
+    <name>Unit Testing</name>
     <code>0xFFF1FC05</code>
-    <define>TEST_CLUSTER</define>
+    <define>UNIT_TESTING_CLUSTER</define>
     <description>The Test Cluster is meant to validate the generated code</description>
     <!-- Base data types -->
     <attribute side="server" code="0x0000" define="BOOLEAN" type="BOOLEAN" writable="true" default="false" optional="false">boolean</attribute>
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index 971824a..625c15f 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -177,7 +177,7 @@
             "FeatureMap",
             "ThreadMetrics"
         ],
-        "Test Cluster": [
+        "Unit Testing": [
             "struct_attr",
             "nullable_struct",
             "general_error_boolean",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index da4c1d7..474ab92 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -171,7 +171,7 @@
             "FeatureMap",
             "ThreadMetrics"
         ],
-        "Test Cluster": [
+        "Unit Testing": [
             "struct_attr",
             "nullable_struct",
             "general_error_boolean",
diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn
index 9403f04..2596b11 100644
--- a/src/controller/data_model/BUILD.gn
+++ b/src/controller/data_model/BUILD.gn
@@ -163,8 +163,8 @@
       "jni/AccountLoginClient-InvokeSubscribeImpl.cpp",
       "jni/ElectricalMeasurementClient-ReadImpl.cpp",
       "jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp",
-      "jni/TestClusterClient-ReadImpl.cpp",
-      "jni/TestClusterClient-InvokeSubscribeImpl.cpp",
+      "jni/UnitTestingClient-ReadImpl.cpp",
+      "jni/UnitTestingClient-InvokeSubscribeImpl.cpp",
     ]
   }
 
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 628c92e..a2b3632 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -4088,7 +4088,7 @@
   readonly attribute int16u clusterRevision = 65533;
 }
 
-client cluster TestCluster = 4294048773 {
+client cluster UnitTesting = 4294048773 {
   enum SimpleEnum : ENUM8 {
     kUnspecified = 0;
     kValueA = 1;
@@ -4466,7 +4466,7 @@
   binding cluster ApplicationBasic;
   binding cluster AccountLogin;
   binding cluster ElectricalMeasurement;
-  binding cluster TestCluster;
+  binding cluster UnitTesting;
 }
 
 
diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap
index 5452100..73ce603 100644
--- a/src/controller/data_model/controller-clusters.zap
+++ b/src/controller/data_model/controller-clusters.zap
@@ -17763,7 +17763,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
@@ -17951,7 +17951,7 @@
           ]
         },
         {
-          "name": "Test Cluster",
+          "name": "Unit Testing",
           "code": 4294048773,
           "mfgCode": null,
           "define": "TEST_CLUSTER",
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index ca7686c..555e828 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -17089,8 +17089,8 @@
         }
         break;
     }
-    case app::Clusters::TestCluster::Id: {
-        using namespace app::Clusters::TestCluster;
+    case app::Clusters::UnitTesting::Id: {
+        using namespace app::Clusters::UnitTesting;
         switch (aPath.mAttributeId)
         {
         case Attributes::Boolean::Id: {
@@ -17561,18 +17561,18 @@
 
                 jclass testListStructOctetStructClass_1;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterTestListStructOctet",
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet",
                     testListStructOctetStructClass_1);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterTestListStructOctet");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet");
                     return nullptr;
                 }
                 jmethodID testListStructOctetStructCtor_1 =
                     env->GetMethodID(testListStructOctetStructClass_1, "<init>", "(Ljava/lang/Long;[B)V");
                 if (testListStructOctetStructCtor_1 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterTestListStructOctet constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor");
                     return nullptr;
                 }
 
@@ -17837,10 +17837,10 @@
 
                     jclass simpleStructStructClass_3;
                     err = chip::JniReferences::GetInstance().GetClassRef(
-                        env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_3);
+                        env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3);
                     if (err != CHIP_NO_ERROR)
                     {
-                        ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                        ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                         return nullptr;
                     }
                     jmethodID simpleStructStructCtor_3 =
@@ -17849,7 +17849,7 @@
                                          "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                     if (simpleStructStructCtor_3 == nullptr)
                     {
-                        ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                        ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                         return nullptr;
                     }
 
@@ -17922,10 +17922,10 @@
 
                     jclass simpleStructStructClass_3;
                     err = chip::JniReferences::GetInstance().GetClassRef(
-                        env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_3);
+                        env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3);
                     if (err != CHIP_NO_ERROR)
                     {
-                        ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                        ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                         return nullptr;
                     }
                     jmethodID simpleStructStructCtor_3 =
@@ -17934,7 +17934,7 @@
                                          "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                     if (simpleStructStructCtor_3 == nullptr)
                     {
-                        ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                        ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                         return nullptr;
                     }
 
@@ -18022,10 +18022,10 @@
 
                         jclass simpleStructStructClass_4;
                         err = chip::JniReferences::GetInstance().GetClassRef(
-                            env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_4);
+                            env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4);
                         if (err != CHIP_NO_ERROR)
                         {
-                            ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                            ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                             return nullptr;
                         }
                         jmethodID simpleStructStructCtor_4 =
@@ -18034,7 +18034,7 @@
                                              "lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                         if (simpleStructStructCtor_4 == nullptr)
                         {
-                            ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                            ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                             return nullptr;
                         }
 
@@ -18136,21 +18136,21 @@
 
                 jclass nullablesAndOptionalsStructStructClass_1;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterNullablesAndOptionalsStruct",
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct",
                     nullablesAndOptionalsStructStructClass_1);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterNullablesAndOptionalsStruct");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct");
                     return nullptr;
                 }
                 jmethodID nullablesAndOptionalsStructStructCtor_1 = env->GetMethodID(
                     nullablesAndOptionalsStructStructClass_1, "<init>",
                     "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/"
-                    "Optional;Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;Ljava/util/Optional;Ljava/util/"
+                    "Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/Optional;Ljava/util/"
                     "Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V");
                 if (nullablesAndOptionalsStructStructCtor_1 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterNullablesAndOptionalsStruct constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor");
                     return nullptr;
                 }
 
@@ -18228,10 +18228,10 @@
 
             jclass simpleStructStructClass_0;
             err = chip::JniReferences::GetInstance().GetClassRef(
-                env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_0);
+                env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0);
             if (err != CHIP_NO_ERROR)
             {
-                ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                 return nullptr;
             }
             jmethodID simpleStructStructCtor_0 =
@@ -18240,7 +18240,7 @@
                                  "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
             if (simpleStructStructCtor_0 == nullptr)
             {
-                ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                 return nullptr;
             }
 
@@ -18470,10 +18470,10 @@
 
                 jclass simpleStructStructClass_2;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_2);
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                     return nullptr;
                 }
                 jmethodID simpleStructStructCtor_2 =
@@ -18482,7 +18482,7 @@
                                      "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                 if (simpleStructStructCtor_2 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                     return nullptr;
                 }
 
@@ -18515,19 +18515,19 @@
 
                 jclass testFabricScopedStructClass_1;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterTestFabricScoped", testFabricScopedStructClass_1);
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterTestFabricScoped");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped");
                     return nullptr;
                 }
                 jmethodID testFabricScopedStructCtor_1 = env->GetMethodID(
                     testFabricScopedStructClass_1, "<init>",
                     "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/"
-                    "devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V");
+                    "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V");
                 if (testFabricScopedStructCtor_1 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterTestFabricScoped constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor");
                     return nullptr;
                 }
 
@@ -19268,10 +19268,10 @@
 
                 jclass simpleStructStructClass_1;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_1);
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                     return nullptr;
                 }
                 jmethodID simpleStructStructCtor_1 =
@@ -19280,7 +19280,7 @@
                                      "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                 if (simpleStructStructCtor_1 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                     return nullptr;
                 }
 
diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h
index f654294..2a1d813 100644
--- a/src/controller/java/zap-generated/CHIPCallbackTypes.h
+++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h
@@ -1774,192 +1774,192 @@
     void *, chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType);
 typedef void (*CHIPElectricalMeasurementClusterClusterRevisionAttributeCallbackType)(
     void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterTestSpecificResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterTestAddArgumentsResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterTestNullableOptionalResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterBooleanResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &);
-typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTestSpecificResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTestAddArgumentsResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTestListInt8UReverseResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTestEnumsResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTestNullableOptionalResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterBooleanResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterSimpleStructResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTestEmitTestEventResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType &);
 
-typedef void (*CHIPTestClusterClusterBooleanAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterBitmap8AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterBitmap16AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterBitmap32AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterBitmap64AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt8uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt16uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt24uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt32uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt40uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt48uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt56uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt64uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt8sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt16sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt24sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt32sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt40sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt48sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt56sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterInt64sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterEnum8AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterEnum16AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterFloatSingleAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterFloatDoubleAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterOctetStringAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterListInt8uAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::ListInt8u::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterListOctetStringAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::ListOctetString::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterListStructOctetStringAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterLongOctetStringAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterCharStringAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterLongCharStringAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterEpochUsAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterEpochSAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterVendorIdAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterListNullablesAndOptionalsStructAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterEnumAttrAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterStructAttrAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::StructAttr::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterRangeRestrictedInt8uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterRangeRestrictedInt8sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterRangeRestrictedInt16uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterRangeRestrictedInt16sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterListLongOctetStringAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::ListLongOctetString::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterListFabricScopedAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::ListFabricScoped::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterTimedWriteBooleanAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterGeneralErrorBooleanAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::GeneralErrorBoolean::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterClusterErrorBooleanAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::ClusterErrorBoolean::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterUnsupportedAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableBooleanAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableBitmap8AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableBitmap16AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableBitmap32AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableBitmap64AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt8uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt16uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt24uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt32uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt40uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt48uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt56uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt64uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt8sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt16sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt24sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt32sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt40sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt48sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt56sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableInt64sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableEnum8AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableEnum16AttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableFloatSingleAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableFloatDoubleAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableOctetStringAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableCharStringAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableEnumAttrAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableStructAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableStruct::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableRangeRestrictedInt8uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableRangeRestrictedInt8sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableRangeRestrictedInt16uAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterNullableRangeRestrictedInt16sAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterGeneratedCommandListAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::GeneratedCommandList::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterAcceptedCommandListAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::AcceptedCommandList::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterAttributeListAttributeCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Attributes::AttributeList::TypeInfo::DecodableType &);
-typedef void (*CHIPTestClusterClusterFeatureMapAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::FeatureMap::TypeInfo::DecodableArgType);
-typedef void (*CHIPTestClusterClusterClusterRevisionAttributeCallbackType)(
-    void *, chip::app::Clusters::TestCluster::Attributes::ClusterRevision::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterBooleanAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Boolean::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterBitmap8AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap8::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterBitmap16AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap16::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterBitmap32AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap32::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterBitmap64AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap64::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt8uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int8u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt16uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int16u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt24uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int24u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt32uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int32u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt40uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int40u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt48uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int48u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt56uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int56u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt64uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int64u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt8sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int8s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt16sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int16s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt24sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int24s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt32sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int32s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt40sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int40s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt48sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int48s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt56sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int56s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterInt64sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Int64s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterEnum8AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Enum8::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterEnum16AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Enum16::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterFloatSingleAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::FloatSingle::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterFloatDoubleAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::FloatDouble::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterOctetStringAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::OctetString::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterListInt8uAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterListOctetStringAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::ListOctetString::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterListStructOctetStringAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterLongOctetStringAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::LongOctetString::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterCharStringAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::CharString::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterLongCharStringAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::LongCharString::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterEpochUsAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::EpochUs::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterEpochSAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::EpochS::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterVendorIdAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::VendorId::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterListNullablesAndOptionalsStructAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterEnumAttrAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::EnumAttr::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterStructAttrAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::StructAttr::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterRangeRestrictedInt8uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterRangeRestrictedInt8sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterRangeRestrictedInt16uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterRangeRestrictedInt16sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterListLongOctetStringAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterListFabricScopedAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterTimedWriteBooleanAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterGeneralErrorBooleanAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterClusterErrorBooleanAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterUnsupportedAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::Unsupported::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableBooleanAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableBitmap8AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableBitmap16AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableBitmap32AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableBitmap64AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt8uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt16uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt24uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt32uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt40uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt48uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt56uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt64uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt8sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt16sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt24sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt32sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt40sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt48sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt56sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableInt64sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableEnum8AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableEnum16AttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableFloatSingleAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableFloatDoubleAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableOctetStringAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableCharStringAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableCharString::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableEnumAttrAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableStructAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableStruct::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt8uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt8sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt16uAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt16sAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterGeneratedCommandListAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::GeneratedCommandList::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterAcceptedCommandListAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::AcceptedCommandList::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterAttributeListAttributeCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Attributes::AttributeList::TypeInfo::DecodableType &);
+typedef void (*CHIPUnitTestingClusterFeatureMapAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::FeatureMap::TypeInfo::DecodableArgType);
+typedef void (*CHIPUnitTestingClusterClusterRevisionAttributeCallbackType)(
+    void *, chip::app::Clusters::UnitTesting::Attributes::ClusterRevision::TypeInfo::DecodableArgType);
diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
index 676bd63..8fa0e3d 100644
--- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
+++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
@@ -5151,12 +5151,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeBooleanAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Boolean::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5178,7 +5178,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5203,12 +5203,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeBitmap8Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap8::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5230,7 +5230,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5255,12 +5255,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeBitmap16Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap16::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5282,7 +5282,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5307,12 +5307,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeBitmap32Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap32::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5333,7 +5333,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5358,12 +5358,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeBitmap64Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap64::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5384,7 +5384,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5409,12 +5409,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt8uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int8u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5436,7 +5436,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5461,12 +5461,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt16uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int16u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5488,7 +5488,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5513,12 +5513,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt24uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int24u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5539,7 +5539,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5564,12 +5564,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt32uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int32u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5590,7 +5590,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5615,12 +5615,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt40uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int40u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5641,7 +5641,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5666,12 +5666,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt48uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int48u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5692,7 +5692,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5717,12 +5717,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt56uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int56u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5743,7 +5743,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5768,12 +5768,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt64uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int64u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5794,7 +5794,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5819,12 +5819,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt8sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int8s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5846,7 +5846,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5871,12 +5871,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt16sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int16s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5898,7 +5898,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5923,12 +5923,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt24sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int24s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -5949,7 +5949,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -5974,12 +5974,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt32sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int32s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6000,7 +6000,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6025,12 +6025,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt40sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int40s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6051,7 +6051,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6076,12 +6076,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt48sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int48s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6102,7 +6102,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6127,12 +6127,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt56sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int56s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6153,7 +6153,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6178,12 +6178,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeInt64sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int64s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6204,7 +6204,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6229,12 +6229,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeEnum8Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Enum8::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6256,7 +6256,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6281,12 +6281,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeEnum16Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Enum16::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6308,7 +6308,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6333,12 +6333,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeFloatSingleAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::FloatSingle::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6359,7 +6359,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6384,12 +6384,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeFloatDoubleAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::FloatDouble::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6411,7 +6411,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6436,12 +6436,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeOctetStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::OctetString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6463,7 +6463,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6488,12 +6488,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeListInt8uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeListInt8uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListInt8u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6537,7 +6537,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6562,12 +6562,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeListOctetStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeListOctetStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListOctetString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListOctetString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6612,7 +6612,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6637,12 +6637,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeListStructOctetStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeListStructOctetStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6694,7 +6694,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6719,12 +6719,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeLongOctetStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::LongOctetString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6746,7 +6746,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6771,12 +6771,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeCharStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::CharString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6798,7 +6798,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6823,12 +6823,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeLongCharStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::LongCharString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6850,7 +6850,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6875,12 +6875,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeEpochUsAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::EpochUs::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6901,7 +6901,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6926,12 +6926,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeEpochSAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::EpochS::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -6952,7 +6952,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -6977,12 +6977,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeVendorIdAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::VendorId::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7004,7 +7004,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7029,12 +7029,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeListNullablesAndOptionalsStructAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7157,7 +7157,7 @@
                 }
                 jobject element_0_nullableStructItem_1;
                 chip::JniReferences::GetInstance().GetObjectField(
-                    element_0, "nullableStruct", "Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;",
+                    element_0, "nullableStruct", "Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;",
                     element_0_nullableStructItem_1);
                 if (element_0_nullableStructItem_1 == nullptr)
                 {
@@ -7463,7 +7463,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7488,12 +7488,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeEnumAttrAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::EnumAttr::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7515,7 +7515,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7540,12 +7540,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt8uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7567,7 +7567,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7592,12 +7592,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt8sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7619,7 +7619,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7644,12 +7644,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt16uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7671,7 +7671,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7696,12 +7696,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt16sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7723,7 +7723,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7748,12 +7748,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeListLongOctetStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeListLongOctetStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListLongOctetString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7798,7 +7798,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -7823,12 +7823,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeListFabricScopedAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeListFabricScopedAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListFabricScoped::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -7914,7 +7914,7 @@
                 listHolder_0->mList[i_0].fabricSensitiveCharString = cleanupStrings.back()->charSpan();
                 jobject element_0_fabricSensitiveStructItem_1;
                 chip::JniReferences::GetInstance().GetObjectField(
-                    element_0, "fabricSensitiveStruct", "Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;",
+                    element_0, "fabricSensitiveStruct", "Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;",
                     element_0_fabricSensitiveStructItem_1);
                 jobject element_0_fabricSensitiveStructItem_1_aItem_2;
                 chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "a", "Ljava/lang/Integer;",
@@ -8022,7 +8022,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8047,12 +8047,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeTimedWriteBooleanAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8074,7 +8074,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8092,12 +8092,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeGeneralErrorBooleanAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeGeneralErrorBooleanAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::GeneralErrorBoolean::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8119,7 +8119,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8144,12 +8144,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeClusterErrorBooleanAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeClusterErrorBooleanAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ClusterErrorBoolean::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8171,7 +8171,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8196,12 +8196,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeUnsupportedAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Unsupported::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8223,7 +8223,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8248,12 +8248,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableBooleanAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8283,7 +8283,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8308,12 +8308,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap8Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8343,7 +8343,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8368,12 +8368,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap16Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8403,7 +8403,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8428,12 +8428,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap32Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8463,7 +8463,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8488,12 +8488,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap64Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8523,7 +8523,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8548,12 +8548,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt8uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8583,7 +8583,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8608,12 +8608,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt16uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8643,7 +8643,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8668,12 +8668,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt24uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8703,7 +8703,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8728,12 +8728,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt32uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8763,7 +8763,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8788,12 +8788,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt40uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8823,7 +8823,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8848,12 +8848,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt48uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8883,7 +8883,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8908,12 +8908,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt56uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -8943,7 +8943,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -8968,12 +8968,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt64uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9003,7 +9003,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9028,12 +9028,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt8sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9063,7 +9063,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9088,12 +9088,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt16sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9123,7 +9123,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9148,12 +9148,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt24sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9183,7 +9183,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9208,12 +9208,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt32sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9243,7 +9243,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9268,12 +9268,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt40sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9303,7 +9303,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9328,12 +9328,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt48sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9363,7 +9363,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9388,12 +9388,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt56sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9423,7 +9423,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9448,12 +9448,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableInt64sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9483,7 +9483,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9508,12 +9508,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableEnum8Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9543,7 +9543,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9568,12 +9568,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableEnum16Attribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9603,7 +9603,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9628,12 +9628,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableFloatSingleAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9663,7 +9663,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9688,12 +9688,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableFloatDoubleAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9723,7 +9723,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9748,12 +9748,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableOctetStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9783,7 +9783,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9808,12 +9808,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableCharStringAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableCharString::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9843,7 +9843,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9868,12 +9868,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableEnumAttrAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9903,7 +9903,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9928,12 +9928,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt8uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -9963,7 +9963,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -9988,12 +9988,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt8sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -10023,7 +10023,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -10048,12 +10048,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt16uAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -10083,7 +10083,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
@@ -10108,12 +10108,12 @@
     onFailure.release();
 }
 
-JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute)
+JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt16sAttribute)
 (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
 {
     chip::DeviceLayer::StackLock lock;
     ListFreer listFreer;
-    using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
+    using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
     TypeInfo::Type cppValue;
 
     std::vector<Platform::UniquePtr<JniByteArray>> cleanupByteArrays;
@@ -10143,7 +10143,7 @@
                        env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
 
     CHIP_ERROR err                  = CHIP_NO_ERROR;
-    TestClusterCluster * cppCluster = reinterpret_cast<TestClusterCluster *>(clusterPtr);
+    UnitTestingCluster * cppCluster = reinterpret_cast<UnitTestingCluster *>(clusterPtr);
     VerifyOrReturn(cppCluster != nullptr,
                    chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
                        env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index fcdb5b5..cea5d48 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -3255,8 +3255,8 @@
         }
         break;
     }
-    case app::Clusters::TestCluster::Id: {
-        using namespace app::Clusters::TestCluster;
+    case app::Clusters::UnitTesting::Id: {
+        using namespace app::Clusters::UnitTesting;
         switch (aPath.mEventId)
         {
         case Events::TestEvent::Id: {
@@ -3326,10 +3326,10 @@
 
             jclass simpleStructStructClass_0;
             err = chip::JniReferences::GetInstance().GetClassRef(
-                env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_0);
+                env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0);
             if (err != CHIP_NO_ERROR)
             {
-                ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                 return nullptr;
             }
             jmethodID simpleStructStructCtor_0 =
@@ -3338,7 +3338,7 @@
                                  "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
             if (simpleStructStructCtor_0 == nullptr)
             {
-                ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                 return nullptr;
             }
 
@@ -3394,10 +3394,10 @@
 
                 jclass simpleStructStructClass_1;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_1);
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                     return nullptr;
                 }
                 jmethodID simpleStructStructCtor_1 =
@@ -3406,7 +3406,7 @@
                                      "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                 if (simpleStructStructCtor_1 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                     return nullptr;
                 }
 
@@ -3433,19 +3433,19 @@
 
             jclass testEventStructClass;
             err = chip::JniReferences::GetInstance().GetClassRef(
-                env, "chip/devicecontroller/ChipEventStructs$TestClusterClusterTestEventEvent", testEventStructClass);
+                env, "chip/devicecontroller/ChipEventStructs$UnitTestingClusterTestEventEvent", testEventStructClass);
             if (err != CHIP_NO_ERROR)
             {
-                ChipLogError(Zcl, "Could not find class ChipEventStructs$TestClusterClusterTestEventEvent");
+                ChipLogError(Zcl, "Could not find class ChipEventStructs$UnitTestingClusterTestEventEvent");
                 return nullptr;
             }
             jmethodID testEventStructCtor =
                 env->GetMethodID(testEventStructClass, "<init>",
                                  "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Lchip/devicecontroller/"
-                                 "ChipStructs$TestClusterClusterSimpleStruct;Ljava/util/ArrayList;Ljava/util/ArrayList;)V");
+                                 "ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/util/ArrayList;)V");
             if (testEventStructCtor == nullptr)
             {
-                ChipLogError(Zcl, "Could not find ChipEventStructs$TestClusterClusterTestEventEvent constructor");
+                ChipLogError(Zcl, "Could not find ChipEventStructs$UnitTestingClusterTestEventEvent constructor");
                 return nullptr;
             }
 
@@ -3470,18 +3470,18 @@
 
             jclass testFabricScopedEventStructClass;
             err = chip::JniReferences::GetInstance().GetClassRef(
-                env, "chip/devicecontroller/ChipEventStructs$TestClusterClusterTestFabricScopedEventEvent",
+                env, "chip/devicecontroller/ChipEventStructs$UnitTestingClusterTestFabricScopedEventEvent",
                 testFabricScopedEventStructClass);
             if (err != CHIP_NO_ERROR)
             {
-                ChipLogError(Zcl, "Could not find class ChipEventStructs$TestClusterClusterTestFabricScopedEventEvent");
+                ChipLogError(Zcl, "Could not find class ChipEventStructs$UnitTestingClusterTestFabricScopedEventEvent");
                 return nullptr;
             }
             jmethodID testFabricScopedEventStructCtor =
                 env->GetMethodID(testFabricScopedEventStructClass, "<init>", "(Ljava/lang/Integer;)V");
             if (testFabricScopedEventStructCtor == nullptr)
             {
-                ChipLogError(Zcl, "Could not find ChipEventStructs$TestClusterClusterTestFabricScopedEventEvent constructor");
+                ChipLogError(Zcl, "Could not find ChipEventStructs$UnitTestingClusterTestFabricScopedEventEvent constructor");
                 return nullptr;
             }
 
diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
index 32ae5c4..08eaadc 100644
--- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
+++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
@@ -3723,8 +3723,8 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, setupPIN);
 }
-CHIPTestClusterClusterTestSpecificResponseCallback::CHIPTestClusterClusterTestSpecificResponseCallback(jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterTestSpecificResponseCallbackType>(CallbackFn, this)
+CHIPUnitTestingClusterTestSpecificResponseCallback::CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback) :
+    Callback::Callback<CHIPUnitTestingClusterTestSpecificResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3740,7 +3740,7 @@
     }
 }
 
-CHIPTestClusterClusterTestSpecificResponseCallback::~CHIPTestClusterClusterTestSpecificResponseCallback()
+CHIPUnitTestingClusterTestSpecificResponseCallback::~CHIPUnitTestingClusterTestSpecificResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3751,8 +3751,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterTestSpecificResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterTestSpecificResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -3762,10 +3762,10 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterTestSpecificResponseCallback,
-                    void (*)(CHIPTestClusterClusterTestSpecificResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterTestSpecificResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterTestSpecificResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterTestSpecificResponseCallback,
+                    void (*)(CHIPUnitTestingClusterTestSpecificResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterTestSpecificResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterTestSpecificResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -3783,9 +3783,9 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue);
 }
-CHIPTestClusterClusterTestAddArgumentsResponseCallback::CHIPTestClusterClusterTestAddArgumentsResponseCallback(
+CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CHIPUnitTestingClusterTestAddArgumentsResponseCallback(
     jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterTestAddArgumentsResponseCallbackType>(CallbackFn, this)
+    Callback::Callback<CHIPUnitTestingClusterTestAddArgumentsResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3801,7 +3801,7 @@
     }
 }
 
-CHIPTestClusterClusterTestAddArgumentsResponseCallback::~CHIPTestClusterClusterTestAddArgumentsResponseCallback()
+CHIPUnitTestingClusterTestAddArgumentsResponseCallback::~CHIPUnitTestingClusterTestAddArgumentsResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3812,8 +3812,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterTestAddArgumentsResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -3823,10 +3823,10 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterTestAddArgumentsResponseCallback,
-                    void (*)(CHIPTestClusterClusterTestAddArgumentsResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterTestAddArgumentsResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterTestAddArgumentsResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterTestAddArgumentsResponseCallback,
+                    void (*)(CHIPUnitTestingClusterTestAddArgumentsResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterTestAddArgumentsResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterTestAddArgumentsResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -3844,9 +3844,9 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue);
 }
-CHIPTestClusterClusterTestListInt8UReverseResponseCallback::CHIPTestClusterClusterTestListInt8UReverseResponseCallback(
+CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::CHIPUnitTestingClusterTestListInt8UReverseResponseCallback(
     jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType>(CallbackFn, this)
+    Callback::Callback<CHIPUnitTestingClusterTestListInt8UReverseResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3862,7 +3862,7 @@
     }
 }
 
-CHIPTestClusterClusterTestListInt8UReverseResponseCallback::~CHIPTestClusterClusterTestListInt8UReverseResponseCallback()
+CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::~CHIPUnitTestingClusterTestListInt8UReverseResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3873,8 +3873,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterTestListInt8UReverseResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -3884,10 +3884,10 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterTestListInt8UReverseResponseCallback,
-                    void (*)(CHIPTestClusterClusterTestListInt8UReverseResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterTestListInt8UReverseResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterTestListInt8UReverseResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterTestListInt8UReverseResponseCallback,
+                    void (*)(CHIPUnitTestingClusterTestListInt8UReverseResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterTestListInt8UReverseResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterTestListInt8UReverseResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -3914,8 +3914,8 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, arg1);
 }
-CHIPTestClusterClusterTestEnumsResponseCallback::CHIPTestClusterClusterTestEnumsResponseCallback(jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterTestEnumsResponseCallbackType>(CallbackFn, this)
+CHIPUnitTestingClusterTestEnumsResponseCallback::CHIPUnitTestingClusterTestEnumsResponseCallback(jobject javaCallback) :
+    Callback::Callback<CHIPUnitTestingClusterTestEnumsResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3931,7 +3931,7 @@
     }
 }
 
-CHIPTestClusterClusterTestEnumsResponseCallback::~CHIPTestClusterClusterTestEnumsResponseCallback()
+CHIPUnitTestingClusterTestEnumsResponseCallback::~CHIPUnitTestingClusterTestEnumsResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3942,8 +3942,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterTestEnumsResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterTestEnumsResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -3953,9 +3953,9 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterTestEnumsResponseCallback, void (*)(CHIPTestClusterClusterTestEnumsResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterTestEnumsResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterTestEnumsResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterTestEnumsResponseCallback, void (*)(CHIPUnitTestingClusterTestEnumsResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterTestEnumsResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterTestEnumsResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -3979,9 +3979,9 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2);
 }
-CHIPTestClusterClusterTestNullableOptionalResponseCallback::CHIPTestClusterClusterTestNullableOptionalResponseCallback(
+CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CHIPUnitTestingClusterTestNullableOptionalResponseCallback(
     jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterTestNullableOptionalResponseCallbackType>(CallbackFn, this)
+    Callback::Callback<CHIPUnitTestingClusterTestNullableOptionalResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -3997,7 +3997,7 @@
     }
 }
 
-CHIPTestClusterClusterTestNullableOptionalResponseCallback::~CHIPTestClusterClusterTestNullableOptionalResponseCallback()
+CHIPUnitTestingClusterTestNullableOptionalResponseCallback::~CHIPUnitTestingClusterTestNullableOptionalResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4008,8 +4008,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterTestNullableOptionalResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -4019,10 +4019,10 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterTestNullableOptionalResponseCallback,
-                    void (*)(CHIPTestClusterClusterTestNullableOptionalResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterTestNullableOptionalResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterTestNullableOptionalResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterTestNullableOptionalResponseCallback,
+                    void (*)(CHIPUnitTestingClusterTestNullableOptionalResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterTestNullableOptionalResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterTestNullableOptionalResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -4094,8 +4094,8 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, wasPresent, wasNull, value, originalValue);
 }
-CHIPTestClusterClusterBooleanResponseCallback::CHIPTestClusterClusterBooleanResponseCallback(jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterBooleanResponseCallbackType>(CallbackFn, this)
+CHIPUnitTestingClusterBooleanResponseCallback::CHIPUnitTestingClusterBooleanResponseCallback(jobject javaCallback) :
+    Callback::Callback<CHIPUnitTestingClusterBooleanResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4111,7 +4111,7 @@
     }
 }
 
-CHIPTestClusterClusterBooleanResponseCallback::~CHIPTestClusterClusterBooleanResponseCallback()
+CHIPUnitTestingClusterBooleanResponseCallback::~CHIPUnitTestingClusterBooleanResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4122,8 +4122,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterBooleanResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterBooleanResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -4133,9 +4133,9 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterBooleanResponseCallback, void (*)(CHIPTestClusterClusterBooleanResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterBooleanResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterBooleanResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterBooleanResponseCallback, void (*)(CHIPUnitTestingClusterBooleanResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterBooleanResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterBooleanResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -4153,8 +4153,8 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, value);
 }
-CHIPTestClusterClusterSimpleStructResponseCallback::CHIPTestClusterClusterSimpleStructResponseCallback(jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterSimpleStructResponseCallbackType>(CallbackFn, this)
+CHIPUnitTestingClusterSimpleStructResponseCallback::CHIPUnitTestingClusterSimpleStructResponseCallback(jobject javaCallback) :
+    Callback::Callback<CHIPUnitTestingClusterSimpleStructResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4170,7 +4170,7 @@
     }
 }
 
-CHIPTestClusterClusterSimpleStructResponseCallback::~CHIPTestClusterClusterSimpleStructResponseCallback()
+CHIPUnitTestingClusterSimpleStructResponseCallback::~CHIPUnitTestingClusterSimpleStructResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4181,8 +4181,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterSimpleStructResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterSimpleStructResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -4192,10 +4192,10 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterSimpleStructResponseCallback,
-                    void (*)(CHIPTestClusterClusterSimpleStructResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterSimpleStructResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterSimpleStructResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterSimpleStructResponseCallback,
+                    void (*)(CHIPUnitTestingClusterSimpleStructResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterSimpleStructResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterSimpleStructResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
@@ -4203,7 +4203,7 @@
     VerifyOrReturn(javaCallbackRef != nullptr);
 
     err = JniReferences::GetInstance().FindMethod(
-        env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;)V", &javaMethod);
+        env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;)V", &javaMethod);
     VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err)));
 
     jobject arg1;
@@ -4246,11 +4246,11 @@
                                                                  dataResponse.arg1.h, arg1_h);
 
     jclass simpleStructStructClass_0;
-    err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct",
+    err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct",
                                                          simpleStructStructClass_0);
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+        ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
         return;
     }
     jmethodID simpleStructStructCtor_0 = env->GetMethodID(simpleStructStructClass_0, "<init>",
@@ -4258,7 +4258,7 @@
                                                           "String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
     if (simpleStructStructCtor_0 == nullptr)
     {
-        ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+        ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
         return;
     }
 
@@ -4267,9 +4267,9 @@
 
     env->CallVoidMethod(javaCallbackRef, javaMethod, arg1);
 }
-CHIPTestClusterClusterTestEmitTestEventResponseCallback::CHIPTestClusterClusterTestEmitTestEventResponseCallback(
+CHIPUnitTestingClusterTestEmitTestEventResponseCallback::CHIPUnitTestingClusterTestEmitTestEventResponseCallback(
     jobject javaCallback) :
-    Callback::Callback<CHIPTestClusterClusterTestEmitTestEventResponseCallbackType>(CallbackFn, this)
+    Callback::Callback<CHIPUnitTestingClusterTestEmitTestEventResponseCallbackType>(CallbackFn, this)
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4285,7 +4285,7 @@
     }
 }
 
-CHIPTestClusterClusterTestEmitTestEventResponseCallback::~CHIPTestClusterClusterTestEmitTestEventResponseCallback()
+CHIPUnitTestingClusterTestEmitTestEventResponseCallback::~CHIPUnitTestingClusterTestEmitTestEventResponseCallback()
 {
     JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -4296,8 +4296,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 };
 
-void CHIPTestClusterClusterTestEmitTestEventResponseCallback::CallbackFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & dataResponse)
+void CHIPUnitTestingClusterTestEmitTestEventResponseCallback::CallbackFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & dataResponse)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -4307,10 +4307,10 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv"));
 
-    std::unique_ptr<CHIPTestClusterClusterTestEmitTestEventResponseCallback,
-                    void (*)(CHIPTestClusterClusterTestEmitTestEventResponseCallback *)>
-        cppCallback(reinterpret_cast<CHIPTestClusterClusterTestEmitTestEventResponseCallback *>(context),
-                    chip::Platform::Delete<CHIPTestClusterClusterTestEmitTestEventResponseCallback>);
+    std::unique_ptr<CHIPUnitTestingClusterTestEmitTestEventResponseCallback,
+                    void (*)(CHIPUnitTestingClusterTestEmitTestEventResponseCallback *)>
+        cppCallback(reinterpret_cast<CHIPUnitTestingClusterTestEmitTestEventResponseCallback *>(context),
+                    chip::Platform::Delete<CHIPUnitTestingClusterTestEmitTestEventResponseCallback>);
     VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback"));
 
     javaCallbackRef = cppCallback->javaCallbackRef;
diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h
index 48ed9d9..4605d5f 100644
--- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h
+++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h
@@ -597,119 +597,119 @@
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterTestSpecificResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterTestSpecificResponseCallbackType>
+class CHIPUnitTestingClusterTestSpecificResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterTestSpecificResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterTestSpecificResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterTestSpecificResponseCallback();
+    ~CHIPUnitTestingClusterTestSpecificResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterTestAddArgumentsResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterTestAddArgumentsResponseCallbackType>
+class CHIPUnitTestingClusterTestAddArgumentsResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterTestAddArgumentsResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterTestAddArgumentsResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterTestAddArgumentsResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterTestAddArgumentsResponseCallback();
+    ~CHIPUnitTestingClusterTestAddArgumentsResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterTestListInt8UReverseResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType>
+class CHIPUnitTestingClusterTestListInt8UReverseResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterTestListInt8UReverseResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterTestListInt8UReverseResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterTestListInt8UReverseResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterTestListInt8UReverseResponseCallback();
+    ~CHIPUnitTestingClusterTestListInt8UReverseResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterTestEnumsResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterTestEnumsResponseCallbackType>
+class CHIPUnitTestingClusterTestEnumsResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterTestEnumsResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterTestEnumsResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterTestEnumsResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterTestEnumsResponseCallback();
+    ~CHIPUnitTestingClusterTestEnumsResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterTestNullableOptionalResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterTestNullableOptionalResponseCallbackType>
+class CHIPUnitTestingClusterTestNullableOptionalResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterTestNullableOptionalResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterTestNullableOptionalResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterTestNullableOptionalResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterTestNullableOptionalResponseCallback();
+    ~CHIPUnitTestingClusterTestNullableOptionalResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterBooleanResponseCallback : public Callback::Callback<CHIPTestClusterClusterBooleanResponseCallbackType>
+class CHIPUnitTestingClusterBooleanResponseCallback : public Callback::Callback<CHIPUnitTestingClusterBooleanResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterBooleanResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterBooleanResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterBooleanResponseCallback();
+    ~CHIPUnitTestingClusterBooleanResponseCallback();
 
-    static void CallbackFn(void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data);
+    static void CallbackFn(void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterSimpleStructResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterSimpleStructResponseCallbackType>
+class CHIPUnitTestingClusterSimpleStructResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterSimpleStructResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterSimpleStructResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterSimpleStructResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterSimpleStructResponseCallback();
+    ~CHIPUnitTestingClusterSimpleStructResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
 };
 
-class CHIPTestClusterClusterTestEmitTestEventResponseCallback
-    : public Callback::Callback<CHIPTestClusterClusterTestEmitTestEventResponseCallbackType>
+class CHIPUnitTestingClusterTestEmitTestEventResponseCallback
+    : public Callback::Callback<CHIPUnitTestingClusterTestEmitTestEventResponseCallbackType>
 {
 public:
-    CHIPTestClusterClusterTestEmitTestEventResponseCallback(jobject javaCallback);
+    CHIPUnitTestingClusterTestEmitTestEventResponseCallback(jobject javaCallback);
 
-    ~CHIPTestClusterClusterTestEmitTestEventResponseCallback();
+    ~CHIPUnitTestingClusterTestEmitTestEventResponseCallback();
 
     static void CallbackFn(void * context,
-                           const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data);
+                           const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data);
 
 private:
     jobject javaCallbackRef;
diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
index 8aabd45..65e9a42 100644
--- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
+++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
@@ -25774,8 +25774,8 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterListInt8uAttributeCallback::CHIPTestClusterListInt8uAttributeCallback(jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterListInt8uAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
+CHIPUnitTestingListInt8uAttributeCallback::CHIPUnitTestingListInt8uAttributeCallback(jobject javaCallback, bool keepAlive) :
+    chip::Callback::Callback<CHIPUnitTestingClusterListInt8uAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -25791,7 +25791,7 @@
     }
 }
 
-CHIPTestClusterListInt8uAttributeCallback::~CHIPTestClusterListInt8uAttributeCallback()
+CHIPUnitTestingListInt8uAttributeCallback::~CHIPUnitTestingListInt8uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -25802,7 +25802,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterListInt8uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingListInt8uAttributeCallback::CallbackFn(void * context,
                                                            const chip::app::DataModel::DecodableList<uint8_t> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -25812,8 +25812,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterListInt8uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterListInt8uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingListInt8uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingListInt8uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -25843,9 +25843,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterListOctetStringAttributeCallback::CHIPTestClusterListOctetStringAttributeCallback(jobject javaCallback,
+CHIPUnitTestingListOctetStringAttributeCallback::CHIPUnitTestingListOctetStringAttributeCallback(jobject javaCallback,
                                                                                                  bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterListOctetStringAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterListOctetStringAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -25862,7 +25862,7 @@
     }
 }
 
-CHIPTestClusterListOctetStringAttributeCallback::~CHIPTestClusterListOctetStringAttributeCallback()
+CHIPUnitTestingListOctetStringAttributeCallback::~CHIPUnitTestingListOctetStringAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -25873,7 +25873,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterListOctetStringAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingListOctetStringAttributeCallback::CallbackFn(void * context,
                                                                  const chip::app::DataModel::DecodableList<chip::ByteSpan> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -25883,8 +25883,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterListOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterListOctetStringAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingListOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingListOctetStringAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -25914,9 +25914,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterListStructOctetStringAttributeCallback::CHIPTestClusterListStructOctetStringAttributeCallback(jobject javaCallback,
+CHIPUnitTestingListStructOctetStringAttributeCallback::CHIPUnitTestingListStructOctetStringAttributeCallback(jobject javaCallback,
                                                                                                              bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterListStructOctetStringAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterListStructOctetStringAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -25933,7 +25933,7 @@
     }
 }
 
-CHIPTestClusterListStructOctetStringAttributeCallback::~CHIPTestClusterListStructOctetStringAttributeCallback()
+CHIPUnitTestingListStructOctetStringAttributeCallback::~CHIPUnitTestingListStructOctetStringAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -25944,9 +25944,9 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterListStructOctetStringAttributeCallback::CallbackFn(
+void CHIPUnitTestingListStructOctetStringAttributeCallback::CallbackFn(
     void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> & list)
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -25955,8 +25955,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterListStructOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterListStructOctetStringAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingListStructOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingListStructOctetStringAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -25989,17 +25989,17 @@
 
         jclass testListStructOctetStructClass_1;
         err = chip::JniReferences::GetInstance().GetClassRef(
-            env, "chip/devicecontroller/ChipStructs$TestClusterClusterTestListStructOctet", testListStructOctetStructClass_1);
+            env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet", testListStructOctetStructClass_1);
         if (err != CHIP_NO_ERROR)
         {
-            ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterTestListStructOctet");
+            ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet");
             return;
         }
         jmethodID testListStructOctetStructCtor_1 =
             env->GetMethodID(testListStructOctetStructClass_1, "<init>", "(Ljava/lang/Long;[B)V");
         if (testListStructOctetStructCtor_1 == nullptr)
         {
-            ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterTestListStructOctet constructor");
+            ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor");
             return;
         }
 
@@ -26012,8 +26012,8 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterVendorIdAttributeCallback::CHIPTestClusterVendorIdAttributeCallback(jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterVendorIdAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
+CHIPUnitTestingVendorIdAttributeCallback::CHIPUnitTestingVendorIdAttributeCallback(jobject javaCallback, bool keepAlive) :
+    chip::Callback::Callback<CHIPUnitTestingClusterVendorIdAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -26029,7 +26029,7 @@
     }
 }
 
-CHIPTestClusterVendorIdAttributeCallback::~CHIPTestClusterVendorIdAttributeCallback()
+CHIPUnitTestingVendorIdAttributeCallback::~CHIPUnitTestingVendorIdAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -26040,7 +26040,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterVendorIdAttributeCallback::CallbackFn(void * context, chip::VendorId value)
+void CHIPUnitTestingVendorIdAttributeCallback::CallbackFn(void * context, chip::VendorId value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -26048,8 +26048,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterVendorIdAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterVendorIdAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingVendorIdAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingVendorIdAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -26069,9 +26069,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback(
+CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback(
     jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterListNullablesAndOptionalsStructAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterListNullablesAndOptionalsStructAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -26088,7 +26088,7 @@
     }
 }
 
-CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::~CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback()
+CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::~CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -26099,10 +26099,10 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CallbackFn(
+void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn(
     void * context,
     const chip::app::DataModel::DecodableList<
-        chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & list)
+        chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -26111,8 +26111,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -26285,10 +26285,10 @@
 
             jclass simpleStructStructClass_3;
             err = chip::JniReferences::GetInstance().GetClassRef(
-                env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_3);
+                env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3);
             if (err != CHIP_NO_ERROR)
             {
-                ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                 return;
             }
             jmethodID simpleStructStructCtor_3 =
@@ -26297,7 +26297,7 @@
                                  "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
             if (simpleStructStructCtor_3 == nullptr)
             {
-                ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                 return;
             }
 
@@ -26369,10 +26369,10 @@
 
             jclass simpleStructStructClass_3;
             err = chip::JniReferences::GetInstance().GetClassRef(
-                env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_3);
+                env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3);
             if (err != CHIP_NO_ERROR)
             {
-                ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                 return;
             }
             jmethodID simpleStructStructCtor_3 =
@@ -26381,7 +26381,7 @@
                                  "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
             if (simpleStructStructCtor_3 == nullptr)
             {
-                ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                 return;
             }
 
@@ -26466,10 +26466,10 @@
 
                 jclass simpleStructStructClass_4;
                 err = chip::JniReferences::GetInstance().GetClassRef(
-                    env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_4);
+                    env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4);
                 if (err != CHIP_NO_ERROR)
                 {
-                    ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+                    ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
                     return;
                 }
                 jmethodID simpleStructStructCtor_4 =
@@ -26478,7 +26478,7 @@
                                      "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
                 if (simpleStructStructCtor_4 == nullptr)
                 {
-                    ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+                    ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
                     return;
                 }
 
@@ -26571,21 +26571,21 @@
 
         jclass nullablesAndOptionalsStructStructClass_1;
         err = chip::JniReferences::GetInstance().GetClassRef(
-            env, "chip/devicecontroller/ChipStructs$TestClusterClusterNullablesAndOptionalsStruct",
+            env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct",
             nullablesAndOptionalsStructStructClass_1);
         if (err != CHIP_NO_ERROR)
         {
-            ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterNullablesAndOptionalsStruct");
+            ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct");
             return;
         }
         jmethodID nullablesAndOptionalsStructStructCtor_1 =
             env->GetMethodID(nullablesAndOptionalsStructStructClass_1, "<init>",
                              "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/"
-                             "Optional;Ljava/util/Optional;Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;Ljava/"
+                             "Optional;Ljava/util/Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/"
                              "util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V");
         if (nullablesAndOptionalsStructStructCtor_1 == nullptr)
         {
-            ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterNullablesAndOptionalsStruct constructor");
+            ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor");
             return;
         }
 
@@ -26601,9 +26601,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterListLongOctetStringAttributeCallback::CHIPTestClusterListLongOctetStringAttributeCallback(jobject javaCallback,
+CHIPUnitTestingListLongOctetStringAttributeCallback::CHIPUnitTestingListLongOctetStringAttributeCallback(jobject javaCallback,
                                                                                                          bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterListLongOctetStringAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterListLongOctetStringAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -26620,7 +26620,7 @@
     }
 }
 
-CHIPTestClusterListLongOctetStringAttributeCallback::~CHIPTestClusterListLongOctetStringAttributeCallback()
+CHIPUnitTestingListLongOctetStringAttributeCallback::~CHIPUnitTestingListLongOctetStringAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -26631,7 +26631,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterListLongOctetStringAttributeCallback::CallbackFn(
+void CHIPUnitTestingListLongOctetStringAttributeCallback::CallbackFn(
     void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -26641,8 +26641,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterListLongOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterListLongOctetStringAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingListLongOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingListLongOctetStringAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -26672,9 +26672,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterListFabricScopedAttributeCallback::CHIPTestClusterListFabricScopedAttributeCallback(jobject javaCallback,
+CHIPUnitTestingListFabricScopedAttributeCallback::CHIPUnitTestingListFabricScopedAttributeCallback(jobject javaCallback,
                                                                                                    bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterListFabricScopedAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterListFabricScopedAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -26691,7 +26691,7 @@
     }
 }
 
-CHIPTestClusterListFabricScopedAttributeCallback::~CHIPTestClusterListFabricScopedAttributeCallback()
+CHIPUnitTestingListFabricScopedAttributeCallback::~CHIPUnitTestingListFabricScopedAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -26702,9 +26702,9 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterListFabricScopedAttributeCallback::CallbackFn(
+void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn(
     void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> & list)
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -26713,8 +26713,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterListFabricScopedAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterListFabricScopedAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingListFabricScopedAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingListFabricScopedAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -26848,10 +26848,10 @@
 
         jclass simpleStructStructClass_2;
         err = chip::JniReferences::GetInstance().GetClassRef(
-            env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass_2);
+            env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2);
         if (err != CHIP_NO_ERROR)
         {
-            ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct");
+            ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct");
             return;
         }
         jmethodID simpleStructStructCtor_2 =
@@ -26860,7 +26860,7 @@
                              "Integer;Ljava/lang/Float;Ljava/lang/Double;)V");
         if (simpleStructStructCtor_2 == nullptr)
         {
-            ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor");
+            ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor");
             return;
         }
 
@@ -26892,19 +26892,19 @@
 
         jclass testFabricScopedStructClass_1;
         err = chip::JniReferences::GetInstance().GetClassRef(
-            env, "chip/devicecontroller/ChipStructs$TestClusterClusterTestFabricScoped", testFabricScopedStructClass_1);
+            env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1);
         if (err != CHIP_NO_ERROR)
         {
-            ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterTestFabricScoped");
+            ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped");
             return;
         }
         jmethodID testFabricScopedStructCtor_1 = env->GetMethodID(
             testFabricScopedStructClass_1, "<init>",
             "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/"
-            "devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V");
+            "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V");
         if (testFabricScopedStructCtor_1 == nullptr)
         {
-            ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterTestFabricScoped constructor");
+            ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor");
             return;
         }
 
@@ -26920,9 +26920,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterNullableBooleanAttributeCallback::CHIPTestClusterNullableBooleanAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableBooleanAttributeCallback::CHIPUnitTestingNullableBooleanAttributeCallback(jobject javaCallback,
                                                                                                  bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableBooleanAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableBooleanAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -26939,7 +26939,7 @@
     }
 }
 
-CHIPTestClusterNullableBooleanAttributeCallback::~CHIPTestClusterNullableBooleanAttributeCallback()
+CHIPUnitTestingNullableBooleanAttributeCallback::~CHIPUnitTestingNullableBooleanAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -26950,7 +26950,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableBooleanAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable<bool> & value)
+void CHIPUnitTestingNullableBooleanAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable<bool> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -26958,8 +26958,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableBooleanAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableBooleanAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableBooleanAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableBooleanAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -26986,9 +26986,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableBitmap8AttributeCallback::CHIPTestClusterNullableBitmap8AttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableBitmap8AttributeCallback::CHIPUnitTestingNullableBitmap8AttributeCallback(jobject javaCallback,
                                                                                                  bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap8AttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap8AttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27005,7 +27005,7 @@
     }
 }
 
-CHIPTestClusterNullableBitmap8AttributeCallback::~CHIPTestClusterNullableBitmap8AttributeCallback()
+CHIPUnitTestingNullableBitmap8AttributeCallback::~CHIPUnitTestingNullableBitmap8AttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27016,8 +27016,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableBitmap8AttributeCallback::CallbackFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value)
+void CHIPUnitTestingNullableBitmap8AttributeCallback::CallbackFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -27025,8 +27025,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableBitmap8AttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableBitmap8AttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableBitmap8AttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableBitmap8AttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27053,9 +27053,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableBitmap16AttributeCallback::CHIPTestClusterNullableBitmap16AttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableBitmap16AttributeCallback::CHIPUnitTestingNullableBitmap16AttributeCallback(jobject javaCallback,
                                                                                                    bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap16AttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap16AttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27072,7 +27072,7 @@
     }
 }
 
-CHIPTestClusterNullableBitmap16AttributeCallback::~CHIPTestClusterNullableBitmap16AttributeCallback()
+CHIPUnitTestingNullableBitmap16AttributeCallback::~CHIPUnitTestingNullableBitmap16AttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27083,8 +27083,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value)
+void CHIPUnitTestingNullableBitmap16AttributeCallback::CallbackFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -27092,8 +27092,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableBitmap16AttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableBitmap16AttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableBitmap16AttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableBitmap16AttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27120,9 +27120,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableBitmap32AttributeCallback::CHIPTestClusterNullableBitmap32AttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableBitmap32AttributeCallback::CHIPUnitTestingNullableBitmap32AttributeCallback(jobject javaCallback,
                                                                                                    bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap32AttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap32AttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27139,7 +27139,7 @@
     }
 }
 
-CHIPTestClusterNullableBitmap32AttributeCallback::~CHIPTestClusterNullableBitmap32AttributeCallback()
+CHIPUnitTestingNullableBitmap32AttributeCallback::~CHIPUnitTestingNullableBitmap32AttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27150,8 +27150,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value)
+void CHIPUnitTestingNullableBitmap32AttributeCallback::CallbackFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -27159,8 +27159,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableBitmap32AttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableBitmap32AttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableBitmap32AttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableBitmap32AttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27187,9 +27187,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableBitmap64AttributeCallback::CHIPTestClusterNullableBitmap64AttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableBitmap64AttributeCallback::CHIPUnitTestingNullableBitmap64AttributeCallback(jobject javaCallback,
                                                                                                    bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap64AttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap64AttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27206,7 +27206,7 @@
     }
 }
 
-CHIPTestClusterNullableBitmap64AttributeCallback::~CHIPTestClusterNullableBitmap64AttributeCallback()
+CHIPUnitTestingNullableBitmap64AttributeCallback::~CHIPUnitTestingNullableBitmap64AttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27217,8 +27217,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value)
+void CHIPUnitTestingNullableBitmap64AttributeCallback::CallbackFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -27226,8 +27226,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableBitmap64AttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableBitmap64AttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableBitmap64AttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableBitmap64AttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27254,8 +27254,8 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt8uAttributeCallback::CHIPTestClusterNullableInt8uAttributeCallback(jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt8uAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
+CHIPUnitTestingNullableInt8uAttributeCallback::CHIPUnitTestingNullableInt8uAttributeCallback(jobject javaCallback, bool keepAlive) :
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt8uAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27271,7 +27271,7 @@
     }
 }
 
-CHIPTestClusterNullableInt8uAttributeCallback::~CHIPTestClusterNullableInt8uAttributeCallback()
+CHIPUnitTestingNullableInt8uAttributeCallback::~CHIPUnitTestingNullableInt8uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27282,7 +27282,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt8uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt8uAttributeCallback::CallbackFn(void * context,
                                                                const chip::app::DataModel::Nullable<uint8_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27291,8 +27291,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt8uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt8uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt8uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt8uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27319,9 +27319,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt16uAttributeCallback::CHIPTestClusterNullableInt16uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt16uAttributeCallback::CHIPUnitTestingNullableInt16uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt16uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt16uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27338,7 +27338,7 @@
     }
 }
 
-CHIPTestClusterNullableInt16uAttributeCallback::~CHIPTestClusterNullableInt16uAttributeCallback()
+CHIPUnitTestingNullableInt16uAttributeCallback::~CHIPUnitTestingNullableInt16uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27349,7 +27349,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt16uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt16uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint16_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27358,8 +27358,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt16uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt16uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt16uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt16uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27386,9 +27386,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt24uAttributeCallback::CHIPTestClusterNullableInt24uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt24uAttributeCallback::CHIPUnitTestingNullableInt24uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt24uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt24uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27405,7 +27405,7 @@
     }
 }
 
-CHIPTestClusterNullableInt24uAttributeCallback::~CHIPTestClusterNullableInt24uAttributeCallback()
+CHIPUnitTestingNullableInt24uAttributeCallback::~CHIPUnitTestingNullableInt24uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27416,7 +27416,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt24uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt24uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint32_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27425,8 +27425,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt24uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt24uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt24uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt24uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27453,9 +27453,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt32uAttributeCallback::CHIPTestClusterNullableInt32uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt32uAttributeCallback::CHIPUnitTestingNullableInt32uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt32uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt32uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27472,7 +27472,7 @@
     }
 }
 
-CHIPTestClusterNullableInt32uAttributeCallback::~CHIPTestClusterNullableInt32uAttributeCallback()
+CHIPUnitTestingNullableInt32uAttributeCallback::~CHIPUnitTestingNullableInt32uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27483,7 +27483,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt32uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt32uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint32_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27492,8 +27492,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt32uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt32uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt32uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt32uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27520,9 +27520,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt40uAttributeCallback::CHIPTestClusterNullableInt40uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt40uAttributeCallback::CHIPUnitTestingNullableInt40uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt40uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt40uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27539,7 +27539,7 @@
     }
 }
 
-CHIPTestClusterNullableInt40uAttributeCallback::~CHIPTestClusterNullableInt40uAttributeCallback()
+CHIPUnitTestingNullableInt40uAttributeCallback::~CHIPUnitTestingNullableInt40uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27550,7 +27550,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt40uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt40uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27559,8 +27559,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt40uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt40uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt40uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt40uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27587,9 +27587,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt48uAttributeCallback::CHIPTestClusterNullableInt48uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt48uAttributeCallback::CHIPUnitTestingNullableInt48uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt48uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt48uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27606,7 +27606,7 @@
     }
 }
 
-CHIPTestClusterNullableInt48uAttributeCallback::~CHIPTestClusterNullableInt48uAttributeCallback()
+CHIPUnitTestingNullableInt48uAttributeCallback::~CHIPUnitTestingNullableInt48uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27617,7 +27617,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt48uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt48uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27626,8 +27626,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt48uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt48uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt48uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt48uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27654,9 +27654,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt56uAttributeCallback::CHIPTestClusterNullableInt56uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt56uAttributeCallback::CHIPUnitTestingNullableInt56uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt56uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt56uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27673,7 +27673,7 @@
     }
 }
 
-CHIPTestClusterNullableInt56uAttributeCallback::~CHIPTestClusterNullableInt56uAttributeCallback()
+CHIPUnitTestingNullableInt56uAttributeCallback::~CHIPUnitTestingNullableInt56uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27684,7 +27684,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt56uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt56uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27693,8 +27693,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt56uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt56uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt56uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt56uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27721,9 +27721,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt64uAttributeCallback::CHIPTestClusterNullableInt64uAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt64uAttributeCallback::CHIPUnitTestingNullableInt64uAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt64uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt64uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27740,7 +27740,7 @@
     }
 }
 
-CHIPTestClusterNullableInt64uAttributeCallback::~CHIPTestClusterNullableInt64uAttributeCallback()
+CHIPUnitTestingNullableInt64uAttributeCallback::~CHIPUnitTestingNullableInt64uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27751,7 +27751,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt64uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt64uAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27760,8 +27760,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt64uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt64uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt64uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt64uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27788,8 +27788,8 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt8sAttributeCallback::CHIPTestClusterNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt8sAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
+CHIPUnitTestingNullableInt8sAttributeCallback::CHIPUnitTestingNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive) :
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt8sAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27805,7 +27805,7 @@
     }
 }
 
-CHIPTestClusterNullableInt8sAttributeCallback::~CHIPTestClusterNullableInt8sAttributeCallback()
+CHIPUnitTestingNullableInt8sAttributeCallback::~CHIPUnitTestingNullableInt8sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27816,7 +27816,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt8sAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable<int8_t> & value)
+void CHIPUnitTestingNullableInt8sAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable<int8_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -27824,8 +27824,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt8sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt8sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt8sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt8sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27852,9 +27852,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt16sAttributeCallback::CHIPTestClusterNullableInt16sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt16sAttributeCallback::CHIPUnitTestingNullableInt16sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt16sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt16sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27871,7 +27871,7 @@
     }
 }
 
-CHIPTestClusterNullableInt16sAttributeCallback::~CHIPTestClusterNullableInt16sAttributeCallback()
+CHIPUnitTestingNullableInt16sAttributeCallback::~CHIPUnitTestingNullableInt16sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27882,7 +27882,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt16sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt16sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int16_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27891,8 +27891,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt16sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt16sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt16sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt16sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27919,9 +27919,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt24sAttributeCallback::CHIPTestClusterNullableInt24sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt24sAttributeCallback::CHIPUnitTestingNullableInt24sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt24sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt24sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -27938,7 +27938,7 @@
     }
 }
 
-CHIPTestClusterNullableInt24sAttributeCallback::~CHIPTestClusterNullableInt24sAttributeCallback()
+CHIPUnitTestingNullableInt24sAttributeCallback::~CHIPUnitTestingNullableInt24sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -27949,7 +27949,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt24sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt24sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int32_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -27958,8 +27958,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt24sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt24sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt24sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt24sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -27986,9 +27986,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt32sAttributeCallback::CHIPTestClusterNullableInt32sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt32sAttributeCallback::CHIPUnitTestingNullableInt32sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt32sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt32sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28005,7 +28005,7 @@
     }
 }
 
-CHIPTestClusterNullableInt32sAttributeCallback::~CHIPTestClusterNullableInt32sAttributeCallback()
+CHIPUnitTestingNullableInt32sAttributeCallback::~CHIPUnitTestingNullableInt32sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28016,7 +28016,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt32sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt32sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int32_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28025,8 +28025,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt32sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt32sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt32sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt32sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28053,9 +28053,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt40sAttributeCallback::CHIPTestClusterNullableInt40sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt40sAttributeCallback::CHIPUnitTestingNullableInt40sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt40sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt40sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28072,7 +28072,7 @@
     }
 }
 
-CHIPTestClusterNullableInt40sAttributeCallback::~CHIPTestClusterNullableInt40sAttributeCallback()
+CHIPUnitTestingNullableInt40sAttributeCallback::~CHIPUnitTestingNullableInt40sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28083,7 +28083,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt40sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt40sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28092,8 +28092,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt40sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt40sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt40sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt40sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28120,9 +28120,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt48sAttributeCallback::CHIPTestClusterNullableInt48sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt48sAttributeCallback::CHIPUnitTestingNullableInt48sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt48sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt48sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28139,7 +28139,7 @@
     }
 }
 
-CHIPTestClusterNullableInt48sAttributeCallback::~CHIPTestClusterNullableInt48sAttributeCallback()
+CHIPUnitTestingNullableInt48sAttributeCallback::~CHIPUnitTestingNullableInt48sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28150,7 +28150,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt48sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt48sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28159,8 +28159,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt48sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt48sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt48sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt48sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28187,9 +28187,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt56sAttributeCallback::CHIPTestClusterNullableInt56sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt56sAttributeCallback::CHIPUnitTestingNullableInt56sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt56sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt56sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28206,7 +28206,7 @@
     }
 }
 
-CHIPTestClusterNullableInt56sAttributeCallback::~CHIPTestClusterNullableInt56sAttributeCallback()
+CHIPUnitTestingNullableInt56sAttributeCallback::~CHIPUnitTestingNullableInt56sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28217,7 +28217,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt56sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt56sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28226,8 +28226,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt56sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt56sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt56sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt56sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28254,9 +28254,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableInt64sAttributeCallback::CHIPTestClusterNullableInt64sAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableInt64sAttributeCallback::CHIPUnitTestingNullableInt64sAttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableInt64sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableInt64sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28273,7 +28273,7 @@
     }
 }
 
-CHIPTestClusterNullableInt64sAttributeCallback::~CHIPTestClusterNullableInt64sAttributeCallback()
+CHIPUnitTestingNullableInt64sAttributeCallback::~CHIPUnitTestingNullableInt64sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28284,7 +28284,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableInt64sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableInt64sAttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<int64_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28293,8 +28293,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableInt64sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableInt64sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableInt64sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableInt64sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28321,8 +28321,8 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableEnum8AttributeCallback::CHIPTestClusterNullableEnum8AttributeCallback(jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableEnum8AttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
+CHIPUnitTestingNullableEnum8AttributeCallback::CHIPUnitTestingNullableEnum8AttributeCallback(jobject javaCallback, bool keepAlive) :
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableEnum8AttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28338,7 +28338,7 @@
     }
 }
 
-CHIPTestClusterNullableEnum8AttributeCallback::~CHIPTestClusterNullableEnum8AttributeCallback()
+CHIPUnitTestingNullableEnum8AttributeCallback::~CHIPUnitTestingNullableEnum8AttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28349,7 +28349,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableEnum8AttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableEnum8AttributeCallback::CallbackFn(void * context,
                                                                const chip::app::DataModel::Nullable<uint8_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28358,8 +28358,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableEnum8AttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableEnum8AttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableEnum8AttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableEnum8AttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28386,9 +28386,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableEnum16AttributeCallback::CHIPTestClusterNullableEnum16AttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableEnum16AttributeCallback::CHIPUnitTestingNullableEnum16AttributeCallback(jobject javaCallback,
                                                                                                bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableEnum16AttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableEnum16AttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28405,7 +28405,7 @@
     }
 }
 
-CHIPTestClusterNullableEnum16AttributeCallback::~CHIPTestClusterNullableEnum16AttributeCallback()
+CHIPUnitTestingNullableEnum16AttributeCallback::~CHIPUnitTestingNullableEnum16AttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28416,7 +28416,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableEnum16AttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableEnum16AttributeCallback::CallbackFn(void * context,
                                                                 const chip::app::DataModel::Nullable<uint16_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28425,8 +28425,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableEnum16AttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableEnum16AttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableEnum16AttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableEnum16AttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28453,9 +28453,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableFloatSingleAttributeCallback::CHIPTestClusterNullableFloatSingleAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableFloatSingleAttributeCallback::CHIPUnitTestingNullableFloatSingleAttributeCallback(jobject javaCallback,
                                                                                                          bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableFloatSingleAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableFloatSingleAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28472,7 +28472,7 @@
     }
 }
 
-CHIPTestClusterNullableFloatSingleAttributeCallback::~CHIPTestClusterNullableFloatSingleAttributeCallback()
+CHIPUnitTestingNullableFloatSingleAttributeCallback::~CHIPUnitTestingNullableFloatSingleAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28483,7 +28483,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableFloatSingleAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableFloatSingleAttributeCallback::CallbackFn(void * context,
                                                                      const chip::app::DataModel::Nullable<float> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28492,8 +28492,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableFloatSingleAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableFloatSingleAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableFloatSingleAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableFloatSingleAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28520,9 +28520,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableFloatDoubleAttributeCallback::CHIPTestClusterNullableFloatDoubleAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableFloatDoubleAttributeCallback::CHIPUnitTestingNullableFloatDoubleAttributeCallback(jobject javaCallback,
                                                                                                          bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableFloatDoubleAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableFloatDoubleAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28539,7 +28539,7 @@
     }
 }
 
-CHIPTestClusterNullableFloatDoubleAttributeCallback::~CHIPTestClusterNullableFloatDoubleAttributeCallback()
+CHIPUnitTestingNullableFloatDoubleAttributeCallback::~CHIPUnitTestingNullableFloatDoubleAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28550,7 +28550,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableFloatDoubleAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableFloatDoubleAttributeCallback::CallbackFn(void * context,
                                                                      const chip::app::DataModel::Nullable<double> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28559,8 +28559,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableFloatDoubleAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableFloatDoubleAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableFloatDoubleAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableFloatDoubleAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28587,9 +28587,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableOctetStringAttributeCallback::CHIPTestClusterNullableOctetStringAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableOctetStringAttributeCallback::CHIPUnitTestingNullableOctetStringAttributeCallback(jobject javaCallback,
                                                                                                          bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableOctetStringAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableOctetStringAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28606,7 +28606,7 @@
     }
 }
 
-CHIPTestClusterNullableOctetStringAttributeCallback::~CHIPTestClusterNullableOctetStringAttributeCallback()
+CHIPUnitTestingNullableOctetStringAttributeCallback::~CHIPUnitTestingNullableOctetStringAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28617,7 +28617,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableOctetStringAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableOctetStringAttributeCallback::CallbackFn(void * context,
                                                                      const chip::app::DataModel::Nullable<chip::ByteSpan> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28626,8 +28626,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableOctetStringAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableOctetStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableOctetStringAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28654,9 +28654,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableCharStringAttributeCallback::CHIPTestClusterNullableCharStringAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableCharStringAttributeCallback::CHIPUnitTestingNullableCharStringAttributeCallback(jobject javaCallback,
                                                                                                        bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableCharStringAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableCharStringAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28673,7 +28673,7 @@
     }
 }
 
-CHIPTestClusterNullableCharStringAttributeCallback::~CHIPTestClusterNullableCharStringAttributeCallback()
+CHIPUnitTestingNullableCharStringAttributeCallback::~CHIPUnitTestingNullableCharStringAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28684,7 +28684,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableCharStringAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableCharStringAttributeCallback::CallbackFn(void * context,
                                                                     const chip::app::DataModel::Nullable<chip::CharSpan> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28693,8 +28693,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableCharStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableCharStringAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableCharStringAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableCharStringAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28718,9 +28718,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableEnumAttrAttributeCallback::CHIPTestClusterNullableEnumAttrAttributeCallback(jobject javaCallback,
+CHIPUnitTestingNullableEnumAttrAttributeCallback::CHIPUnitTestingNullableEnumAttrAttributeCallback(jobject javaCallback,
                                                                                                    bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableEnumAttrAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableEnumAttrAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28737,7 +28737,7 @@
     }
 }
 
-CHIPTestClusterNullableEnumAttrAttributeCallback::~CHIPTestClusterNullableEnumAttrAttributeCallback()
+CHIPUnitTestingNullableEnumAttrAttributeCallback::~CHIPUnitTestingNullableEnumAttrAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28748,8 +28748,8 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableEnumAttrAttributeCallback::CallbackFn(
-    void * context, const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value)
+void CHIPUnitTestingNullableEnumAttrAttributeCallback::CallbackFn(
+    void * context, const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
     CHIP_ERROR err = CHIP_NO_ERROR;
@@ -28757,8 +28757,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableEnumAttrAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableEnumAttrAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableEnumAttrAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableEnumAttrAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28785,9 +28785,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback(
+CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback(
     jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt8uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt8uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28804,7 +28804,7 @@
     }
 }
 
-CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback()
+CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28815,7 +28815,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::CallbackFn(void * context,
                                                                               const chip::app::DataModel::Nullable<uint8_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28824,8 +28824,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28852,9 +28852,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback(
+CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback(
     jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt8sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt8sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28871,7 +28871,7 @@
     }
 }
 
-CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback()
+CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28882,7 +28882,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(void * context,
                                                                               const chip::app::DataModel::Nullable<int8_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28891,8 +28891,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28919,9 +28919,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback(
+CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback(
     jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt16uAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt16uAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -28938,7 +28938,7 @@
     }
 }
 
-CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback()
+CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -28949,7 +28949,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CallbackFn(
+void CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::CallbackFn(
     void * context, const chip::app::DataModel::Nullable<uint16_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -28958,8 +28958,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -28986,9 +28986,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback(
+CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback(
     jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt16sAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt16sAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -29005,7 +29005,7 @@
     }
 }
 
-CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback()
+CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -29016,7 +29016,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CallbackFn(
+void CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::CallbackFn(
     void * context, const chip::app::DataModel::Nullable<int16_t> & value)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -29025,8 +29025,8 @@
     jobject javaCallbackRef;
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
-    std::unique_ptr<CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -29053,9 +29053,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
 }
 
-CHIPTestClusterGeneratedCommandListAttributeCallback::CHIPTestClusterGeneratedCommandListAttributeCallback(jobject javaCallback,
+CHIPUnitTestingGeneratedCommandListAttributeCallback::CHIPUnitTestingGeneratedCommandListAttributeCallback(jobject javaCallback,
                                                                                                            bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterGeneratedCommandListAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterGeneratedCommandListAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -29072,7 +29072,7 @@
     }
 }
 
-CHIPTestClusterGeneratedCommandListAttributeCallback::~CHIPTestClusterGeneratedCommandListAttributeCallback()
+CHIPUnitTestingGeneratedCommandListAttributeCallback::~CHIPUnitTestingGeneratedCommandListAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -29083,7 +29083,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterGeneratedCommandListAttributeCallback::CallbackFn(
+void CHIPUnitTestingGeneratedCommandListAttributeCallback::CallbackFn(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -29093,8 +29093,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterGeneratedCommandListAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterGeneratedCommandListAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingGeneratedCommandListAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingGeneratedCommandListAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -29124,9 +29124,9 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterAcceptedCommandListAttributeCallback::CHIPTestClusterAcceptedCommandListAttributeCallback(jobject javaCallback,
+CHIPUnitTestingAcceptedCommandListAttributeCallback::CHIPUnitTestingAcceptedCommandListAttributeCallback(jobject javaCallback,
                                                                                                          bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterAcceptedCommandListAttributeCallbackType>(CallbackFn, this),
+    chip::Callback::Callback<CHIPUnitTestingClusterAcceptedCommandListAttributeCallbackType>(CallbackFn, this),
     keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
@@ -29143,7 +29143,7 @@
     }
 }
 
-CHIPTestClusterAcceptedCommandListAttributeCallback::~CHIPTestClusterAcceptedCommandListAttributeCallback()
+CHIPUnitTestingAcceptedCommandListAttributeCallback::~CHIPUnitTestingAcceptedCommandListAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -29154,7 +29154,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterAcceptedCommandListAttributeCallback::CallbackFn(
+void CHIPUnitTestingAcceptedCommandListAttributeCallback::CallbackFn(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -29164,8 +29164,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterAcceptedCommandListAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterAcceptedCommandListAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingAcceptedCommandListAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingAcceptedCommandListAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
@@ -29195,8 +29195,8 @@
     env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj);
 }
 
-CHIPTestClusterAttributeListAttributeCallback::CHIPTestClusterAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) :
-    chip::Callback::Callback<CHIPTestClusterClusterAttributeListAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
+CHIPUnitTestingAttributeListAttributeCallback::CHIPUnitTestingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) :
+    chip::Callback::Callback<CHIPUnitTestingClusterAttributeListAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive)
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -29212,7 +29212,7 @@
     }
 }
 
-CHIPTestClusterAttributeListAttributeCallback::~CHIPTestClusterAttributeListAttributeCallback()
+CHIPUnitTestingAttributeListAttributeCallback::~CHIPUnitTestingAttributeListAttributeCallback()
 {
     JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
     if (env == nullptr)
@@ -29223,7 +29223,7 @@
     env->DeleteGlobalRef(javaCallbackRef);
 }
 
-void CHIPTestClusterAttributeListAttributeCallback::CallbackFn(void * context,
+void CHIPUnitTestingAttributeListAttributeCallback::CallbackFn(void * context,
                                                                const chip::app::DataModel::DecodableList<chip::AttributeId> & list)
 {
     chip::DeviceLayer::StackUnlock unlock;
@@ -29233,8 +29233,8 @@
 
     VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
 
-    std::unique_ptr<CHIPTestClusterAttributeListAttributeCallback, decltype(&maybeDestroy)> cppCallback(
-        reinterpret_cast<CHIPTestClusterAttributeListAttributeCallback *>(context), maybeDestroy);
+    std::unique_ptr<CHIPUnitTestingAttributeListAttributeCallback, decltype(&maybeDestroy)> cppCallback(
+        reinterpret_cast<CHIPUnitTestingAttributeListAttributeCallback *>(context), maybeDestroy);
 
     // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
     javaCallbackRef = cppCallback.get()->javaCallbackRef;
diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h
index f488ece..c3787ec 100644
--- a/src/controller/java/zap-generated/CHIPReadCallbacks.h
+++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h
@@ -10800,20 +10800,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterListInt8uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterListInt8uAttributeCallbackType>
+class CHIPUnitTestingListInt8uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterListInt8uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterListInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingListInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterListInt8uAttributeCallback();
+    ~CHIPUnitTestingListInt8uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterListInt8uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingListInt8uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterListInt8uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingListInt8uAttributeCallback>(callback);
         }
     }
 
@@ -10821,7 +10821,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterListInt8uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingListInt8uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -10830,20 +10830,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterListOctetStringAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterListOctetStringAttributeCallbackType>
+class CHIPUnitTestingListOctetStringAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterListOctetStringAttributeCallbackType>
 {
 public:
-    CHIPTestClusterListOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingListOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterListOctetStringAttributeCallback();
+    ~CHIPUnitTestingListOctetStringAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterListOctetStringAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingListOctetStringAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterListOctetStringAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingListOctetStringAttributeCallback>(callback);
         }
     }
 
@@ -10851,7 +10851,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterListOctetStringAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingListOctetStringAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -10860,31 +10860,31 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterListStructOctetStringAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterListStructOctetStringAttributeCallbackType>
+class CHIPUnitTestingListStructOctetStringAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterListStructOctetStringAttributeCallbackType>
 {
 public:
-    CHIPTestClusterListStructOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingListStructOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterListStructOctetStringAttributeCallback();
+    ~CHIPUnitTestingListStructOctetStringAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterListStructOctetStringAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingListStructOctetStringAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterListStructOctetStringAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingListStructOctetStringAttributeCallback>(callback);
         }
     }
 
     static void CallbackFn(
         void * context,
-        const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> &
+        const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> &
             list);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterListStructOctetStringAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingListStructOctetStringAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -10893,20 +10893,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterVendorIdAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterVendorIdAttributeCallbackType>
+class CHIPUnitTestingVendorIdAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterVendorIdAttributeCallbackType>
 {
 public:
-    CHIPTestClusterVendorIdAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingVendorIdAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterVendorIdAttributeCallback();
+    ~CHIPUnitTestingVendorIdAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterVendorIdAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingVendorIdAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterVendorIdAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingVendorIdAttributeCallback>(callback);
         }
     }
 
@@ -10914,7 +10914,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterVendorIdAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingVendorIdAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -10923,30 +10923,30 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterListNullablesAndOptionalsStructAttributeCallbackType>
+class CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterListNullablesAndOptionalsStructAttributeCallbackType>
 {
 public:
-    CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback();
+    ~CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback>(callback);
         }
     }
 
     static void CallbackFn(void * context,
                            const chip::app::DataModel::DecodableList<
-                               chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & list);
+                               chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & list);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -10955,20 +10955,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterListLongOctetStringAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterListLongOctetStringAttributeCallbackType>
+class CHIPUnitTestingListLongOctetStringAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterListLongOctetStringAttributeCallbackType>
 {
 public:
-    CHIPTestClusterListLongOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingListLongOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterListLongOctetStringAttributeCallback();
+    ~CHIPUnitTestingListLongOctetStringAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterListLongOctetStringAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingListLongOctetStringAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterListLongOctetStringAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingListLongOctetStringAttributeCallback>(callback);
         }
     }
 
@@ -10976,7 +10976,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterListLongOctetStringAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingListLongOctetStringAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -10985,31 +10985,31 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterListFabricScopedAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterListFabricScopedAttributeCallbackType>
+class CHIPUnitTestingListFabricScopedAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterListFabricScopedAttributeCallbackType>
 {
 public:
-    CHIPTestClusterListFabricScopedAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingListFabricScopedAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterListFabricScopedAttributeCallback();
+    ~CHIPUnitTestingListFabricScopedAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterListFabricScopedAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingListFabricScopedAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterListFabricScopedAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingListFabricScopedAttributeCallback>(callback);
         }
     }
 
     static void CallbackFn(
         void * context,
-        const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> &
+        const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> &
             list);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterListFabricScopedAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingListFabricScopedAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11018,20 +11018,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableBooleanAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableBooleanAttributeCallbackType>
+class CHIPUnitTestingNullableBooleanAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableBooleanAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableBooleanAttributeCallback();
+    ~CHIPUnitTestingNullableBooleanAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableBooleanAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableBooleanAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableBooleanAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableBooleanAttributeCallback>(callback);
         }
     }
 
@@ -11039,7 +11039,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableBooleanAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableBooleanAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11048,30 +11048,30 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableBitmap8AttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap8AttributeCallbackType>
+class CHIPUnitTestingNullableBitmap8AttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap8AttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableBitmap8AttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableBitmap8AttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableBitmap8AttributeCallback();
+    ~CHIPUnitTestingNullableBitmap8AttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableBitmap8AttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableBitmap8AttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableBitmap8AttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableBitmap8AttributeCallback>(callback);
         }
     }
 
     static void
     CallbackFn(void * context,
-               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value);
+               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableBitmap8AttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableBitmap8AttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11080,30 +11080,30 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableBitmap16AttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap16AttributeCallbackType>
+class CHIPUnitTestingNullableBitmap16AttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap16AttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableBitmap16AttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableBitmap16AttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableBitmap16AttributeCallback();
+    ~CHIPUnitTestingNullableBitmap16AttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableBitmap16AttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableBitmap16AttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableBitmap16AttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableBitmap16AttributeCallback>(callback);
         }
     }
 
     static void
     CallbackFn(void * context,
-               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value);
+               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableBitmap16AttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableBitmap16AttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11112,30 +11112,30 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableBitmap32AttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap32AttributeCallbackType>
+class CHIPUnitTestingNullableBitmap32AttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap32AttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableBitmap32AttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableBitmap32AttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableBitmap32AttributeCallback();
+    ~CHIPUnitTestingNullableBitmap32AttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableBitmap32AttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableBitmap32AttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableBitmap32AttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableBitmap32AttributeCallback>(callback);
         }
     }
 
     static void
     CallbackFn(void * context,
-               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value);
+               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableBitmap32AttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableBitmap32AttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11144,30 +11144,30 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableBitmap64AttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableBitmap64AttributeCallbackType>
+class CHIPUnitTestingNullableBitmap64AttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableBitmap64AttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableBitmap64AttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableBitmap64AttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableBitmap64AttributeCallback();
+    ~CHIPUnitTestingNullableBitmap64AttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableBitmap64AttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableBitmap64AttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableBitmap64AttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableBitmap64AttributeCallback>(callback);
         }
     }
 
     static void
     CallbackFn(void * context,
-               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value);
+               const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableBitmap64AttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableBitmap64AttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11176,20 +11176,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt8uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt8uAttributeCallbackType>
+class CHIPUnitTestingNullableInt8uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt8uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt8uAttributeCallback();
+    ~CHIPUnitTestingNullableInt8uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt8uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt8uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt8uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt8uAttributeCallback>(callback);
         }
     }
 
@@ -11197,7 +11197,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt8uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt8uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11206,20 +11206,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt16uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt16uAttributeCallbackType>
+class CHIPUnitTestingNullableInt16uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt16uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt16uAttributeCallback();
+    ~CHIPUnitTestingNullableInt16uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt16uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt16uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt16uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt16uAttributeCallback>(callback);
         }
     }
 
@@ -11227,7 +11227,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt16uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt16uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11236,20 +11236,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt24uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt24uAttributeCallbackType>
+class CHIPUnitTestingNullableInt24uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt24uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt24uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt24uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt24uAttributeCallback();
+    ~CHIPUnitTestingNullableInt24uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt24uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt24uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt24uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt24uAttributeCallback>(callback);
         }
     }
 
@@ -11257,7 +11257,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt24uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt24uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11266,20 +11266,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt32uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt32uAttributeCallbackType>
+class CHIPUnitTestingNullableInt32uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt32uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt32uAttributeCallback();
+    ~CHIPUnitTestingNullableInt32uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt32uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt32uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt32uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt32uAttributeCallback>(callback);
         }
     }
 
@@ -11287,7 +11287,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt32uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt32uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11296,20 +11296,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt40uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt40uAttributeCallbackType>
+class CHIPUnitTestingNullableInt40uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt40uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt40uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt40uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt40uAttributeCallback();
+    ~CHIPUnitTestingNullableInt40uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt40uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt40uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt40uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt40uAttributeCallback>(callback);
         }
     }
 
@@ -11317,7 +11317,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt40uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt40uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11326,20 +11326,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt48uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt48uAttributeCallbackType>
+class CHIPUnitTestingNullableInt48uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt48uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt48uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt48uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt48uAttributeCallback();
+    ~CHIPUnitTestingNullableInt48uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt48uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt48uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt48uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt48uAttributeCallback>(callback);
         }
     }
 
@@ -11347,7 +11347,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt48uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt48uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11356,20 +11356,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt56uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt56uAttributeCallbackType>
+class CHIPUnitTestingNullableInt56uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt56uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt56uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt56uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt56uAttributeCallback();
+    ~CHIPUnitTestingNullableInt56uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt56uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt56uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt56uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt56uAttributeCallback>(callback);
         }
     }
 
@@ -11377,7 +11377,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt56uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt56uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11386,20 +11386,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt64uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt64uAttributeCallbackType>
+class CHIPUnitTestingNullableInt64uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt64uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt64uAttributeCallback();
+    ~CHIPUnitTestingNullableInt64uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt64uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt64uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt64uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt64uAttributeCallback>(callback);
         }
     }
 
@@ -11407,7 +11407,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt64uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt64uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11416,20 +11416,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt8sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt8sAttributeCallbackType>
+class CHIPUnitTestingNullableInt8sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt8sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt8sAttributeCallback();
+    ~CHIPUnitTestingNullableInt8sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt8sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt8sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt8sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt8sAttributeCallback>(callback);
         }
     }
 
@@ -11437,7 +11437,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt8sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt8sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11446,20 +11446,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt16sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt16sAttributeCallbackType>
+class CHIPUnitTestingNullableInt16sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt16sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt16sAttributeCallback();
+    ~CHIPUnitTestingNullableInt16sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt16sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt16sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt16sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt16sAttributeCallback>(callback);
         }
     }
 
@@ -11467,7 +11467,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt16sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt16sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11476,20 +11476,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt24sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt24sAttributeCallbackType>
+class CHIPUnitTestingNullableInt24sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt24sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt24sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt24sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt24sAttributeCallback();
+    ~CHIPUnitTestingNullableInt24sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt24sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt24sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt24sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt24sAttributeCallback>(callback);
         }
     }
 
@@ -11497,7 +11497,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt24sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt24sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11506,20 +11506,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt32sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt32sAttributeCallbackType>
+class CHIPUnitTestingNullableInt32sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt32sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt32sAttributeCallback();
+    ~CHIPUnitTestingNullableInt32sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt32sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt32sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt32sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt32sAttributeCallback>(callback);
         }
     }
 
@@ -11527,7 +11527,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt32sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt32sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11536,20 +11536,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt40sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt40sAttributeCallbackType>
+class CHIPUnitTestingNullableInt40sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt40sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt40sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt40sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt40sAttributeCallback();
+    ~CHIPUnitTestingNullableInt40sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt40sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt40sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt40sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt40sAttributeCallback>(callback);
         }
     }
 
@@ -11557,7 +11557,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt40sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt40sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11566,20 +11566,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt48sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt48sAttributeCallbackType>
+class CHIPUnitTestingNullableInt48sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt48sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt48sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt48sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt48sAttributeCallback();
+    ~CHIPUnitTestingNullableInt48sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt48sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt48sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt48sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt48sAttributeCallback>(callback);
         }
     }
 
@@ -11587,7 +11587,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt48sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt48sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11596,20 +11596,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt56sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt56sAttributeCallbackType>
+class CHIPUnitTestingNullableInt56sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt56sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt56sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt56sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt56sAttributeCallback();
+    ~CHIPUnitTestingNullableInt56sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt56sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt56sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt56sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt56sAttributeCallback>(callback);
         }
     }
 
@@ -11617,7 +11617,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt56sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt56sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11626,20 +11626,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableInt64sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableInt64sAttributeCallbackType>
+class CHIPUnitTestingNullableInt64sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableInt64sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableInt64sAttributeCallback();
+    ~CHIPUnitTestingNullableInt64sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableInt64sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableInt64sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableInt64sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableInt64sAttributeCallback>(callback);
         }
     }
 
@@ -11647,7 +11647,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableInt64sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableInt64sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11656,20 +11656,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableEnum8AttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableEnum8AttributeCallbackType>
+class CHIPUnitTestingNullableEnum8AttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableEnum8AttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableEnum8AttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableEnum8AttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableEnum8AttributeCallback();
+    ~CHIPUnitTestingNullableEnum8AttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableEnum8AttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableEnum8AttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableEnum8AttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableEnum8AttributeCallback>(callback);
         }
     }
 
@@ -11677,7 +11677,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableEnum8AttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableEnum8AttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11686,20 +11686,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableEnum16AttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableEnum16AttributeCallbackType>
+class CHIPUnitTestingNullableEnum16AttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableEnum16AttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableEnum16AttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableEnum16AttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableEnum16AttributeCallback();
+    ~CHIPUnitTestingNullableEnum16AttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableEnum16AttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableEnum16AttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableEnum16AttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableEnum16AttributeCallback>(callback);
         }
     }
 
@@ -11707,7 +11707,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableEnum16AttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableEnum16AttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11716,20 +11716,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableFloatSingleAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableFloatSingleAttributeCallbackType>
+class CHIPUnitTestingNullableFloatSingleAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableFloatSingleAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableFloatSingleAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableFloatSingleAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableFloatSingleAttributeCallback();
+    ~CHIPUnitTestingNullableFloatSingleAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableFloatSingleAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableFloatSingleAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableFloatSingleAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableFloatSingleAttributeCallback>(callback);
         }
     }
 
@@ -11737,7 +11737,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableFloatSingleAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableFloatSingleAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11746,20 +11746,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableFloatDoubleAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableFloatDoubleAttributeCallbackType>
+class CHIPUnitTestingNullableFloatDoubleAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableFloatDoubleAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableFloatDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableFloatDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableFloatDoubleAttributeCallback();
+    ~CHIPUnitTestingNullableFloatDoubleAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableFloatDoubleAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableFloatDoubleAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableFloatDoubleAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableFloatDoubleAttributeCallback>(callback);
         }
     }
 
@@ -11767,7 +11767,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableFloatDoubleAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableFloatDoubleAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11776,20 +11776,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableOctetStringAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableOctetStringAttributeCallbackType>
+class CHIPUnitTestingNullableOctetStringAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableOctetStringAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableOctetStringAttributeCallback();
+    ~CHIPUnitTestingNullableOctetStringAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableOctetStringAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableOctetStringAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableOctetStringAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableOctetStringAttributeCallback>(callback);
         }
     }
 
@@ -11797,7 +11797,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableOctetStringAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableOctetStringAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11806,20 +11806,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableCharStringAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableCharStringAttributeCallbackType>
+class CHIPUnitTestingNullableCharStringAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableCharStringAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableCharStringAttributeCallback();
+    ~CHIPUnitTestingNullableCharStringAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableCharStringAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableCharStringAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableCharStringAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableCharStringAttributeCallback>(callback);
         }
     }
 
@@ -11827,7 +11827,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableCharStringAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableCharStringAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11836,29 +11836,29 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableEnumAttrAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableEnumAttrAttributeCallbackType>
+class CHIPUnitTestingNullableEnumAttrAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableEnumAttrAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableEnumAttrAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableEnumAttrAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableEnumAttrAttributeCallback();
+    ~CHIPUnitTestingNullableEnumAttrAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableEnumAttrAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableEnumAttrAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableEnumAttrAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableEnumAttrAttributeCallback>(callback);
         }
     }
 
     static void CallbackFn(void * context,
-                           const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value);
+                           const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value);
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableEnumAttrAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableEnumAttrAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11867,20 +11867,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt8uAttributeCallbackType>
+class CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt8uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback();
+    ~CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback>(callback);
         }
     }
 
@@ -11888,7 +11888,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11897,20 +11897,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt8sAttributeCallbackType>
+class CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt8sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback();
+    ~CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback>(callback);
         }
     }
 
@@ -11918,7 +11918,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11927,20 +11927,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt16uAttributeCallbackType>
+class CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt16uAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback();
+    ~CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback>(callback);
         }
     }
 
@@ -11948,7 +11948,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11957,20 +11957,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterNullableRangeRestrictedInt16sAttributeCallbackType>
+class CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterNullableRangeRestrictedInt16sAttributeCallbackType>
 {
 public:
-    CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback();
+    ~CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback>(callback);
         }
     }
 
@@ -11978,7 +11978,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -11987,20 +11987,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterGeneratedCommandListAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterGeneratedCommandListAttributeCallbackType>
+class CHIPUnitTestingGeneratedCommandListAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterGeneratedCommandListAttributeCallbackType>
 {
 public:
-    CHIPTestClusterGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterGeneratedCommandListAttributeCallback();
+    ~CHIPUnitTestingGeneratedCommandListAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterGeneratedCommandListAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingGeneratedCommandListAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterGeneratedCommandListAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingGeneratedCommandListAttributeCallback>(callback);
         }
     }
 
@@ -12008,7 +12008,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterGeneratedCommandListAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingGeneratedCommandListAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -12017,20 +12017,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterAcceptedCommandListAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterAcceptedCommandListAttributeCallbackType>
+class CHIPUnitTestingAcceptedCommandListAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterAcceptedCommandListAttributeCallbackType>
 {
 public:
-    CHIPTestClusterAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterAcceptedCommandListAttributeCallback();
+    ~CHIPUnitTestingAcceptedCommandListAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterAcceptedCommandListAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingAcceptedCommandListAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterAcceptedCommandListAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingAcceptedCommandListAttributeCallback>(callback);
         }
     }
 
@@ -12038,7 +12038,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterAcceptedCommandListAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingAcceptedCommandListAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
@@ -12047,20 +12047,20 @@
     bool keepAlive;
 };
 
-class CHIPTestClusterAttributeListAttributeCallback
-    : public chip::Callback::Callback<CHIPTestClusterClusterAttributeListAttributeCallbackType>
+class CHIPUnitTestingAttributeListAttributeCallback
+    : public chip::Callback::Callback<CHIPUnitTestingClusterAttributeListAttributeCallbackType>
 {
 public:
-    CHIPTestClusterAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false);
+    CHIPUnitTestingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false);
 
-    ~CHIPTestClusterAttributeListAttributeCallback();
+    ~CHIPUnitTestingAttributeListAttributeCallback();
 
-    static void maybeDestroy(CHIPTestClusterAttributeListAttributeCallback * callback)
+    static void maybeDestroy(CHIPUnitTestingAttributeListAttributeCallback * callback)
     {
         if (!callback->keepAlive)
         {
             callback->Cancel();
-            chip::Platform::Delete<CHIPTestClusterAttributeListAttributeCallback>(callback);
+            chip::Platform::Delete<CHIPUnitTestingAttributeListAttributeCallback>(callback);
         }
     }
 
@@ -12068,7 +12068,7 @@
     static void OnSubscriptionEstablished(void * context)
     {
         CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
-            reinterpret_cast<CHIPTestClusterAttributeListAttributeCallback *>(context)->javaCallbackRef);
+            reinterpret_cast<CHIPUnitTestingAttributeListAttributeCallback *>(context)->javaCallbackRef);
         VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
     };
 
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
index 2e2cdc8..a6200f3 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
@@ -21910,10 +21910,10 @@
         long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
   }
 
-  public static class TestClusterCluster extends BaseChipCluster {
+  public static class UnitTestingCluster extends BaseChipCluster {
     public static final long CLUSTER_ID = 4294048773L;
 
-    public TestClusterCluster(long devicePtr, int endpointId) {
+    public UnitTestingCluster(long devicePtr, int endpointId) {
       super(devicePtr, endpointId);
     }
 
@@ -21970,38 +21970,38 @@
     }
 
     public void testStructArgumentRequest(
-        BooleanResponseCallback callback, ChipStructs.TestClusterClusterSimpleStruct arg1) {
+        BooleanResponseCallback callback, ChipStructs.UnitTestingClusterSimpleStruct arg1) {
       testStructArgumentRequest(chipClusterPtr, callback, arg1, null);
     }
 
     public void testStructArgumentRequest(
         BooleanResponseCallback callback,
-        ChipStructs.TestClusterClusterSimpleStruct arg1,
+        ChipStructs.UnitTestingClusterSimpleStruct arg1,
         int timedInvokeTimeoutMs) {
       testStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs);
     }
 
     public void testNestedStructArgumentRequest(
-        BooleanResponseCallback callback, ChipStructs.TestClusterClusterNestedStruct arg1) {
+        BooleanResponseCallback callback, ChipStructs.UnitTestingClusterNestedStruct arg1) {
       testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, null);
     }
 
     public void testNestedStructArgumentRequest(
         BooleanResponseCallback callback,
-        ChipStructs.TestClusterClusterNestedStruct arg1,
+        ChipStructs.UnitTestingClusterNestedStruct arg1,
         int timedInvokeTimeoutMs) {
       testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs);
     }
 
     public void testListStructArgumentRequest(
         BooleanResponseCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterSimpleStruct> arg1) {
+        ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> arg1) {
       testListStructArgumentRequest(chipClusterPtr, callback, arg1, null);
     }
 
     public void testListStructArgumentRequest(
         BooleanResponseCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterSimpleStruct> arg1,
+        ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> arg1,
         int timedInvokeTimeoutMs) {
       testListStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs);
     }
@@ -22017,26 +22017,26 @@
     }
 
     public void testNestedStructListArgumentRequest(
-        BooleanResponseCallback callback, ChipStructs.TestClusterClusterNestedStructList arg1) {
+        BooleanResponseCallback callback, ChipStructs.UnitTestingClusterNestedStructList arg1) {
       testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null);
     }
 
     public void testNestedStructListArgumentRequest(
         BooleanResponseCallback callback,
-        ChipStructs.TestClusterClusterNestedStructList arg1,
+        ChipStructs.UnitTestingClusterNestedStructList arg1,
         int timedInvokeTimeoutMs) {
       testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs);
     }
 
     public void testListNestedStructListArgumentRequest(
         BooleanResponseCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterNestedStructList> arg1) {
+        ArrayList<ChipStructs.UnitTestingClusterNestedStructList> arg1) {
       testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null);
     }
 
     public void testListNestedStructListArgumentRequest(
         BooleanResponseCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterNestedStructList> arg1,
+        ArrayList<ChipStructs.UnitTestingClusterNestedStructList> arg1,
         int timedInvokeTimeoutMs) {
       testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs);
     }
@@ -22075,13 +22075,13 @@
     }
 
     public void simpleStructEchoRequest(
-        SimpleStructResponseCallback callback, ChipStructs.TestClusterClusterSimpleStruct arg1) {
+        SimpleStructResponseCallback callback, ChipStructs.UnitTestingClusterSimpleStruct arg1) {
       simpleStructEchoRequest(chipClusterPtr, callback, arg1, null);
     }
 
     public void simpleStructEchoRequest(
         SimpleStructResponseCallback callback,
-        ChipStructs.TestClusterClusterSimpleStruct arg1,
+        ChipStructs.UnitTestingClusterSimpleStruct arg1,
         int timedInvokeTimeoutMs) {
       simpleStructEchoRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs);
     }
@@ -22145,19 +22145,19 @@
     private native void testStructArgumentRequest(
         long chipClusterPtr,
         BooleanResponseCallback Callback,
-        ChipStructs.TestClusterClusterSimpleStruct arg1,
+        ChipStructs.UnitTestingClusterSimpleStruct arg1,
         @Nullable Integer timedInvokeTimeoutMs);
 
     private native void testNestedStructArgumentRequest(
         long chipClusterPtr,
         BooleanResponseCallback Callback,
-        ChipStructs.TestClusterClusterNestedStruct arg1,
+        ChipStructs.UnitTestingClusterNestedStruct arg1,
         @Nullable Integer timedInvokeTimeoutMs);
 
     private native void testListStructArgumentRequest(
         long chipClusterPtr,
         BooleanResponseCallback Callback,
-        ArrayList<ChipStructs.TestClusterClusterSimpleStruct> arg1,
+        ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> arg1,
         @Nullable Integer timedInvokeTimeoutMs);
 
     private native void testListInt8UArgumentRequest(
@@ -22169,13 +22169,13 @@
     private native void testNestedStructListArgumentRequest(
         long chipClusterPtr,
         BooleanResponseCallback Callback,
-        ChipStructs.TestClusterClusterNestedStructList arg1,
+        ChipStructs.UnitTestingClusterNestedStructList arg1,
         @Nullable Integer timedInvokeTimeoutMs);
 
     private native void testListNestedStructListArgumentRequest(
         long chipClusterPtr,
         BooleanResponseCallback Callback,
-        ArrayList<ChipStructs.TestClusterClusterNestedStructList> arg1,
+        ArrayList<ChipStructs.UnitTestingClusterNestedStructList> arg1,
         @Nullable Integer timedInvokeTimeoutMs);
 
     private native void testListInt8UReverseRequest(
@@ -22200,7 +22200,7 @@
     private native void simpleStructEchoRequest(
         long chipClusterPtr,
         SimpleStructResponseCallback Callback,
-        ChipStructs.TestClusterClusterSimpleStruct arg1,
+        ChipStructs.UnitTestingClusterSimpleStruct arg1,
         @Nullable Integer timedInvokeTimeoutMs);
 
     private native void timedInvokeRequest(
@@ -22263,7 +22263,7 @@
     }
 
     public interface SimpleStructResponseCallback {
-      void onSuccess(ChipStructs.TestClusterClusterSimpleStruct arg1);
+      void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct arg1);
 
       void onError(Exception error);
     }
@@ -22291,7 +22291,7 @@
     }
 
     public interface ListStructOctetStringAttributeCallback {
-      void onSuccess(List<ChipStructs.TestClusterClusterTestListStructOctet> valueList);
+      void onSuccess(List<ChipStructs.UnitTestingClusterTestListStructOctet> valueList);
 
       void onError(Exception ex);
 
@@ -22307,7 +22307,7 @@
     }
 
     public interface ListNullablesAndOptionalsStructAttributeCallback {
-      void onSuccess(List<ChipStructs.TestClusterClusterNullablesAndOptionalsStruct> valueList);
+      void onSuccess(List<ChipStructs.UnitTestingClusterNullablesAndOptionalsStruct> valueList);
 
       void onError(Exception ex);
 
@@ -22323,7 +22323,7 @@
     }
 
     public interface ListFabricScopedAttributeCallback {
-      void onSuccess(List<ChipStructs.TestClusterClusterTestFabricScoped> valueList);
+      void onSuccess(List<ChipStructs.UnitTestingClusterTestFabricScoped> valueList);
 
       void onError(Exception ex);
 
@@ -23122,13 +23122,13 @@
 
     public void writeListStructOctetStringAttribute(
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterTestListStructOctet> value) {
+        ArrayList<ChipStructs.UnitTestingClusterTestListStructOctet> value) {
       writeListStructOctetStringAttribute(chipClusterPtr, callback, value, null);
     }
 
     public void writeListStructOctetStringAttribute(
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterTestListStructOctet> value,
+        ArrayList<ChipStructs.UnitTestingClusterTestListStructOctet> value,
         int timedWriteTimeoutMs) {
       writeListStructOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs);
     }
@@ -23253,13 +23253,13 @@
 
     public void writeListNullablesAndOptionalsStructAttribute(
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterNullablesAndOptionalsStruct> value) {
+        ArrayList<ChipStructs.UnitTestingClusterNullablesAndOptionalsStruct> value) {
       writeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, value, null);
     }
 
     public void writeListNullablesAndOptionalsStructAttribute(
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterNullablesAndOptionalsStruct> value,
+        ArrayList<ChipStructs.UnitTestingClusterNullablesAndOptionalsStruct> value,
         int timedWriteTimeoutMs) {
       writeListNullablesAndOptionalsStructAttribute(
           chipClusterPtr, callback, value, timedWriteTimeoutMs);
@@ -23390,13 +23390,13 @@
 
     public void writeListFabricScopedAttribute(
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterTestFabricScoped> value) {
+        ArrayList<ChipStructs.UnitTestingClusterTestFabricScoped> value) {
       writeListFabricScopedAttribute(chipClusterPtr, callback, value, null);
     }
 
     public void writeListFabricScopedAttribute(
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterTestFabricScoped> value,
+        ArrayList<ChipStructs.UnitTestingClusterTestFabricScoped> value,
         int timedWriteTimeoutMs) {
       writeListFabricScopedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs);
     }
@@ -24439,7 +24439,7 @@
     private native void writeListStructOctetStringAttribute(
         long chipClusterPtr,
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterTestListStructOctet> value,
+        ArrayList<ChipStructs.UnitTestingClusterTestListStructOctet> value,
         @Nullable Integer timedWriteTimeoutMs);
 
     private native void subscribeListStructOctetStringAttribute(
@@ -24533,7 +24533,7 @@
     private native void writeListNullablesAndOptionalsStructAttribute(
         long chipClusterPtr,
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterNullablesAndOptionalsStruct> value,
+        ArrayList<ChipStructs.UnitTestingClusterNullablesAndOptionalsStruct> value,
         @Nullable Integer timedWriteTimeoutMs);
 
     private native void subscribeListNullablesAndOptionalsStructAttribute(
@@ -24623,7 +24623,7 @@
     private native void writeListFabricScopedAttribute(
         long chipClusterPtr,
         DefaultClusterCallback callback,
-        ArrayList<ChipStructs.TestClusterClusterTestFabricScoped> value,
+        ArrayList<ChipStructs.UnitTestingClusterTestFabricScoped> value,
         @Nullable Integer timedWriteTimeoutMs);
 
     private native void subscribeListFabricScopedAttribute(
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java
index c3d450d..f2cadef 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java
@@ -1227,20 +1227,20 @@
     }
   }
 
-  public static class TestClusterClusterTestEventEvent {
+  public static class UnitTestingClusterTestEventEvent {
     public Integer arg1;
     public Integer arg2;
     public Boolean arg3;
-    public ChipStructs.TestClusterClusterSimpleStruct arg4;
-    public ArrayList<ChipStructs.TestClusterClusterSimpleStruct> arg5;
+    public ChipStructs.UnitTestingClusterSimpleStruct arg4;
+    public ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> arg5;
     public ArrayList<Object> arg6;
 
-    public TestClusterClusterTestEventEvent(
+    public UnitTestingClusterTestEventEvent(
         Integer arg1,
         Integer arg2,
         Boolean arg3,
-        ChipStructs.TestClusterClusterSimpleStruct arg4,
-        ArrayList<ChipStructs.TestClusterClusterSimpleStruct> arg5,
+        ChipStructs.UnitTestingClusterSimpleStruct arg4,
+        ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> arg5,
         ArrayList<Object> arg6) {
       this.arg1 = arg1;
       this.arg2 = arg2;
@@ -1253,7 +1253,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterTestEventEvent {\n");
+      output.append("UnitTestingClusterTestEventEvent {\n");
       output.append("\targ1: ");
       output.append(arg1);
       output.append("\n");
@@ -1277,17 +1277,17 @@
     }
   }
 
-  public static class TestClusterClusterTestFabricScopedEventEvent {
+  public static class UnitTestingClusterTestFabricScopedEventEvent {
     public Integer fabricIndex;
 
-    public TestClusterClusterTestFabricScopedEventEvent(Integer fabricIndex) {
+    public UnitTestingClusterTestFabricScopedEventEvent(Integer fabricIndex) {
       this.fabricIndex = fabricIndex;
     }
 
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterTestFabricScopedEventEvent {\n");
+      output.append("UnitTestingClusterTestFabricScopedEventEvent {\n");
       output.append("\tfabricIndex: ");
       output.append(fabricIndex);
       output.append("\n");
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java
index ff79001..46be764 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java
@@ -218,7 +218,7 @@
       return "ElectricalMeasurement";
     }
     if (clusterId == 4294048773L) {
-      return "TestCluster";
+      return "UnitTesting";
     }
     return "";
   }
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java
index eb9c76a..19873b0 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java
@@ -1827,7 +1827,7 @@
     }
   }
 
-  public static class TestClusterClusterSimpleStruct {
+  public static class UnitTestingClusterSimpleStruct {
     public Integer a;
     public Boolean b;
     public Integer c;
@@ -1837,7 +1837,7 @@
     public Float g;
     public Double h;
 
-    public TestClusterClusterSimpleStruct(
+    public UnitTestingClusterSimpleStruct(
         Integer a, Boolean b, Integer c, byte[] d, String e, Integer f, Float g, Double h) {
       this.a = a;
       this.b = b;
@@ -1852,7 +1852,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterSimpleStruct {\n");
+      output.append("UnitTestingClusterSimpleStruct {\n");
       output.append("\ta: ");
       output.append(a);
       output.append("\n");
@@ -1882,23 +1882,23 @@
     }
   }
 
-  public static class TestClusterClusterTestFabricScoped {
+  public static class UnitTestingClusterTestFabricScoped {
     public Integer fabricSensitiveInt8u;
     public Optional<Integer> optionalFabricSensitiveInt8u;
     public @Nullable Integer nullableFabricSensitiveInt8u;
     public @Nullable Optional<Integer> nullableOptionalFabricSensitiveInt8u;
     public String fabricSensitiveCharString;
-    public ChipStructs.TestClusterClusterSimpleStruct fabricSensitiveStruct;
+    public ChipStructs.UnitTestingClusterSimpleStruct fabricSensitiveStruct;
     public ArrayList<Object> fabricSensitiveInt8uList;
     public Integer fabricIndex;
 
-    public TestClusterClusterTestFabricScoped(
+    public UnitTestingClusterTestFabricScoped(
         Integer fabricSensitiveInt8u,
         Optional<Integer> optionalFabricSensitiveInt8u,
         @Nullable Integer nullableFabricSensitiveInt8u,
         @Nullable Optional<Integer> nullableOptionalFabricSensitiveInt8u,
         String fabricSensitiveCharString,
-        ChipStructs.TestClusterClusterSimpleStruct fabricSensitiveStruct,
+        ChipStructs.UnitTestingClusterSimpleStruct fabricSensitiveStruct,
         ArrayList<Object> fabricSensitiveInt8uList,
         Integer fabricIndex) {
       this.fabricSensitiveInt8u = fabricSensitiveInt8u;
@@ -1914,7 +1914,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterTestFabricScoped {\n");
+      output.append("UnitTestingClusterTestFabricScoped {\n");
       output.append("\tfabricSensitiveInt8u: ");
       output.append(fabricSensitiveInt8u);
       output.append("\n");
@@ -1944,30 +1944,30 @@
     }
   }
 
-  public static class TestClusterClusterNullablesAndOptionalsStruct {
+  public static class UnitTestingClusterNullablesAndOptionalsStruct {
     public @Nullable Integer nullableInt;
     public Optional<Integer> optionalInt;
     public @Nullable Optional<Integer> nullableOptionalInt;
     public @Nullable String nullableString;
     public Optional<String> optionalString;
     public @Nullable Optional<String> nullableOptionalString;
-    public @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct;
-    public Optional<ChipStructs.TestClusterClusterSimpleStruct> optionalStruct;
-    public @Nullable Optional<ChipStructs.TestClusterClusterSimpleStruct> nullableOptionalStruct;
+    public @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct;
+    public Optional<ChipStructs.UnitTestingClusterSimpleStruct> optionalStruct;
+    public @Nullable Optional<ChipStructs.UnitTestingClusterSimpleStruct> nullableOptionalStruct;
     public @Nullable ArrayList<Object> nullableList;
     public Optional<ArrayList<Object>> optionalList;
     public @Nullable Optional<ArrayList<Object>> nullableOptionalList;
 
-    public TestClusterClusterNullablesAndOptionalsStruct(
+    public UnitTestingClusterNullablesAndOptionalsStruct(
         @Nullable Integer nullableInt,
         Optional<Integer> optionalInt,
         @Nullable Optional<Integer> nullableOptionalInt,
         @Nullable String nullableString,
         Optional<String> optionalString,
         @Nullable Optional<String> nullableOptionalString,
-        @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct,
-        Optional<ChipStructs.TestClusterClusterSimpleStruct> optionalStruct,
-        @Nullable Optional<ChipStructs.TestClusterClusterSimpleStruct> nullableOptionalStruct,
+        @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct,
+        Optional<ChipStructs.UnitTestingClusterSimpleStruct> optionalStruct,
+        @Nullable Optional<ChipStructs.UnitTestingClusterSimpleStruct> nullableOptionalStruct,
         @Nullable ArrayList<Object> nullableList,
         Optional<ArrayList<Object>> optionalList,
         @Nullable Optional<ArrayList<Object>> nullableOptionalList) {
@@ -1988,7 +1988,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterNullablesAndOptionalsStruct {\n");
+      output.append("UnitTestingClusterNullablesAndOptionalsStruct {\n");
       output.append("\tnullableInt: ");
       output.append(nullableInt);
       output.append("\n");
@@ -2030,13 +2030,13 @@
     }
   }
 
-  public static class TestClusterClusterNestedStruct {
+  public static class UnitTestingClusterNestedStruct {
     public Integer a;
     public Boolean b;
-    public ChipStructs.TestClusterClusterSimpleStruct c;
+    public ChipStructs.UnitTestingClusterSimpleStruct c;
 
-    public TestClusterClusterNestedStruct(
-        Integer a, Boolean b, ChipStructs.TestClusterClusterSimpleStruct c) {
+    public UnitTestingClusterNestedStruct(
+        Integer a, Boolean b, ChipStructs.UnitTestingClusterSimpleStruct c) {
       this.a = a;
       this.b = b;
       this.c = c;
@@ -2045,7 +2045,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterNestedStruct {\n");
+      output.append("UnitTestingClusterNestedStruct {\n");
       output.append("\ta: ");
       output.append(a);
       output.append("\n");
@@ -2060,20 +2060,20 @@
     }
   }
 
-  public static class TestClusterClusterNestedStructList {
+  public static class UnitTestingClusterNestedStructList {
     public Integer a;
     public Boolean b;
-    public ChipStructs.TestClusterClusterSimpleStruct c;
-    public ArrayList<ChipStructs.TestClusterClusterSimpleStruct> d;
+    public ChipStructs.UnitTestingClusterSimpleStruct c;
+    public ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> d;
     public ArrayList<Object> e;
     public ArrayList<byte[]> f;
     public ArrayList<Object> g;
 
-    public TestClusterClusterNestedStructList(
+    public UnitTestingClusterNestedStructList(
         Integer a,
         Boolean b,
-        ChipStructs.TestClusterClusterSimpleStruct c,
-        ArrayList<ChipStructs.TestClusterClusterSimpleStruct> d,
+        ChipStructs.UnitTestingClusterSimpleStruct c,
+        ArrayList<ChipStructs.UnitTestingClusterSimpleStruct> d,
         ArrayList<Object> e,
         ArrayList<byte[]> f,
         ArrayList<Object> g) {
@@ -2089,7 +2089,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterNestedStructList {\n");
+      output.append("UnitTestingClusterNestedStructList {\n");
       output.append("\ta: ");
       output.append(a);
       output.append("\n");
@@ -2116,18 +2116,18 @@
     }
   }
 
-  public static class TestClusterClusterDoubleNestedStructList {
-    public ArrayList<ChipStructs.TestClusterClusterNestedStructList> a;
+  public static class UnitTestingClusterDoubleNestedStructList {
+    public ArrayList<ChipStructs.UnitTestingClusterNestedStructList> a;
 
-    public TestClusterClusterDoubleNestedStructList(
-        ArrayList<ChipStructs.TestClusterClusterNestedStructList> a) {
+    public UnitTestingClusterDoubleNestedStructList(
+        ArrayList<ChipStructs.UnitTestingClusterNestedStructList> a) {
       this.a = a;
     }
 
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterDoubleNestedStructList {\n");
+      output.append("UnitTestingClusterDoubleNestedStructList {\n");
       output.append("\ta: ");
       output.append(a);
       output.append("\n");
@@ -2136,11 +2136,11 @@
     }
   }
 
-  public static class TestClusterClusterTestListStructOctet {
+  public static class UnitTestingClusterTestListStructOctet {
     public Long member1;
     public byte[] member2;
 
-    public TestClusterClusterTestListStructOctet(Long member1, byte[] member2) {
+    public UnitTestingClusterTestListStructOctet(Long member1, byte[] member2) {
       this.member1 = member1;
       this.member2 = member2;
     }
@@ -2148,7 +2148,7 @@
     @Override
     public String toString() {
       StringBuilder output = new StringBuilder();
-      output.append("TestClusterClusterTestListStructOctet {\n");
+      output.append("UnitTestingClusterTestListStructOctet {\n");
       output.append("\tmember1: ");
       output.append(member1);
       output.append("\n");
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java
index f1614c4..9a357cb 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java
@@ -6698,7 +6698,7 @@
   }
 
   public static class DelegatedTestSpecificResponseCallback
-      implements ChipClusters.TestClusterCluster.TestSpecificResponseCallback,
+      implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6723,7 +6723,7 @@
   }
 
   public static class DelegatedTestAddArgumentsResponseCallback
-      implements ChipClusters.TestClusterCluster.TestAddArgumentsResponseCallback,
+      implements ChipClusters.UnitTestingCluster.TestAddArgumentsResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6748,7 +6748,7 @@
   }
 
   public static class DelegatedTestListInt8UReverseResponseCallback
-      implements ChipClusters.TestClusterCluster.TestListInt8UReverseResponseCallback,
+      implements ChipClusters.UnitTestingCluster.TestListInt8UReverseResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6772,7 +6772,7 @@
   }
 
   public static class DelegatedTestEnumsResponseCallback
-      implements ChipClusters.TestClusterCluster.TestEnumsResponseCallback,
+      implements ChipClusters.UnitTestingCluster.TestEnumsResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6798,7 +6798,7 @@
   }
 
   public static class DelegatedTestNullableOptionalResponseCallback
-      implements ChipClusters.TestClusterCluster.TestNullableOptionalResponseCallback,
+      implements ChipClusters.UnitTestingCluster.TestNullableOptionalResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6836,7 +6836,7 @@
   }
 
   public static class DelegatedBooleanResponseCallback
-      implements ChipClusters.TestClusterCluster.BooleanResponseCallback, DelegatedClusterCallback {
+      implements ChipClusters.UnitTestingCluster.BooleanResponseCallback, DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
     @Override
@@ -6859,7 +6859,7 @@
   }
 
   public static class DelegatedSimpleStructResponseCallback
-      implements ChipClusters.TestClusterCluster.SimpleStructResponseCallback,
+      implements ChipClusters.UnitTestingCluster.SimpleStructResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6869,7 +6869,7 @@
     }
 
     @Override
-    public void onSuccess(ChipStructs.TestClusterClusterSimpleStruct arg1) {
+    public void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct arg1) {
       Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
       // arg1: Struct SimpleStruct
       // Conversion from this type to Java is not properly implemented yet
@@ -6883,7 +6883,7 @@
   }
 
   public static class DelegatedTestEmitTestEventResponseCallback
-      implements ChipClusters.TestClusterCluster.TestEmitTestEventResponseCallback,
+      implements ChipClusters.UnitTestingCluster.TestEmitTestEventResponseCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6906,8 +6906,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterListInt8uAttributeCallback
-      implements ChipClusters.TestClusterCluster.ListInt8uAttributeCallback,
+  public static class DelegatedUnitTestingClusterListInt8uAttributeCallback
+      implements ChipClusters.UnitTestingCluster.ListInt8uAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6931,8 +6931,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterListOctetStringAttributeCallback
-      implements ChipClusters.TestClusterCluster.ListOctetStringAttributeCallback,
+  public static class DelegatedUnitTestingClusterListOctetStringAttributeCallback
+      implements ChipClusters.UnitTestingCluster.ListOctetStringAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6956,8 +6956,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterListStructOctetStringAttributeCallback
-      implements ChipClusters.TestClusterCluster.ListStructOctetStringAttributeCallback,
+  public static class DelegatedUnitTestingClusterListStructOctetStringAttributeCallback
+      implements ChipClusters.UnitTestingCluster.ListStructOctetStringAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6967,11 +6967,11 @@
     }
 
     @Override
-    public void onSuccess(List<ChipStructs.TestClusterClusterTestListStructOctet> valueList) {
+    public void onSuccess(List<ChipStructs.UnitTestingClusterTestListStructOctet> valueList) {
       Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
       CommandResponseInfo commandResponseInfo =
           new CommandResponseInfo(
-              "valueList", "List<ChipStructs.TestClusterClusterTestListStructOctet>");
+              "valueList", "List<ChipStructs.UnitTestingClusterTestListStructOctet>");
       responseValues.put(commandResponseInfo, valueList);
       callback.onSuccess(responseValues);
     }
@@ -6982,8 +6982,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterListNullablesAndOptionalsStructAttributeCallback
-      implements ChipClusters.TestClusterCluster.ListNullablesAndOptionalsStructAttributeCallback,
+  public static class DelegatedUnitTestingClusterListNullablesAndOptionalsStructAttributeCallback
+      implements ChipClusters.UnitTestingCluster.ListNullablesAndOptionalsStructAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -6994,11 +6994,11 @@
 
     @Override
     public void onSuccess(
-        List<ChipStructs.TestClusterClusterNullablesAndOptionalsStruct> valueList) {
+        List<ChipStructs.UnitTestingClusterNullablesAndOptionalsStruct> valueList) {
       Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
       CommandResponseInfo commandResponseInfo =
           new CommandResponseInfo(
-              "valueList", "List<ChipStructs.TestClusterClusterNullablesAndOptionalsStruct>");
+              "valueList", "List<ChipStructs.UnitTestingClusterNullablesAndOptionalsStruct>");
       responseValues.put(commandResponseInfo, valueList);
       callback.onSuccess(responseValues);
     }
@@ -7009,8 +7009,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterListLongOctetStringAttributeCallback
-      implements ChipClusters.TestClusterCluster.ListLongOctetStringAttributeCallback,
+  public static class DelegatedUnitTestingClusterListLongOctetStringAttributeCallback
+      implements ChipClusters.UnitTestingCluster.ListLongOctetStringAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -7034,8 +7034,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterListFabricScopedAttributeCallback
-      implements ChipClusters.TestClusterCluster.ListFabricScopedAttributeCallback,
+  public static class DelegatedUnitTestingClusterListFabricScopedAttributeCallback
+      implements ChipClusters.UnitTestingCluster.ListFabricScopedAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -7045,11 +7045,11 @@
     }
 
     @Override
-    public void onSuccess(List<ChipStructs.TestClusterClusterTestFabricScoped> valueList) {
+    public void onSuccess(List<ChipStructs.UnitTestingClusterTestFabricScoped> valueList) {
       Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
       CommandResponseInfo commandResponseInfo =
           new CommandResponseInfo(
-              "valueList", "List<ChipStructs.TestClusterClusterTestFabricScoped>");
+              "valueList", "List<ChipStructs.UnitTestingClusterTestFabricScoped>");
       responseValues.put(commandResponseInfo, valueList);
       callback.onSuccess(responseValues);
     }
@@ -7060,8 +7060,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterGeneratedCommandListAttributeCallback
-      implements ChipClusters.TestClusterCluster.GeneratedCommandListAttributeCallback,
+  public static class DelegatedUnitTestingClusterGeneratedCommandListAttributeCallback
+      implements ChipClusters.UnitTestingCluster.GeneratedCommandListAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -7084,8 +7084,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterAcceptedCommandListAttributeCallback
-      implements ChipClusters.TestClusterCluster.AcceptedCommandListAttributeCallback,
+  public static class DelegatedUnitTestingClusterAcceptedCommandListAttributeCallback
+      implements ChipClusters.UnitTestingCluster.AcceptedCommandListAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -7108,8 +7108,8 @@
     }
   }
 
-  public static class DelegatedTestClusterClusterAttributeListAttributeCallback
-      implements ChipClusters.TestClusterCluster.AttributeListAttributeCallback,
+  public static class DelegatedUnitTestingClusterAttributeListAttributeCallback
+      implements ChipClusters.UnitTestingCluster.AttributeListAttributeCallback,
           DelegatedClusterCallback {
     private ClusterCommandCallback callback;
 
@@ -7466,11 +7466,11 @@
             (ptr, endpointId) -> new ChipClusters.ElectricalMeasurementCluster(ptr, endpointId),
             new HashMap<>());
     clusterMap.put("electricalMeasurement", electricalMeasurementClusterInfo);
-    ClusterInfo testClusterClusterInfo =
+    ClusterInfo unitTestingClusterInfo =
         new ClusterInfo(
-            (ptr, endpointId) -> new ChipClusters.TestClusterCluster(ptr, endpointId),
+            (ptr, endpointId) -> new ChipClusters.UnitTestingCluster(ptr, endpointId),
             new HashMap<>());
-    clusterMap.put("testCluster", testClusterClusterInfo);
+    clusterMap.put("unitTesting", unitTestingClusterInfo);
     return clusterMap;
   }
 
@@ -7562,7 +7562,7 @@
     destination.get("applicationBasic").combineCommands(source.get("applicationBasic"));
     destination.get("accountLogin").combineCommands(source.get("accountLogin"));
     destination.get("electricalMeasurement").combineCommands(source.get("electricalMeasurement"));
-    destination.get("testCluster").combineCommands(source.get("testCluster"));
+    destination.get("unitTesting").combineCommands(source.get("unitTesting"));
   }
 
   @SuppressWarnings("unchecked")
@@ -11690,318 +11690,318 @@
     Map<String, InteractionInfo> electricalMeasurementClusterInteractionInfoMap =
         new LinkedHashMap<>();
     commandMap.put("electricalMeasurement", electricalMeasurementClusterInteractionInfoMap);
-    Map<String, InteractionInfo> testClusterClusterInteractionInfoMap = new LinkedHashMap<>();
-    Map<String, CommandParameterInfo> testClustertestCommandParams =
+    Map<String, InteractionInfo> unitTestingClusterInteractionInfoMap = new LinkedHashMap<>();
+    Map<String, CommandParameterInfo> unitTestingtestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestInteractionInfo =
+    InteractionInfo unitTestingtestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster).test((DefaultClusterCallback) callback);
+              ((ChipClusters.UnitTestingCluster) cluster).test((DefaultClusterCallback) callback);
             },
             () -> new DelegatedDefaultClusterCallback(),
-            testClustertestCommandParams);
-    testClusterClusterInteractionInfoMap.put("test", testClustertestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestNotHandledCommandParams =
+            unitTestingtestCommandParams);
+    unitTestingClusterInteractionInfoMap.put("test", unitTestingtestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestNotHandledCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestNotHandledInteractionInfo =
+    InteractionInfo unitTestingtestNotHandledInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testNotHandled((DefaultClusterCallback) callback);
             },
             () -> new DelegatedDefaultClusterCallback(),
-            testClustertestNotHandledCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testNotHandled", testClustertestNotHandledInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestSpecificCommandParams =
+            unitTestingtestNotHandledCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testNotHandled", unitTestingtestNotHandledInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestSpecificCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestSpecificInteractionInfo =
+    InteractionInfo unitTestingtestSpecificInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testSpecific(
-                      (ChipClusters.TestClusterCluster.TestSpecificResponseCallback) callback);
+                      (ChipClusters.UnitTestingCluster.TestSpecificResponseCallback) callback);
             },
             () -> new DelegatedTestSpecificResponseCallback(),
-            testClustertestSpecificCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testSpecific", testClustertestSpecificInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestUnknownCommandCommandParams =
+            unitTestingtestSpecificCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testSpecific", unitTestingtestSpecificInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestUnknownCommandCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestUnknownCommandInteractionInfo =
+    InteractionInfo unitTestingtestUnknownCommandInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testUnknownCommand((DefaultClusterCallback) callback);
             },
             () -> new DelegatedDefaultClusterCallback(),
-            testClustertestUnknownCommandCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testUnknownCommand", testClustertestUnknownCommandInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestAddArgumentsCommandParams =
+            unitTestingtestUnknownCommandCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testUnknownCommand", unitTestingtestUnknownCommandInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestAddArgumentsCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestAddArgumentsarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestAddArgumentsarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", Integer.class, Integer.class);
-    testClustertestAddArgumentsCommandParams.put(
-        "arg1", testClustertestAddArgumentsarg1CommandParameterInfo);
+    unitTestingtestAddArgumentsCommandParams.put(
+        "arg1", unitTestingtestAddArgumentsarg1CommandParameterInfo);
 
-    CommandParameterInfo testClustertestAddArgumentsarg2CommandParameterInfo =
+    CommandParameterInfo unitTestingtestAddArgumentsarg2CommandParameterInfo =
         new CommandParameterInfo("arg2", Integer.class, Integer.class);
-    testClustertestAddArgumentsCommandParams.put(
-        "arg2", testClustertestAddArgumentsarg2CommandParameterInfo);
+    unitTestingtestAddArgumentsCommandParams.put(
+        "arg2", unitTestingtestAddArgumentsarg2CommandParameterInfo);
 
-    InteractionInfo testClustertestAddArgumentsInteractionInfo =
+    InteractionInfo unitTestingtestAddArgumentsInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testAddArguments(
-                      (ChipClusters.TestClusterCluster.TestAddArgumentsResponseCallback) callback,
+                      (ChipClusters.UnitTestingCluster.TestAddArgumentsResponseCallback) callback,
                       (Integer) commandArguments.get("arg1"),
                       (Integer) commandArguments.get("arg2"));
             },
             () -> new DelegatedTestAddArgumentsResponseCallback(),
-            testClustertestAddArgumentsCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testAddArguments", testClustertestAddArgumentsInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestStructArgumentRequestCommandParams =
+            unitTestingtestAddArgumentsCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testAddArguments", unitTestingtestAddArgumentsInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestStructArgumentRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestStructArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestStructArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testStructArgumentRequest(
-                      (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback,
-                      (ChipStructs.TestClusterClusterSimpleStruct) commandArguments.get("arg1"));
+                      (ChipClusters.UnitTestingCluster.BooleanResponseCallback) callback,
+                      (ChipStructs.UnitTestingClusterSimpleStruct) commandArguments.get("arg1"));
             },
             () -> new DelegatedBooleanResponseCallback(),
-            testClustertestStructArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testStructArgumentRequest", testClustertestStructArgumentRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestNestedStructArgumentRequestCommandParams =
+            unitTestingtestStructArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testStructArgumentRequest", unitTestingtestStructArgumentRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestNestedStructArgumentRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestNestedStructArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestNestedStructArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testNestedStructArgumentRequest(
-                      (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback,
-                      (ChipStructs.TestClusterClusterNestedStruct) commandArguments.get("arg1"));
+                      (ChipClusters.UnitTestingCluster.BooleanResponseCallback) callback,
+                      (ChipStructs.UnitTestingClusterNestedStruct) commandArguments.get("arg1"));
             },
             () -> new DelegatedBooleanResponseCallback(),
-            testClustertestNestedStructArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
+            unitTestingtestNestedStructArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
         "testNestedStructArgumentRequest",
-        testClustertestNestedStructArgumentRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestListStructArgumentRequestCommandParams =
+        unitTestingtestNestedStructArgumentRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestListStructArgumentRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestListStructArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestListStructArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testListStructArgumentRequest(
-                      (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback,
-                      (ArrayList<ChipStructs.TestClusterClusterSimpleStruct>)
+                      (ChipClusters.UnitTestingCluster.BooleanResponseCallback) callback,
+                      (ArrayList<ChipStructs.UnitTestingClusterSimpleStruct>)
                           commandArguments.get("arg1"));
             },
             () -> new DelegatedBooleanResponseCallback(),
-            testClustertestListStructArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testListStructArgumentRequest", testClustertestListStructArgumentRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestListInt8UArgumentRequestCommandParams =
+            unitTestingtestListStructArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testListStructArgumentRequest", unitTestingtestListStructArgumentRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestListInt8UArgumentRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestListInt8UArgumentRequestarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestListInt8UArgumentRequestarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", ArrayList.class, Object.class);
-    testClustertestListInt8UArgumentRequestCommandParams.put(
-        "arg1", testClustertestListInt8UArgumentRequestarg1CommandParameterInfo);
+    unitTestingtestListInt8UArgumentRequestCommandParams.put(
+        "arg1", unitTestingtestListInt8UArgumentRequestarg1CommandParameterInfo);
 
-    InteractionInfo testClustertestListInt8UArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestListInt8UArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testListInt8UArgumentRequest(
-                      (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback,
+                      (ChipClusters.UnitTestingCluster.BooleanResponseCallback) callback,
                       (ArrayList<Integer>) commandArguments.get("arg1"));
             },
             () -> new DelegatedBooleanResponseCallback(),
-            testClustertestListInt8UArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testListInt8UArgumentRequest", testClustertestListInt8UArgumentRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestNestedStructListArgumentRequestCommandParams =
+            unitTestingtestListInt8UArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testListInt8UArgumentRequest", unitTestingtestListInt8UArgumentRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestNestedStructListArgumentRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestNestedStructListArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestNestedStructListArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testNestedStructListArgumentRequest(
-                      (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback,
-                      (ChipStructs.TestClusterClusterNestedStructList)
+                      (ChipClusters.UnitTestingCluster.BooleanResponseCallback) callback,
+                      (ChipStructs.UnitTestingClusterNestedStructList)
                           commandArguments.get("arg1"));
             },
             () -> new DelegatedBooleanResponseCallback(),
-            testClustertestNestedStructListArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
+            unitTestingtestNestedStructListArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
         "testNestedStructListArgumentRequest",
-        testClustertestNestedStructListArgumentRequestInteractionInfo);
+        unitTestingtestNestedStructListArgumentRequestInteractionInfo);
     Map<String, CommandParameterInfo>
-        testClustertestListNestedStructListArgumentRequestCommandParams =
+        unitTestingtestListNestedStructListArgumentRequestCommandParams =
             new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertestListNestedStructListArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestListNestedStructListArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testListNestedStructListArgumentRequest(
-                      (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback,
-                      (ArrayList<ChipStructs.TestClusterClusterNestedStructList>)
+                      (ChipClusters.UnitTestingCluster.BooleanResponseCallback) callback,
+                      (ArrayList<ChipStructs.UnitTestingClusterNestedStructList>)
                           commandArguments.get("arg1"));
             },
             () -> new DelegatedBooleanResponseCallback(),
-            testClustertestListNestedStructListArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
+            unitTestingtestListNestedStructListArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
         "testListNestedStructListArgumentRequest",
-        testClustertestListNestedStructListArgumentRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestListInt8UReverseRequestCommandParams =
+        unitTestingtestListNestedStructListArgumentRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestListInt8UReverseRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestListInt8UReverseRequestarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestListInt8UReverseRequestarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", ArrayList.class, Object.class);
-    testClustertestListInt8UReverseRequestCommandParams.put(
-        "arg1", testClustertestListInt8UReverseRequestarg1CommandParameterInfo);
+    unitTestingtestListInt8UReverseRequestCommandParams.put(
+        "arg1", unitTestingtestListInt8UReverseRequestarg1CommandParameterInfo);
 
-    InteractionInfo testClustertestListInt8UReverseRequestInteractionInfo =
+    InteractionInfo unitTestingtestListInt8UReverseRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testListInt8UReverseRequest(
-                      (ChipClusters.TestClusterCluster.TestListInt8UReverseResponseCallback)
+                      (ChipClusters.UnitTestingCluster.TestListInt8UReverseResponseCallback)
                           callback,
                       (ArrayList<Integer>) commandArguments.get("arg1"));
             },
             () -> new DelegatedTestListInt8UReverseResponseCallback(),
-            testClustertestListInt8UReverseRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testListInt8UReverseRequest", testClustertestListInt8UReverseRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestEnumsRequestCommandParams =
+            unitTestingtestListInt8UReverseRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testListInt8UReverseRequest", unitTestingtestListInt8UReverseRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestEnumsRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestEnumsRequestarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestEnumsRequestarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", Integer.class, Integer.class);
-    testClustertestEnumsRequestCommandParams.put(
-        "arg1", testClustertestEnumsRequestarg1CommandParameterInfo);
+    unitTestingtestEnumsRequestCommandParams.put(
+        "arg1", unitTestingtestEnumsRequestarg1CommandParameterInfo);
 
-    CommandParameterInfo testClustertestEnumsRequestarg2CommandParameterInfo =
+    CommandParameterInfo unitTestingtestEnumsRequestarg2CommandParameterInfo =
         new CommandParameterInfo("arg2", Integer.class, Integer.class);
-    testClustertestEnumsRequestCommandParams.put(
-        "arg2", testClustertestEnumsRequestarg2CommandParameterInfo);
+    unitTestingtestEnumsRequestCommandParams.put(
+        "arg2", unitTestingtestEnumsRequestarg2CommandParameterInfo);
 
-    InteractionInfo testClustertestEnumsRequestInteractionInfo =
+    InteractionInfo unitTestingtestEnumsRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testEnumsRequest(
-                      (ChipClusters.TestClusterCluster.TestEnumsResponseCallback) callback,
+                      (ChipClusters.UnitTestingCluster.TestEnumsResponseCallback) callback,
                       (Integer) commandArguments.get("arg1"),
                       (Integer) commandArguments.get("arg2"));
             },
             () -> new DelegatedTestEnumsResponseCallback(),
-            testClustertestEnumsRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testEnumsRequest", testClustertestEnumsRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestNullableOptionalRequestCommandParams =
+            unitTestingtestEnumsRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testEnumsRequest", unitTestingtestEnumsRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestNullableOptionalRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestNullableOptionalRequestarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestNullableOptionalRequestarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", Optional.class, Integer.class);
-    testClustertestNullableOptionalRequestCommandParams.put(
-        "arg1", testClustertestNullableOptionalRequestarg1CommandParameterInfo);
+    unitTestingtestNullableOptionalRequestCommandParams.put(
+        "arg1", unitTestingtestNullableOptionalRequestarg1CommandParameterInfo);
 
-    InteractionInfo testClustertestNullableOptionalRequestInteractionInfo =
+    InteractionInfo unitTestingtestNullableOptionalRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testNullableOptionalRequest(
-                      (ChipClusters.TestClusterCluster.TestNullableOptionalResponseCallback)
+                      (ChipClusters.UnitTestingCluster.TestNullableOptionalResponseCallback)
                           callback,
                       (Optional<Integer>) commandArguments.get("arg1"));
             },
             () -> new DelegatedTestNullableOptionalResponseCallback(),
-            testClustertestNullableOptionalRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testNullableOptionalRequest", testClustertestNullableOptionalRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustersimpleStructEchoRequestCommandParams =
+            unitTestingtestNullableOptionalRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testNullableOptionalRequest", unitTestingtestNullableOptionalRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingsimpleStructEchoRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustersimpleStructEchoRequestInteractionInfo =
+    InteractionInfo unitTestingsimpleStructEchoRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .simpleStructEchoRequest(
-                      (ChipClusters.TestClusterCluster.SimpleStructResponseCallback) callback,
-                      (ChipStructs.TestClusterClusterSimpleStruct) commandArguments.get("arg1"));
+                      (ChipClusters.UnitTestingCluster.SimpleStructResponseCallback) callback,
+                      (ChipStructs.UnitTestingClusterSimpleStruct) commandArguments.get("arg1"));
             },
             () -> new DelegatedSimpleStructResponseCallback(),
-            testClustersimpleStructEchoRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "simpleStructEchoRequest", testClustersimpleStructEchoRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertimedInvokeRequestCommandParams =
+            unitTestingsimpleStructEchoRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "simpleStructEchoRequest", unitTestingsimpleStructEchoRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtimedInvokeRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo testClustertimedInvokeRequestInteractionInfo =
+    InteractionInfo unitTestingtimedInvokeRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .timedInvokeRequest((DefaultClusterCallback) callback, 10000);
             },
             () -> new DelegatedDefaultClusterCallback(),
-            testClustertimedInvokeRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "timedInvokeRequest", testClustertimedInvokeRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestSimpleOptionalArgumentRequestCommandParams =
+            unitTestingtimedInvokeRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "timedInvokeRequest", unitTestingtimedInvokeRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestSimpleOptionalArgumentRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestSimpleOptionalArgumentRequestarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestSimpleOptionalArgumentRequestarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", Optional.class, Boolean.class);
-    testClustertestSimpleOptionalArgumentRequestCommandParams.put(
-        "arg1", testClustertestSimpleOptionalArgumentRequestarg1CommandParameterInfo);
+    unitTestingtestSimpleOptionalArgumentRequestCommandParams.put(
+        "arg1", unitTestingtestSimpleOptionalArgumentRequestarg1CommandParameterInfo);
 
-    InteractionInfo testClustertestSimpleOptionalArgumentRequestInteractionInfo =
+    InteractionInfo unitTestingtestSimpleOptionalArgumentRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testSimpleOptionalArgumentRequest(
                       (DefaultClusterCallback) callback,
                       (Optional<Boolean>) commandArguments.get("arg1"));
             },
             () -> new DelegatedDefaultClusterCallback(),
-            testClustertestSimpleOptionalArgumentRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
+            unitTestingtestSimpleOptionalArgumentRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
         "testSimpleOptionalArgumentRequest",
-        testClustertestSimpleOptionalArgumentRequestInteractionInfo);
-    Map<String, CommandParameterInfo> testClustertestEmitTestEventRequestCommandParams =
+        unitTestingtestSimpleOptionalArgumentRequestInteractionInfo);
+    Map<String, CommandParameterInfo> unitTestingtestEmitTestEventRequestCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertestEmitTestEventRequestarg1CommandParameterInfo =
+    CommandParameterInfo unitTestingtestEmitTestEventRequestarg1CommandParameterInfo =
         new CommandParameterInfo("arg1", Integer.class, Integer.class);
-    testClustertestEmitTestEventRequestCommandParams.put(
-        "arg1", testClustertestEmitTestEventRequestarg1CommandParameterInfo);
+    unitTestingtestEmitTestEventRequestCommandParams.put(
+        "arg1", unitTestingtestEmitTestEventRequestarg1CommandParameterInfo);
 
-    CommandParameterInfo testClustertestEmitTestEventRequestarg2CommandParameterInfo =
+    CommandParameterInfo unitTestingtestEmitTestEventRequestarg2CommandParameterInfo =
         new CommandParameterInfo("arg2", Integer.class, Integer.class);
-    testClustertestEmitTestEventRequestCommandParams.put(
-        "arg2", testClustertestEmitTestEventRequestarg2CommandParameterInfo);
+    unitTestingtestEmitTestEventRequestCommandParams.put(
+        "arg2", unitTestingtestEmitTestEventRequestarg2CommandParameterInfo);
 
-    CommandParameterInfo testClustertestEmitTestEventRequestarg3CommandParameterInfo =
+    CommandParameterInfo unitTestingtestEmitTestEventRequestarg3CommandParameterInfo =
         new CommandParameterInfo("arg3", Boolean.class, Boolean.class);
-    testClustertestEmitTestEventRequestCommandParams.put(
-        "arg3", testClustertestEmitTestEventRequestarg3CommandParameterInfo);
+    unitTestingtestEmitTestEventRequestCommandParams.put(
+        "arg3", unitTestingtestEmitTestEventRequestarg3CommandParameterInfo);
 
-    InteractionInfo testClustertestEmitTestEventRequestInteractionInfo =
+    InteractionInfo unitTestingtestEmitTestEventRequestInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .testEmitTestEventRequest(
-                      (ChipClusters.TestClusterCluster.TestEmitTestEventResponseCallback) callback,
+                      (ChipClusters.UnitTestingCluster.TestEmitTestEventResponseCallback) callback,
                       (Integer) commandArguments.get("arg1"),
                       (Integer) commandArguments.get("arg2"),
                       (Boolean) commandArguments.get("arg3"));
             },
             () -> new DelegatedTestEmitTestEventResponseCallback(),
-            testClustertestEmitTestEventRequestCommandParams);
-    testClusterClusterInteractionInfoMap.put(
-        "testEmitTestEventRequest", testClustertestEmitTestEventRequestInteractionInfo);
-    commandMap.put("testCluster", testClusterClusterInteractionInfoMap);
+            unitTestingtestEmitTestEventRequestCommandParams);
+    unitTestingClusterInteractionInfoMap.put(
+        "testEmitTestEventRequest", unitTestingtestEmitTestEventRequestInteractionInfo);
+    commandMap.put("unitTesting", unitTestingClusterInteractionInfoMap);
     return commandMap;
   }
 }
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java
index 4991078..49837fd 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java
@@ -11316,1117 +11316,1117 @@
         "readClusterRevisionAttribute",
         readElectricalMeasurementClusterRevisionAttributeInteractionInfo);
     readAttributeMap.put("electricalMeasurement", readElectricalMeasurementInteractionInfo);
-    Map<String, InteractionInfo> readTestClusterInteractionInfo = new LinkedHashMap<>();
-    Map<String, CommandParameterInfo> readTestClusterBooleanCommandParams =
+    Map<String, InteractionInfo> readUnitTestingInteractionInfo = new LinkedHashMap<>();
+    Map<String, CommandParameterInfo> readUnitTestingBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterBooleanAttributeInteractionInfo =
+    InteractionInfo readUnitTestingBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readBooleanAttribute((ChipClusters.BooleanAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
-            readTestClusterBooleanCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readBooleanAttribute", readTestClusterBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterBitmap8CommandParams =
+            readUnitTestingBooleanCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readBooleanAttribute", readUnitTestingBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingBitmap8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterBitmap8AttributeInteractionInfo =
+    InteractionInfo readUnitTestingBitmap8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readBitmap8Attribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterBitmap8CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readBitmap8Attribute", readTestClusterBitmap8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterBitmap16CommandParams =
+            readUnitTestingBitmap8CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readBitmap8Attribute", readUnitTestingBitmap8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingBitmap16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterBitmap16AttributeInteractionInfo =
+    InteractionInfo readUnitTestingBitmap16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readBitmap16Attribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterBitmap16CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readBitmap16Attribute", readTestClusterBitmap16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterBitmap32CommandParams =
+            readUnitTestingBitmap16CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readBitmap16Attribute", readUnitTestingBitmap16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingBitmap32CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterBitmap32AttributeInteractionInfo =
+    InteractionInfo readUnitTestingBitmap32AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readBitmap32Attribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterBitmap32CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readBitmap32Attribute", readTestClusterBitmap32AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterBitmap64CommandParams =
+            readUnitTestingBitmap32CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readBitmap32Attribute", readUnitTestingBitmap32AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingBitmap64CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterBitmap64AttributeInteractionInfo =
+    InteractionInfo readUnitTestingBitmap64AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readBitmap64Attribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterBitmap64CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readBitmap64Attribute", readTestClusterBitmap64AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt8uCommandParams =
+            readUnitTestingBitmap64CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readBitmap64Attribute", readUnitTestingBitmap64AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt8uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt8uAttribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterInt8uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt8uAttribute", readTestClusterInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt16uCommandParams =
+            readUnitTestingInt8uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt8uAttribute", readUnitTestingInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt16uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt16uAttribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterInt16uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt16uAttribute", readTestClusterInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt24uCommandParams =
+            readUnitTestingInt16uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt16uAttribute", readUnitTestingInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt24uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt24uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt24uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt24uAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt24uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt24uAttribute", readTestClusterInt24uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt32uCommandParams =
+            readUnitTestingInt24uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt24uAttribute", readUnitTestingInt24uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt32uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt32uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt32uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt32uAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt32uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt32uAttribute", readTestClusterInt32uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt40uCommandParams =
+            readUnitTestingInt32uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt32uAttribute", readUnitTestingInt32uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt40uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt40uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt40uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt40uAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt40uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt40uAttribute", readTestClusterInt40uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt48uCommandParams =
+            readUnitTestingInt40uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt40uAttribute", readUnitTestingInt40uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt48uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt48uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt48uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt48uAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt48uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt48uAttribute", readTestClusterInt48uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt56uCommandParams =
+            readUnitTestingInt48uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt48uAttribute", readUnitTestingInt48uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt56uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt56uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt56uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt56uAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt56uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt56uAttribute", readTestClusterInt56uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt64uCommandParams =
+            readUnitTestingInt56uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt56uAttribute", readUnitTestingInt56uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt64uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt64uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt64uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt64uAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt64uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt64uAttribute", readTestClusterInt64uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt8sCommandParams =
+            readUnitTestingInt64uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt64uAttribute", readUnitTestingInt64uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt8sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt8sAttribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterInt8sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt8sAttribute", readTestClusterInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt16sCommandParams =
+            readUnitTestingInt8sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt8sAttribute", readUnitTestingInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt16sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt16sAttribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterInt16sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt16sAttribute", readTestClusterInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt24sCommandParams =
+            readUnitTestingInt16sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt16sAttribute", readUnitTestingInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt24sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt24sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt24sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt24sAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt24sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt24sAttribute", readTestClusterInt24sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt32sCommandParams =
+            readUnitTestingInt24sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt24sAttribute", readUnitTestingInt24sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt32sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt32sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt32sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt32sAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt32sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt32sAttribute", readTestClusterInt32sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt40sCommandParams =
+            readUnitTestingInt32sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt32sAttribute", readUnitTestingInt32sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt40sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt40sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt40sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt40sAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt40sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt40sAttribute", readTestClusterInt40sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt48sCommandParams =
+            readUnitTestingInt40sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt40sAttribute", readUnitTestingInt40sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt48sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt48sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt48sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt48sAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt48sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt48sAttribute", readTestClusterInt48sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt56sCommandParams =
+            readUnitTestingInt48sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt48sAttribute", readUnitTestingInt48sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt56sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt56sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt56sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt56sAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt56sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt56sAttribute", readTestClusterInt56sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterInt64sCommandParams =
+            readUnitTestingInt56sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt56sAttribute", readUnitTestingInt56sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingInt64sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterInt64sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingInt64sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readInt64sAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterInt64sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readInt64sAttribute", readTestClusterInt64sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterEnum8CommandParams =
+            readUnitTestingInt64sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readInt64sAttribute", readUnitTestingInt64sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingEnum8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterEnum8AttributeInteractionInfo =
+    InteractionInfo readUnitTestingEnum8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readEnum8Attribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterEnum8CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readEnum8Attribute", readTestClusterEnum8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterEnum16CommandParams =
+            readUnitTestingEnum8CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readEnum8Attribute", readUnitTestingEnum8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingEnum16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterEnum16AttributeInteractionInfo =
+    InteractionInfo readUnitTestingEnum16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readEnum16Attribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterEnum16CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readEnum16Attribute", readTestClusterEnum16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterFloatSingleCommandParams =
+            readUnitTestingEnum16CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readEnum16Attribute", readUnitTestingEnum16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingFloatSingleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterFloatSingleAttributeInteractionInfo =
+    InteractionInfo readUnitTestingFloatSingleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readFloatSingleAttribute((ChipClusters.FloatAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedFloatAttributeCallback(),
-            readTestClusterFloatSingleCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readFloatSingleAttribute", readTestClusterFloatSingleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterFloatDoubleCommandParams =
+            readUnitTestingFloatSingleCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readFloatSingleAttribute", readUnitTestingFloatSingleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingFloatDoubleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterFloatDoubleAttributeInteractionInfo =
+    InteractionInfo readUnitTestingFloatDoubleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readFloatDoubleAttribute((ChipClusters.DoubleAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedDoubleAttributeCallback(),
-            readTestClusterFloatDoubleCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readFloatDoubleAttribute", readTestClusterFloatDoubleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterOctetStringCommandParams =
+            readUnitTestingFloatDoubleCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readFloatDoubleAttribute", readUnitTestingFloatDoubleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterOctetStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readOctetStringAttribute((ChipClusters.OctetStringAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(),
-            readTestClusterOctetStringCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readOctetStringAttribute", readTestClusterOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterListInt8uCommandParams =
+            readUnitTestingOctetStringCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readOctetStringAttribute", readUnitTestingOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingListInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterListInt8uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingListInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readListInt8uAttribute(
-                      (ChipClusters.TestClusterCluster.ListInt8uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.ListInt8uAttributeCallback) callback);
             },
-            () -> new ClusterInfoMapping.DelegatedTestClusterClusterListInt8uAttributeCallback(),
-            readTestClusterListInt8uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readListInt8uAttribute", readTestClusterListInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterListOctetStringCommandParams =
+            () -> new ClusterInfoMapping.DelegatedUnitTestingClusterListInt8uAttributeCallback(),
+            readUnitTestingListInt8uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readListInt8uAttribute", readUnitTestingListInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingListOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterListOctetStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingListOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readListOctetStringAttribute(
-                      (ChipClusters.TestClusterCluster.ListOctetStringAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.ListOctetStringAttributeCallback) callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterListOctetStringAttributeCallback(),
-            readTestClusterListOctetStringCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readListOctetStringAttribute", readTestClusterListOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterListStructOctetStringCommandParams =
+                    .DelegatedUnitTestingClusterListOctetStringAttributeCallback(),
+            readUnitTestingListOctetStringCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readListOctetStringAttribute", readUnitTestingListOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingListStructOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterListStructOctetStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingListStructOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readListStructOctetStringAttribute(
-                      (ChipClusters.TestClusterCluster.ListStructOctetStringAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.ListStructOctetStringAttributeCallback)
                           callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterListStructOctetStringAttributeCallback(),
-            readTestClusterListStructOctetStringCommandParams);
-    readTestClusterInteractionInfo.put(
+                    .DelegatedUnitTestingClusterListStructOctetStringAttributeCallback(),
+            readUnitTestingListStructOctetStringCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readListStructOctetStringAttribute",
-        readTestClusterListStructOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterLongOctetStringCommandParams =
+        readUnitTestingListStructOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingLongOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterLongOctetStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingLongOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readLongOctetStringAttribute(
                       (ChipClusters.OctetStringAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(),
-            readTestClusterLongOctetStringCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readLongOctetStringAttribute", readTestClusterLongOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterCharStringCommandParams =
+            readUnitTestingLongOctetStringCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readLongOctetStringAttribute", readUnitTestingLongOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingCharStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterCharStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingCharStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readCharStringAttribute((ChipClusters.CharStringAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(),
-            readTestClusterCharStringCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readCharStringAttribute", readTestClusterCharStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterLongCharStringCommandParams =
+            readUnitTestingCharStringCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readCharStringAttribute", readUnitTestingCharStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingLongCharStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterLongCharStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingLongCharStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readLongCharStringAttribute((ChipClusters.CharStringAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(),
-            readTestClusterLongCharStringCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readLongCharStringAttribute", readTestClusterLongCharStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterEpochUsCommandParams =
+            readUnitTestingLongCharStringCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readLongCharStringAttribute", readUnitTestingLongCharStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingEpochUsCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterEpochUsAttributeInteractionInfo =
+    InteractionInfo readUnitTestingEpochUsAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readEpochUsAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterEpochUsCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readEpochUsAttribute", readTestClusterEpochUsAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterEpochSCommandParams =
+            readUnitTestingEpochUsCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readEpochUsAttribute", readUnitTestingEpochUsAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingEpochSCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterEpochSAttributeInteractionInfo =
+    InteractionInfo readUnitTestingEpochSAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readEpochSAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterEpochSCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readEpochSAttribute", readTestClusterEpochSAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterVendorIdCommandParams =
+            readUnitTestingEpochSCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readEpochSAttribute", readUnitTestingEpochSAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingVendorIdCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterVendorIdAttributeInteractionInfo =
+    InteractionInfo readUnitTestingVendorIdAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readVendorIdAttribute(
-                      (ChipClusters.TestClusterCluster.VendorIdAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.VendorIdAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterVendorIdCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readVendorIdAttribute", readTestClusterVendorIdAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterListNullablesAndOptionalsStructCommandParams =
+            readUnitTestingVendorIdCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readVendorIdAttribute", readUnitTestingVendorIdAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingListNullablesAndOptionalsStructCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterListNullablesAndOptionalsStructAttributeInteractionInfo =
+    InteractionInfo readUnitTestingListNullablesAndOptionalsStructAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readListNullablesAndOptionalsStructAttribute(
-                      (ChipClusters.TestClusterCluster
+                      (ChipClusters.UnitTestingCluster
                               .ListNullablesAndOptionalsStructAttributeCallback)
                           callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterListNullablesAndOptionalsStructAttributeCallback(),
-            readTestClusterListNullablesAndOptionalsStructCommandParams);
-    readTestClusterInteractionInfo.put(
+                    .DelegatedUnitTestingClusterListNullablesAndOptionalsStructAttributeCallback(),
+            readUnitTestingListNullablesAndOptionalsStructCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readListNullablesAndOptionalsStructAttribute",
-        readTestClusterListNullablesAndOptionalsStructAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterEnumAttrCommandParams =
+        readUnitTestingListNullablesAndOptionalsStructAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingEnumAttrCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterEnumAttrAttributeInteractionInfo =
+    InteractionInfo readUnitTestingEnumAttrAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readEnumAttrAttribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterEnumAttrCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readEnumAttrAttribute", readTestClusterEnumAttrAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterRangeRestrictedInt8uCommandParams =
+            readUnitTestingEnumAttrCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readEnumAttrAttribute", readUnitTestingEnumAttrAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingRangeRestrictedInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterRangeRestrictedInt8uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingRangeRestrictedInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readRangeRestrictedInt8uAttribute(
                       (ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterRangeRestrictedInt8uCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingRangeRestrictedInt8uCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readRangeRestrictedInt8uAttribute",
-        readTestClusterRangeRestrictedInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterRangeRestrictedInt8sCommandParams =
+        readUnitTestingRangeRestrictedInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingRangeRestrictedInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterRangeRestrictedInt8sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingRangeRestrictedInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readRangeRestrictedInt8sAttribute(
                       (ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterRangeRestrictedInt8sCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingRangeRestrictedInt8sCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readRangeRestrictedInt8sAttribute",
-        readTestClusterRangeRestrictedInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterRangeRestrictedInt16uCommandParams =
+        readUnitTestingRangeRestrictedInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingRangeRestrictedInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterRangeRestrictedInt16uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingRangeRestrictedInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readRangeRestrictedInt16uAttribute(
                       (ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterRangeRestrictedInt16uCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingRangeRestrictedInt16uCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readRangeRestrictedInt16uAttribute",
-        readTestClusterRangeRestrictedInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterRangeRestrictedInt16sCommandParams =
+        readUnitTestingRangeRestrictedInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingRangeRestrictedInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterRangeRestrictedInt16sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingRangeRestrictedInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readRangeRestrictedInt16sAttribute(
                       (ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterRangeRestrictedInt16sCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingRangeRestrictedInt16sCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readRangeRestrictedInt16sAttribute",
-        readTestClusterRangeRestrictedInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterListLongOctetStringCommandParams =
+        readUnitTestingRangeRestrictedInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingListLongOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterListLongOctetStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingListLongOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readListLongOctetStringAttribute(
-                      (ChipClusters.TestClusterCluster.ListLongOctetStringAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.ListLongOctetStringAttributeCallback)
                           callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterListLongOctetStringAttributeCallback(),
-            readTestClusterListLongOctetStringCommandParams);
-    readTestClusterInteractionInfo.put(
+                    .DelegatedUnitTestingClusterListLongOctetStringAttributeCallback(),
+            readUnitTestingListLongOctetStringCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readListLongOctetStringAttribute",
-        readTestClusterListLongOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterListFabricScopedCommandParams =
+        readUnitTestingListLongOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingListFabricScopedCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterListFabricScopedAttributeInteractionInfo =
+    InteractionInfo readUnitTestingListFabricScopedAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readListFabricScopedAttribute(
-                      (ChipClusters.TestClusterCluster.ListFabricScopedAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.ListFabricScopedAttributeCallback) callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterListFabricScopedAttributeCallback(),
-            readTestClusterListFabricScopedCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readListFabricScopedAttribute", readTestClusterListFabricScopedAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterTimedWriteBooleanCommandParams =
+                    .DelegatedUnitTestingClusterListFabricScopedAttributeCallback(),
+            readUnitTestingListFabricScopedCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readListFabricScopedAttribute", readUnitTestingListFabricScopedAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingTimedWriteBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterTimedWriteBooleanAttributeInteractionInfo =
+    InteractionInfo readUnitTestingTimedWriteBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readTimedWriteBooleanAttribute((ChipClusters.BooleanAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
-            readTestClusterTimedWriteBooleanCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readTimedWriteBooleanAttribute", readTestClusterTimedWriteBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterGeneralErrorBooleanCommandParams =
+            readUnitTestingTimedWriteBooleanCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readTimedWriteBooleanAttribute", readUnitTestingTimedWriteBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingGeneralErrorBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterGeneralErrorBooleanAttributeInteractionInfo =
+    InteractionInfo readUnitTestingGeneralErrorBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readGeneralErrorBooleanAttribute(
                       (ChipClusters.BooleanAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
-            readTestClusterGeneralErrorBooleanCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingGeneralErrorBooleanCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readGeneralErrorBooleanAttribute",
-        readTestClusterGeneralErrorBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterClusterErrorBooleanCommandParams =
+        readUnitTestingGeneralErrorBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingClusterErrorBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterClusterErrorBooleanAttributeInteractionInfo =
+    InteractionInfo readUnitTestingClusterErrorBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readClusterErrorBooleanAttribute(
                       (ChipClusters.BooleanAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
-            readTestClusterClusterErrorBooleanCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingClusterErrorBooleanCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readClusterErrorBooleanAttribute",
-        readTestClusterClusterErrorBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterUnsupportedCommandParams =
+        readUnitTestingClusterErrorBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingUnsupportedCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterUnsupportedAttributeInteractionInfo =
+    InteractionInfo readUnitTestingUnsupportedAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readUnsupportedAttribute((ChipClusters.BooleanAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
-            readTestClusterUnsupportedCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readUnsupportedAttribute", readTestClusterUnsupportedAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableBooleanCommandParams =
+            readUnitTestingUnsupportedCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readUnsupportedAttribute", readUnitTestingUnsupportedAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableBooleanAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableBooleanAttribute(
-                      (ChipClusters.TestClusterCluster.NullableBooleanAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableBooleanAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
-            readTestClusterNullableBooleanCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableBooleanAttribute", readTestClusterNullableBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableBitmap8CommandParams =
+            readUnitTestingNullableBooleanCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableBooleanAttribute", readUnitTestingNullableBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableBitmap8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableBitmap8AttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableBitmap8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableBitmap8Attribute(
-                      (ChipClusters.TestClusterCluster.NullableBitmap8AttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableBitmap8AttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableBitmap8CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableBitmap8Attribute", readTestClusterNullableBitmap8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableBitmap16CommandParams =
+            readUnitTestingNullableBitmap8CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableBitmap8Attribute", readUnitTestingNullableBitmap8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableBitmap16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableBitmap16AttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableBitmap16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableBitmap16Attribute(
-                      (ChipClusters.TestClusterCluster.NullableBitmap16AttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableBitmap16AttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableBitmap16CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableBitmap16Attribute", readTestClusterNullableBitmap16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableBitmap32CommandParams =
+            readUnitTestingNullableBitmap16CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableBitmap16Attribute", readUnitTestingNullableBitmap16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableBitmap32CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableBitmap32AttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableBitmap32AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableBitmap32Attribute(
-                      (ChipClusters.TestClusterCluster.NullableBitmap32AttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableBitmap32AttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableBitmap32CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableBitmap32Attribute", readTestClusterNullableBitmap32AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableBitmap64CommandParams =
+            readUnitTestingNullableBitmap32CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableBitmap32Attribute", readUnitTestingNullableBitmap32AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableBitmap64CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableBitmap64AttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableBitmap64AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableBitmap64Attribute(
-                      (ChipClusters.TestClusterCluster.NullableBitmap64AttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableBitmap64AttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableBitmap64CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableBitmap64Attribute", readTestClusterNullableBitmap64AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt8uCommandParams =
+            readUnitTestingNullableBitmap64CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableBitmap64Attribute", readUnitTestingNullableBitmap64AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt8uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt8uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt8uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt8uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableInt8uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt8uAttribute", readTestClusterNullableInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt16uCommandParams =
+            readUnitTestingNullableInt8uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt8uAttribute", readUnitTestingNullableInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt16uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt16uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt16uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt16uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableInt16uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt16uAttribute", readTestClusterNullableInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt24uCommandParams =
+            readUnitTestingNullableInt16uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt16uAttribute", readUnitTestingNullableInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt24uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt24uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt24uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt24uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt24uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt24uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt24uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt24uAttribute", readTestClusterNullableInt24uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt32uCommandParams =
+            readUnitTestingNullableInt24uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt24uAttribute", readUnitTestingNullableInt24uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt32uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt32uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt32uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt32uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt32uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt32uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt32uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt32uAttribute", readTestClusterNullableInt32uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt40uCommandParams =
+            readUnitTestingNullableInt32uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt32uAttribute", readUnitTestingNullableInt32uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt40uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt40uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt40uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt40uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt40uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt40uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt40uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt40uAttribute", readTestClusterNullableInt40uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt48uCommandParams =
+            readUnitTestingNullableInt40uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt40uAttribute", readUnitTestingNullableInt40uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt48uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt48uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt48uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt48uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt48uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt48uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt48uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt48uAttribute", readTestClusterNullableInt48uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt56uCommandParams =
+            readUnitTestingNullableInt48uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt48uAttribute", readUnitTestingNullableInt48uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt56uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt56uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt56uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt56uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt56uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt56uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt56uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt56uAttribute", readTestClusterNullableInt56uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt64uCommandParams =
+            readUnitTestingNullableInt56uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt56uAttribute", readUnitTestingNullableInt56uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt64uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt64uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt64uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt64uAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt64uAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt64uAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt64uCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt64uAttribute", readTestClusterNullableInt64uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt8sCommandParams =
+            readUnitTestingNullableInt64uCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt64uAttribute", readUnitTestingNullableInt64uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt8sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt8sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt8sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt8sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableInt8sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt8sAttribute", readTestClusterNullableInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt16sCommandParams =
+            readUnitTestingNullableInt8sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt8sAttribute", readUnitTestingNullableInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt16sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt16sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt16sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt16sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableInt16sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt16sAttribute", readTestClusterNullableInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt24sCommandParams =
+            readUnitTestingNullableInt16sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt16sAttribute", readUnitTestingNullableInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt24sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt24sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt24sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt24sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt24sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt24sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt24sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt24sAttribute", readTestClusterNullableInt24sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt32sCommandParams =
+            readUnitTestingNullableInt24sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt24sAttribute", readUnitTestingNullableInt24sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt32sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt32sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt32sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt32sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt32sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt32sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt32sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt32sAttribute", readTestClusterNullableInt32sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt40sCommandParams =
+            readUnitTestingNullableInt32sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt32sAttribute", readUnitTestingNullableInt32sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt40sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt40sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt40sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt40sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt40sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt40sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt40sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt40sAttribute", readTestClusterNullableInt40sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt48sCommandParams =
+            readUnitTestingNullableInt40sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt40sAttribute", readUnitTestingNullableInt40sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt48sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt48sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt48sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt48sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt48sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt48sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt48sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt48sAttribute", readTestClusterNullableInt48sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt56sCommandParams =
+            readUnitTestingNullableInt48sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt48sAttribute", readUnitTestingNullableInt48sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt56sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt56sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt56sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt56sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt56sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt56sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt56sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt56sAttribute", readTestClusterNullableInt56sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableInt64sCommandParams =
+            readUnitTestingNullableInt56sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt56sAttribute", readUnitTestingNullableInt56sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableInt64sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableInt64sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableInt64sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableInt64sAttribute(
-                      (ChipClusters.TestClusterCluster.NullableInt64sAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableInt64sAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterNullableInt64sCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableInt64sAttribute", readTestClusterNullableInt64sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableEnum8CommandParams =
+            readUnitTestingNullableInt64sCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableInt64sAttribute", readUnitTestingNullableInt64sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableEnum8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableEnum8AttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableEnum8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableEnum8Attribute(
-                      (ChipClusters.TestClusterCluster.NullableEnum8AttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableEnum8AttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableEnum8CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableEnum8Attribute", readTestClusterNullableEnum8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableEnum16CommandParams =
+            readUnitTestingNullableEnum8CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableEnum8Attribute", readUnitTestingNullableEnum8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableEnum16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableEnum16AttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableEnum16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableEnum16Attribute(
-                      (ChipClusters.TestClusterCluster.NullableEnum16AttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableEnum16AttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableEnum16CommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableEnum16Attribute", readTestClusterNullableEnum16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableFloatSingleCommandParams =
+            readUnitTestingNullableEnum16CommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableEnum16Attribute", readUnitTestingNullableEnum16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableFloatSingleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableFloatSingleAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableFloatSingleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableFloatSingleAttribute(
-                      (ChipClusters.TestClusterCluster.NullableFloatSingleAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.NullableFloatSingleAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedFloatAttributeCallback(),
-            readTestClusterNullableFloatSingleCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableFloatSingleCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableFloatSingleAttribute",
-        readTestClusterNullableFloatSingleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableFloatDoubleCommandParams =
+        readUnitTestingNullableFloatSingleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableFloatDoubleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableFloatDoubleAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableFloatDoubleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableFloatDoubleAttribute(
-                      (ChipClusters.TestClusterCluster.NullableFloatDoubleAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.NullableFloatDoubleAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedDoubleAttributeCallback(),
-            readTestClusterNullableFloatDoubleCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableFloatDoubleCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableFloatDoubleAttribute",
-        readTestClusterNullableFloatDoubleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableOctetStringCommandParams =
+        readUnitTestingNullableFloatDoubleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableOctetStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableOctetStringAttribute(
-                      (ChipClusters.TestClusterCluster.NullableOctetStringAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.NullableOctetStringAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(),
-            readTestClusterNullableOctetStringCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableOctetStringCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableOctetStringAttribute",
-        readTestClusterNullableOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableCharStringCommandParams =
+        readUnitTestingNullableOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableCharStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableCharStringAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableCharStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableCharStringAttribute(
-                      (ChipClusters.TestClusterCluster.NullableCharStringAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.NullableCharStringAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(),
-            readTestClusterNullableCharStringCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableCharStringCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableCharStringAttribute",
-        readTestClusterNullableCharStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableEnumAttrCommandParams =
+        readUnitTestingNullableCharStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableEnumAttrCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableEnumAttrAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableEnumAttrAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableEnumAttrAttribute(
-                      (ChipClusters.TestClusterCluster.NullableEnumAttrAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.NullableEnumAttrAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableEnumAttrCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readNullableEnumAttrAttribute", readTestClusterNullableEnumAttrAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableRangeRestrictedInt8uCommandParams =
+            readUnitTestingNullableEnumAttrCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readNullableEnumAttrAttribute", readUnitTestingNullableEnumAttrAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableRangeRestrictedInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableRangeRestrictedInt8uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableRangeRestrictedInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableRangeRestrictedInt8uAttribute(
-                      (ChipClusters.TestClusterCluster
+                      (ChipClusters.UnitTestingCluster
                               .NullableRangeRestrictedInt8uAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableRangeRestrictedInt8uCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableRangeRestrictedInt8uCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableRangeRestrictedInt8uAttribute",
-        readTestClusterNullableRangeRestrictedInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableRangeRestrictedInt8sCommandParams =
+        readUnitTestingNullableRangeRestrictedInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableRangeRestrictedInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableRangeRestrictedInt8sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableRangeRestrictedInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableRangeRestrictedInt8sAttribute(
-                      (ChipClusters.TestClusterCluster
+                      (ChipClusters.UnitTestingCluster
                               .NullableRangeRestrictedInt8sAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableRangeRestrictedInt8sCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableRangeRestrictedInt8sCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableRangeRestrictedInt8sAttribute",
-        readTestClusterNullableRangeRestrictedInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableRangeRestrictedInt16uCommandParams =
+        readUnitTestingNullableRangeRestrictedInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableRangeRestrictedInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableRangeRestrictedInt16uAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableRangeRestrictedInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableRangeRestrictedInt16uAttribute(
-                      (ChipClusters.TestClusterCluster
+                      (ChipClusters.UnitTestingCluster
                               .NullableRangeRestrictedInt16uAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableRangeRestrictedInt16uCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableRangeRestrictedInt16uCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableRangeRestrictedInt16uAttribute",
-        readTestClusterNullableRangeRestrictedInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterNullableRangeRestrictedInt16sCommandParams =
+        readUnitTestingNullableRangeRestrictedInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingNullableRangeRestrictedInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo =
+    InteractionInfo readUnitTestingNullableRangeRestrictedInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readNullableRangeRestrictedInt16sAttribute(
-                      (ChipClusters.TestClusterCluster
+                      (ChipClusters.UnitTestingCluster
                               .NullableRangeRestrictedInt16sAttributeCallback)
                           callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterNullableRangeRestrictedInt16sCommandParams);
-    readTestClusterInteractionInfo.put(
+            readUnitTestingNullableRangeRestrictedInt16sCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readNullableRangeRestrictedInt16sAttribute",
-        readTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterGeneratedCommandListCommandParams =
+        readUnitTestingNullableRangeRestrictedInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingGeneratedCommandListCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterGeneratedCommandListAttributeInteractionInfo =
+    InteractionInfo readUnitTestingGeneratedCommandListAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readGeneratedCommandListAttribute(
-                      (ChipClusters.TestClusterCluster.GeneratedCommandListAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.GeneratedCommandListAttributeCallback)
                           callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterGeneratedCommandListAttributeCallback(),
-            readTestClusterGeneratedCommandListCommandParams);
-    readTestClusterInteractionInfo.put(
+                    .DelegatedUnitTestingClusterGeneratedCommandListAttributeCallback(),
+            readUnitTestingGeneratedCommandListCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readGeneratedCommandListAttribute",
-        readTestClusterGeneratedCommandListAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterAcceptedCommandListCommandParams =
+        readUnitTestingGeneratedCommandListAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingAcceptedCommandListCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterAcceptedCommandListAttributeInteractionInfo =
+    InteractionInfo readUnitTestingAcceptedCommandListAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readAcceptedCommandListAttribute(
-                      (ChipClusters.TestClusterCluster.AcceptedCommandListAttributeCallback)
+                      (ChipClusters.UnitTestingCluster.AcceptedCommandListAttributeCallback)
                           callback);
             },
             () ->
                 new ClusterInfoMapping
-                    .DelegatedTestClusterClusterAcceptedCommandListAttributeCallback(),
-            readTestClusterAcceptedCommandListCommandParams);
-    readTestClusterInteractionInfo.put(
+                    .DelegatedUnitTestingClusterAcceptedCommandListAttributeCallback(),
+            readUnitTestingAcceptedCommandListCommandParams);
+    readUnitTestingInteractionInfo.put(
         "readAcceptedCommandListAttribute",
-        readTestClusterAcceptedCommandListAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterAttributeListCommandParams =
+        readUnitTestingAcceptedCommandListAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingAttributeListCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterAttributeListAttributeInteractionInfo =
+    InteractionInfo readUnitTestingAttributeListAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readAttributeListAttribute(
-                      (ChipClusters.TestClusterCluster.AttributeListAttributeCallback) callback);
+                      (ChipClusters.UnitTestingCluster.AttributeListAttributeCallback) callback);
             },
             () ->
-                new ClusterInfoMapping.DelegatedTestClusterClusterAttributeListAttributeCallback(),
-            readTestClusterAttributeListCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readAttributeListAttribute", readTestClusterAttributeListAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterFeatureMapCommandParams =
+                new ClusterInfoMapping.DelegatedUnitTestingClusterAttributeListAttributeCallback(),
+            readUnitTestingAttributeListCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readAttributeListAttribute", readUnitTestingAttributeListAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingFeatureMapCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterFeatureMapAttributeInteractionInfo =
+    InteractionInfo readUnitTestingFeatureMapAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
-            readTestClusterFeatureMapCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readFeatureMapAttribute", readTestClusterFeatureMapAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> readTestClusterClusterRevisionCommandParams =
+            readUnitTestingFeatureMapCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readFeatureMapAttribute", readUnitTestingFeatureMapAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> readUnitTestingClusterRevisionCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    InteractionInfo readTestClusterClusterRevisionAttributeInteractionInfo =
+    InteractionInfo readUnitTestingClusterRevisionAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback);
             },
             () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
-            readTestClusterClusterRevisionCommandParams);
-    readTestClusterInteractionInfo.put(
-        "readClusterRevisionAttribute", readTestClusterClusterRevisionAttributeInteractionInfo);
-    readAttributeMap.put("testCluster", readTestClusterInteractionInfo);
+            readUnitTestingClusterRevisionCommandParams);
+    readUnitTestingInteractionInfo.put(
+        "readClusterRevisionAttribute", readUnitTestingClusterRevisionAttributeInteractionInfo);
+    readAttributeMap.put("unitTesting", readUnitTestingInteractionInfo);
     return readAttributeMap;
   }
 }
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java
index 95414b2..25e04f7 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java
@@ -1605,1238 +1605,1238 @@
     writeAttributeMap.put("accountLogin", writeAccountLoginInteractionInfo);
     Map<String, InteractionInfo> writeElectricalMeasurementInteractionInfo = new LinkedHashMap<>();
     writeAttributeMap.put("electricalMeasurement", writeElectricalMeasurementInteractionInfo);
-    Map<String, InteractionInfo> writeTestClusterInteractionInfo = new LinkedHashMap<>();
-    Map<String, CommandParameterInfo> writeTestClusterBooleanCommandParams =
+    Map<String, InteractionInfo> writeUnitTestingInteractionInfo = new LinkedHashMap<>();
+    Map<String, CommandParameterInfo> writeUnitTestingBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterbooleanCommandParameterInfo =
+    CommandParameterInfo unitTestingbooleanCommandParameterInfo =
         new CommandParameterInfo("value", Boolean.class, Boolean.class);
-    writeTestClusterBooleanCommandParams.put("value", testClusterbooleanCommandParameterInfo);
-    InteractionInfo writeTestClusterBooleanAttributeInteractionInfo =
+    writeUnitTestingBooleanCommandParams.put("value", unitTestingbooleanCommandParameterInfo);
+    InteractionInfo writeUnitTestingBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeBooleanAttribute(
                       (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterBooleanCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeBooleanAttribute", writeTestClusterBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterBitmap8CommandParams =
+            writeUnitTestingBooleanCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeBooleanAttribute", writeUnitTestingBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingBitmap8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterbitmap8CommandParameterInfo =
+    CommandParameterInfo unitTestingbitmap8CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterBitmap8CommandParams.put("value", testClusterbitmap8CommandParameterInfo);
-    InteractionInfo writeTestClusterBitmap8AttributeInteractionInfo =
+    writeUnitTestingBitmap8CommandParams.put("value", unitTestingbitmap8CommandParameterInfo);
+    InteractionInfo writeUnitTestingBitmap8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeBitmap8Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterBitmap8CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeBitmap8Attribute", writeTestClusterBitmap8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterBitmap16CommandParams =
+            writeUnitTestingBitmap8CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeBitmap8Attribute", writeUnitTestingBitmap8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingBitmap16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterbitmap16CommandParameterInfo =
+    CommandParameterInfo unitTestingbitmap16CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterBitmap16CommandParams.put("value", testClusterbitmap16CommandParameterInfo);
-    InteractionInfo writeTestClusterBitmap16AttributeInteractionInfo =
+    writeUnitTestingBitmap16CommandParams.put("value", unitTestingbitmap16CommandParameterInfo);
+    InteractionInfo writeUnitTestingBitmap16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeBitmap16Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterBitmap16CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeBitmap16Attribute", writeTestClusterBitmap16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterBitmap32CommandParams =
+            writeUnitTestingBitmap16CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeBitmap16Attribute", writeUnitTestingBitmap16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingBitmap32CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterbitmap32CommandParameterInfo =
+    CommandParameterInfo unitTestingbitmap32CommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterBitmap32CommandParams.put("value", testClusterbitmap32CommandParameterInfo);
-    InteractionInfo writeTestClusterBitmap32AttributeInteractionInfo =
+    writeUnitTestingBitmap32CommandParams.put("value", unitTestingbitmap32CommandParameterInfo);
+    InteractionInfo writeUnitTestingBitmap32AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeBitmap32Attribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterBitmap32CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeBitmap32Attribute", writeTestClusterBitmap32AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterBitmap64CommandParams =
+            writeUnitTestingBitmap32CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeBitmap32Attribute", writeUnitTestingBitmap32AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingBitmap64CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterbitmap64CommandParameterInfo =
+    CommandParameterInfo unitTestingbitmap64CommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterBitmap64CommandParams.put("value", testClusterbitmap64CommandParameterInfo);
-    InteractionInfo writeTestClusterBitmap64AttributeInteractionInfo =
+    writeUnitTestingBitmap64CommandParams.put("value", unitTestingbitmap64CommandParameterInfo);
+    InteractionInfo writeUnitTestingBitmap64AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeBitmap64Attribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterBitmap64CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeBitmap64Attribute", writeTestClusterBitmap64AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt8uCommandParams =
+            writeUnitTestingBitmap64CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeBitmap64Attribute", writeUnitTestingBitmap64AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint8uCommandParameterInfo =
+    CommandParameterInfo unitTestingint8uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterInt8uCommandParams.put("value", testClusterint8uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt8uAttributeInteractionInfo =
+    writeUnitTestingInt8uCommandParams.put("value", unitTestingint8uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt8uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt8uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt8uAttribute", writeTestClusterInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt16uCommandParams =
+            writeUnitTestingInt8uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt8uAttribute", writeUnitTestingInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint16uCommandParameterInfo =
+    CommandParameterInfo unitTestingint16uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterInt16uCommandParams.put("value", testClusterint16uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt16uAttributeInteractionInfo =
+    writeUnitTestingInt16uCommandParams.put("value", unitTestingint16uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt16uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt16uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt16uAttribute", writeTestClusterInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt24uCommandParams =
+            writeUnitTestingInt16uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt16uAttribute", writeUnitTestingInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt24uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint24uCommandParameterInfo =
+    CommandParameterInfo unitTestingint24uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt24uCommandParams.put("value", testClusterint24uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt24uAttributeInteractionInfo =
+    writeUnitTestingInt24uCommandParams.put("value", unitTestingint24uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt24uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt24uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt24uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt24uAttribute", writeTestClusterInt24uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt32uCommandParams =
+            writeUnitTestingInt24uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt24uAttribute", writeUnitTestingInt24uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt32uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint32uCommandParameterInfo =
+    CommandParameterInfo unitTestingint32uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt32uCommandParams.put("value", testClusterint32uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt32uAttributeInteractionInfo =
+    writeUnitTestingInt32uCommandParams.put("value", unitTestingint32uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt32uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt32uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt32uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt32uAttribute", writeTestClusterInt32uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt40uCommandParams =
+            writeUnitTestingInt32uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt32uAttribute", writeUnitTestingInt32uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt40uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint40uCommandParameterInfo =
+    CommandParameterInfo unitTestingint40uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt40uCommandParams.put("value", testClusterint40uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt40uAttributeInteractionInfo =
+    writeUnitTestingInt40uCommandParams.put("value", unitTestingint40uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt40uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt40uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt40uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt40uAttribute", writeTestClusterInt40uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt48uCommandParams =
+            writeUnitTestingInt40uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt40uAttribute", writeUnitTestingInt40uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt48uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint48uCommandParameterInfo =
+    CommandParameterInfo unitTestingint48uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt48uCommandParams.put("value", testClusterint48uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt48uAttributeInteractionInfo =
+    writeUnitTestingInt48uCommandParams.put("value", unitTestingint48uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt48uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt48uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt48uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt48uAttribute", writeTestClusterInt48uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt56uCommandParams =
+            writeUnitTestingInt48uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt48uAttribute", writeUnitTestingInt48uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt56uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint56uCommandParameterInfo =
+    CommandParameterInfo unitTestingint56uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt56uCommandParams.put("value", testClusterint56uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt56uAttributeInteractionInfo =
+    writeUnitTestingInt56uCommandParams.put("value", unitTestingint56uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt56uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt56uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt56uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt56uAttribute", writeTestClusterInt56uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt64uCommandParams =
+            writeUnitTestingInt56uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt56uAttribute", writeUnitTestingInt56uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt64uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint64uCommandParameterInfo =
+    CommandParameterInfo unitTestingint64uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt64uCommandParams.put("value", testClusterint64uCommandParameterInfo);
-    InteractionInfo writeTestClusterInt64uAttributeInteractionInfo =
+    writeUnitTestingInt64uCommandParams.put("value", unitTestingint64uCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt64uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt64uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt64uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt64uAttribute", writeTestClusterInt64uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt8sCommandParams =
+            writeUnitTestingInt64uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt64uAttribute", writeUnitTestingInt64uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint8sCommandParameterInfo =
+    CommandParameterInfo unitTestingint8sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterInt8sCommandParams.put("value", testClusterint8sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt8sAttributeInteractionInfo =
+    writeUnitTestingInt8sCommandParams.put("value", unitTestingint8sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt8sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt8sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt8sAttribute", writeTestClusterInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt16sCommandParams =
+            writeUnitTestingInt8sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt8sAttribute", writeUnitTestingInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint16sCommandParameterInfo =
+    CommandParameterInfo unitTestingint16sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterInt16sCommandParams.put("value", testClusterint16sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt16sAttributeInteractionInfo =
+    writeUnitTestingInt16sCommandParams.put("value", unitTestingint16sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt16sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt16sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt16sAttribute", writeTestClusterInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt24sCommandParams =
+            writeUnitTestingInt16sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt16sAttribute", writeUnitTestingInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt24sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint24sCommandParameterInfo =
+    CommandParameterInfo unitTestingint24sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt24sCommandParams.put("value", testClusterint24sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt24sAttributeInteractionInfo =
+    writeUnitTestingInt24sCommandParams.put("value", unitTestingint24sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt24sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt24sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt24sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt24sAttribute", writeTestClusterInt24sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt32sCommandParams =
+            writeUnitTestingInt24sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt24sAttribute", writeUnitTestingInt24sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt32sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint32sCommandParameterInfo =
+    CommandParameterInfo unitTestingint32sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt32sCommandParams.put("value", testClusterint32sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt32sAttributeInteractionInfo =
+    writeUnitTestingInt32sCommandParams.put("value", unitTestingint32sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt32sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt32sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt32sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt32sAttribute", writeTestClusterInt32sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt40sCommandParams =
+            writeUnitTestingInt32sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt32sAttribute", writeUnitTestingInt32sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt40sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint40sCommandParameterInfo =
+    CommandParameterInfo unitTestingint40sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt40sCommandParams.put("value", testClusterint40sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt40sAttributeInteractionInfo =
+    writeUnitTestingInt40sCommandParams.put("value", unitTestingint40sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt40sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt40sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt40sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt40sAttribute", writeTestClusterInt40sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt48sCommandParams =
+            writeUnitTestingInt40sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt40sAttribute", writeUnitTestingInt40sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt48sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint48sCommandParameterInfo =
+    CommandParameterInfo unitTestingint48sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt48sCommandParams.put("value", testClusterint48sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt48sAttributeInteractionInfo =
+    writeUnitTestingInt48sCommandParams.put("value", unitTestingint48sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt48sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt48sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt48sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt48sAttribute", writeTestClusterInt48sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt56sCommandParams =
+            writeUnitTestingInt48sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt48sAttribute", writeUnitTestingInt48sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt56sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint56sCommandParameterInfo =
+    CommandParameterInfo unitTestingint56sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt56sCommandParams.put("value", testClusterint56sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt56sAttributeInteractionInfo =
+    writeUnitTestingInt56sCommandParams.put("value", unitTestingint56sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt56sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt56sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt56sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt56sAttribute", writeTestClusterInt56sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterInt64sCommandParams =
+            writeUnitTestingInt56sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt56sAttribute", writeUnitTestingInt56sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingInt64sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterint64sCommandParameterInfo =
+    CommandParameterInfo unitTestingint64sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterInt64sCommandParams.put("value", testClusterint64sCommandParameterInfo);
-    InteractionInfo writeTestClusterInt64sAttributeInteractionInfo =
+    writeUnitTestingInt64sCommandParams.put("value", unitTestingint64sCommandParameterInfo);
+    InteractionInfo writeUnitTestingInt64sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeInt64sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterInt64sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeInt64sAttribute", writeTestClusterInt64sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterEnum8CommandParams =
+            writeUnitTestingInt64sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeInt64sAttribute", writeUnitTestingInt64sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingEnum8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterenum8CommandParameterInfo =
+    CommandParameterInfo unitTestingenum8CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterEnum8CommandParams.put("value", testClusterenum8CommandParameterInfo);
-    InteractionInfo writeTestClusterEnum8AttributeInteractionInfo =
+    writeUnitTestingEnum8CommandParams.put("value", unitTestingenum8CommandParameterInfo);
+    InteractionInfo writeUnitTestingEnum8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeEnum8Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterEnum8CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeEnum8Attribute", writeTestClusterEnum8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterEnum16CommandParams =
+            writeUnitTestingEnum8CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeEnum8Attribute", writeUnitTestingEnum8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingEnum16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterenum16CommandParameterInfo =
+    CommandParameterInfo unitTestingenum16CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterEnum16CommandParams.put("value", testClusterenum16CommandParameterInfo);
-    InteractionInfo writeTestClusterEnum16AttributeInteractionInfo =
+    writeUnitTestingEnum16CommandParams.put("value", unitTestingenum16CommandParameterInfo);
+    InteractionInfo writeUnitTestingEnum16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeEnum16Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterEnum16CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeEnum16Attribute", writeTestClusterEnum16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterFloatSingleCommandParams =
+            writeUnitTestingEnum16CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeEnum16Attribute", writeUnitTestingEnum16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingFloatSingleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterfloatSingleCommandParameterInfo =
+    CommandParameterInfo unitTestingfloatSingleCommandParameterInfo =
         new CommandParameterInfo("value", Float.class, Float.class);
-    writeTestClusterFloatSingleCommandParams.put(
-        "value", testClusterfloatSingleCommandParameterInfo);
-    InteractionInfo writeTestClusterFloatSingleAttributeInteractionInfo =
+    writeUnitTestingFloatSingleCommandParams.put(
+        "value", unitTestingfloatSingleCommandParameterInfo);
+    InteractionInfo writeUnitTestingFloatSingleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeFloatSingleAttribute(
                       (DefaultClusterCallback) callback, (Float) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterFloatSingleCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeFloatSingleAttribute", writeTestClusterFloatSingleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterFloatDoubleCommandParams =
+            writeUnitTestingFloatSingleCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeFloatSingleAttribute", writeUnitTestingFloatSingleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingFloatDoubleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterfloatDoubleCommandParameterInfo =
+    CommandParameterInfo unitTestingfloatDoubleCommandParameterInfo =
         new CommandParameterInfo("value", Double.class, Double.class);
-    writeTestClusterFloatDoubleCommandParams.put(
-        "value", testClusterfloatDoubleCommandParameterInfo);
-    InteractionInfo writeTestClusterFloatDoubleAttributeInteractionInfo =
+    writeUnitTestingFloatDoubleCommandParams.put(
+        "value", unitTestingfloatDoubleCommandParameterInfo);
+    InteractionInfo writeUnitTestingFloatDoubleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeFloatDoubleAttribute(
                       (DefaultClusterCallback) callback, (Double) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterFloatDoubleCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeFloatDoubleAttribute", writeTestClusterFloatDoubleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterOctetStringCommandParams =
+            writeUnitTestingFloatDoubleCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeFloatDoubleAttribute", writeUnitTestingFloatDoubleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusteroctetStringCommandParameterInfo =
+    CommandParameterInfo unitTestingoctetStringCommandParameterInfo =
         new CommandParameterInfo("value", byte[].class, byte[].class);
-    writeTestClusterOctetStringCommandParams.put(
-        "value", testClusteroctetStringCommandParameterInfo);
-    InteractionInfo writeTestClusterOctetStringAttributeInteractionInfo =
+    writeUnitTestingOctetStringCommandParams.put(
+        "value", unitTestingoctetStringCommandParameterInfo);
+    InteractionInfo writeUnitTestingOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeOctetStringAttribute(
                       (DefaultClusterCallback) callback, (byte[]) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterOctetStringCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeOctetStringAttribute", writeTestClusterOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterLongOctetStringCommandParams =
+            writeUnitTestingOctetStringCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeOctetStringAttribute", writeUnitTestingOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingLongOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterlongOctetStringCommandParameterInfo =
+    CommandParameterInfo unitTestinglongOctetStringCommandParameterInfo =
         new CommandParameterInfo("value", byte[].class, byte[].class);
-    writeTestClusterLongOctetStringCommandParams.put(
-        "value", testClusterlongOctetStringCommandParameterInfo);
-    InteractionInfo writeTestClusterLongOctetStringAttributeInteractionInfo =
+    writeUnitTestingLongOctetStringCommandParams.put(
+        "value", unitTestinglongOctetStringCommandParameterInfo);
+    InteractionInfo writeUnitTestingLongOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeLongOctetStringAttribute(
                       (DefaultClusterCallback) callback, (byte[]) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterLongOctetStringCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeLongOctetStringAttribute", writeTestClusterLongOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterCharStringCommandParams =
+            writeUnitTestingLongOctetStringCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeLongOctetStringAttribute", writeUnitTestingLongOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingCharStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustercharStringCommandParameterInfo =
+    CommandParameterInfo unitTestingcharStringCommandParameterInfo =
         new CommandParameterInfo("value", String.class, String.class);
-    writeTestClusterCharStringCommandParams.put("value", testClustercharStringCommandParameterInfo);
-    InteractionInfo writeTestClusterCharStringAttributeInteractionInfo =
+    writeUnitTestingCharStringCommandParams.put("value", unitTestingcharStringCommandParameterInfo);
+    InteractionInfo writeUnitTestingCharStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeCharStringAttribute(
                       (DefaultClusterCallback) callback, (String) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterCharStringCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeCharStringAttribute", writeTestClusterCharStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterLongCharStringCommandParams =
+            writeUnitTestingCharStringCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeCharStringAttribute", writeUnitTestingCharStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingLongCharStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterlongCharStringCommandParameterInfo =
+    CommandParameterInfo unitTestinglongCharStringCommandParameterInfo =
         new CommandParameterInfo("value", String.class, String.class);
-    writeTestClusterLongCharStringCommandParams.put(
-        "value", testClusterlongCharStringCommandParameterInfo);
-    InteractionInfo writeTestClusterLongCharStringAttributeInteractionInfo =
+    writeUnitTestingLongCharStringCommandParams.put(
+        "value", unitTestinglongCharStringCommandParameterInfo);
+    InteractionInfo writeUnitTestingLongCharStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeLongCharStringAttribute(
                       (DefaultClusterCallback) callback, (String) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterLongCharStringCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeLongCharStringAttribute", writeTestClusterLongCharStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterEpochUsCommandParams =
+            writeUnitTestingLongCharStringCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeLongCharStringAttribute", writeUnitTestingLongCharStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingEpochUsCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterepochUsCommandParameterInfo =
+    CommandParameterInfo unitTestingepochUsCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterEpochUsCommandParams.put("value", testClusterepochUsCommandParameterInfo);
-    InteractionInfo writeTestClusterEpochUsAttributeInteractionInfo =
+    writeUnitTestingEpochUsCommandParams.put("value", unitTestingepochUsCommandParameterInfo);
+    InteractionInfo writeUnitTestingEpochUsAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeEpochUsAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterEpochUsCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeEpochUsAttribute", writeTestClusterEpochUsAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterEpochSCommandParams =
+            writeUnitTestingEpochUsCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeEpochUsAttribute", writeUnitTestingEpochUsAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingEpochSCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterepochSCommandParameterInfo =
+    CommandParameterInfo unitTestingepochSCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterEpochSCommandParams.put("value", testClusterepochSCommandParameterInfo);
-    InteractionInfo writeTestClusterEpochSAttributeInteractionInfo =
+    writeUnitTestingEpochSCommandParams.put("value", unitTestingepochSCommandParameterInfo);
+    InteractionInfo writeUnitTestingEpochSAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeEpochSAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterEpochSCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeEpochSAttribute", writeTestClusterEpochSAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterVendorIdCommandParams =
+            writeUnitTestingEpochSCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeEpochSAttribute", writeUnitTestingEpochSAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingVendorIdCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustervendorIdCommandParameterInfo =
+    CommandParameterInfo unitTestingvendorIdCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterVendorIdCommandParams.put("value", testClustervendorIdCommandParameterInfo);
-    InteractionInfo writeTestClusterVendorIdAttributeInteractionInfo =
+    writeUnitTestingVendorIdCommandParams.put("value", unitTestingvendorIdCommandParameterInfo);
+    InteractionInfo writeUnitTestingVendorIdAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeVendorIdAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterVendorIdCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeVendorIdAttribute", writeTestClusterVendorIdAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterEnumAttrCommandParams =
+            writeUnitTestingVendorIdCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeVendorIdAttribute", writeUnitTestingVendorIdAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingEnumAttrCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterenumAttrCommandParameterInfo =
+    CommandParameterInfo unitTestingenumAttrCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterEnumAttrCommandParams.put("value", testClusterenumAttrCommandParameterInfo);
-    InteractionInfo writeTestClusterEnumAttrAttributeInteractionInfo =
+    writeUnitTestingEnumAttrCommandParams.put("value", unitTestingenumAttrCommandParameterInfo);
+    InteractionInfo writeUnitTestingEnumAttrAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeEnumAttrAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterEnumAttrCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeEnumAttrAttribute", writeTestClusterEnumAttrAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterRangeRestrictedInt8uCommandParams =
+            writeUnitTestingEnumAttrCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeEnumAttrAttribute", writeUnitTestingEnumAttrAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingRangeRestrictedInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterrangeRestrictedInt8uCommandParameterInfo =
+    CommandParameterInfo unitTestingrangeRestrictedInt8uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterRangeRestrictedInt8uCommandParams.put(
-        "value", testClusterrangeRestrictedInt8uCommandParameterInfo);
-    InteractionInfo writeTestClusterRangeRestrictedInt8uAttributeInteractionInfo =
+    writeUnitTestingRangeRestrictedInt8uCommandParams.put(
+        "value", unitTestingrangeRestrictedInt8uCommandParameterInfo);
+    InteractionInfo writeUnitTestingRangeRestrictedInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeRangeRestrictedInt8uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterRangeRestrictedInt8uCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingRangeRestrictedInt8uCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeRangeRestrictedInt8uAttribute",
-        writeTestClusterRangeRestrictedInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterRangeRestrictedInt8sCommandParams =
+        writeUnitTestingRangeRestrictedInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingRangeRestrictedInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterrangeRestrictedInt8sCommandParameterInfo =
+    CommandParameterInfo unitTestingrangeRestrictedInt8sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterRangeRestrictedInt8sCommandParams.put(
-        "value", testClusterrangeRestrictedInt8sCommandParameterInfo);
-    InteractionInfo writeTestClusterRangeRestrictedInt8sAttributeInteractionInfo =
+    writeUnitTestingRangeRestrictedInt8sCommandParams.put(
+        "value", unitTestingrangeRestrictedInt8sCommandParameterInfo);
+    InteractionInfo writeUnitTestingRangeRestrictedInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeRangeRestrictedInt8sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterRangeRestrictedInt8sCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingRangeRestrictedInt8sCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeRangeRestrictedInt8sAttribute",
-        writeTestClusterRangeRestrictedInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterRangeRestrictedInt16uCommandParams =
+        writeUnitTestingRangeRestrictedInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingRangeRestrictedInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterrangeRestrictedInt16uCommandParameterInfo =
+    CommandParameterInfo unitTestingrangeRestrictedInt16uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterRangeRestrictedInt16uCommandParams.put(
-        "value", testClusterrangeRestrictedInt16uCommandParameterInfo);
-    InteractionInfo writeTestClusterRangeRestrictedInt16uAttributeInteractionInfo =
+    writeUnitTestingRangeRestrictedInt16uCommandParams.put(
+        "value", unitTestingrangeRestrictedInt16uCommandParameterInfo);
+    InteractionInfo writeUnitTestingRangeRestrictedInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeRangeRestrictedInt16uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterRangeRestrictedInt16uCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingRangeRestrictedInt16uCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeRangeRestrictedInt16uAttribute",
-        writeTestClusterRangeRestrictedInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterRangeRestrictedInt16sCommandParams =
+        writeUnitTestingRangeRestrictedInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingRangeRestrictedInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterrangeRestrictedInt16sCommandParameterInfo =
+    CommandParameterInfo unitTestingrangeRestrictedInt16sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterRangeRestrictedInt16sCommandParams.put(
-        "value", testClusterrangeRestrictedInt16sCommandParameterInfo);
-    InteractionInfo writeTestClusterRangeRestrictedInt16sAttributeInteractionInfo =
+    writeUnitTestingRangeRestrictedInt16sCommandParams.put(
+        "value", unitTestingrangeRestrictedInt16sCommandParameterInfo);
+    InteractionInfo writeUnitTestingRangeRestrictedInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeRangeRestrictedInt16sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterRangeRestrictedInt16sCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingRangeRestrictedInt16sCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeRangeRestrictedInt16sAttribute",
-        writeTestClusterRangeRestrictedInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterTimedWriteBooleanCommandParams =
+        writeUnitTestingRangeRestrictedInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingTimedWriteBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustertimedWriteBooleanCommandParameterInfo =
+    CommandParameterInfo unitTestingtimedWriteBooleanCommandParameterInfo =
         new CommandParameterInfo("value", Boolean.class, Boolean.class);
-    writeTestClusterTimedWriteBooleanCommandParams.put(
-        "value", testClustertimedWriteBooleanCommandParameterInfo);
-    InteractionInfo writeTestClusterTimedWriteBooleanAttributeInteractionInfo =
+    writeUnitTestingTimedWriteBooleanCommandParams.put(
+        "value", unitTestingtimedWriteBooleanCommandParameterInfo);
+    InteractionInfo writeUnitTestingTimedWriteBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeTimedWriteBooleanAttribute(
                       (DefaultClusterCallback) callback,
                       (Boolean) commandArguments.get("value"),
                       10000);
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterTimedWriteBooleanCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingTimedWriteBooleanCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeTimedWriteBooleanAttribute",
-        writeTestClusterTimedWriteBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterGeneralErrorBooleanCommandParams =
+        writeUnitTestingTimedWriteBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingGeneralErrorBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClustergeneralErrorBooleanCommandParameterInfo =
+    CommandParameterInfo unitTestinggeneralErrorBooleanCommandParameterInfo =
         new CommandParameterInfo("value", Boolean.class, Boolean.class);
-    writeTestClusterGeneralErrorBooleanCommandParams.put(
-        "value", testClustergeneralErrorBooleanCommandParameterInfo);
-    InteractionInfo writeTestClusterGeneralErrorBooleanAttributeInteractionInfo =
+    writeUnitTestingGeneralErrorBooleanCommandParams.put(
+        "value", unitTestinggeneralErrorBooleanCommandParameterInfo);
+    InteractionInfo writeUnitTestingGeneralErrorBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeGeneralErrorBooleanAttribute(
                       (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterGeneralErrorBooleanCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingGeneralErrorBooleanCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeGeneralErrorBooleanAttribute",
-        writeTestClusterGeneralErrorBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterClusterErrorBooleanCommandParams =
+        writeUnitTestingGeneralErrorBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingClusterErrorBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterclusterErrorBooleanCommandParameterInfo =
+    CommandParameterInfo unitTestingclusterErrorBooleanCommandParameterInfo =
         new CommandParameterInfo("value", Boolean.class, Boolean.class);
-    writeTestClusterClusterErrorBooleanCommandParams.put(
-        "value", testClusterclusterErrorBooleanCommandParameterInfo);
-    InteractionInfo writeTestClusterClusterErrorBooleanAttributeInteractionInfo =
+    writeUnitTestingClusterErrorBooleanCommandParams.put(
+        "value", unitTestingclusterErrorBooleanCommandParameterInfo);
+    InteractionInfo writeUnitTestingClusterErrorBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeClusterErrorBooleanAttribute(
                       (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterClusterErrorBooleanCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingClusterErrorBooleanCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeClusterErrorBooleanAttribute",
-        writeTestClusterClusterErrorBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterUnsupportedCommandParams =
+        writeUnitTestingClusterErrorBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingUnsupportedCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusterunsupportedCommandParameterInfo =
+    CommandParameterInfo unitTestingunsupportedCommandParameterInfo =
         new CommandParameterInfo("value", Boolean.class, Boolean.class);
-    writeTestClusterUnsupportedCommandParams.put(
-        "value", testClusterunsupportedCommandParameterInfo);
-    InteractionInfo writeTestClusterUnsupportedAttributeInteractionInfo =
+    writeUnitTestingUnsupportedCommandParams.put(
+        "value", unitTestingunsupportedCommandParameterInfo);
+    InteractionInfo writeUnitTestingUnsupportedAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeUnsupportedAttribute(
                       (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterUnsupportedCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeUnsupportedAttribute", writeTestClusterUnsupportedAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableBooleanCommandParams =
+            writeUnitTestingUnsupportedCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeUnsupportedAttribute", writeUnitTestingUnsupportedAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableBooleanCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableBooleanCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableBooleanCommandParameterInfo =
         new CommandParameterInfo("value", Boolean.class, Boolean.class);
-    writeTestClusterNullableBooleanCommandParams.put(
-        "value", testClusternullableBooleanCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableBooleanAttributeInteractionInfo =
+    writeUnitTestingNullableBooleanCommandParams.put(
+        "value", unitTestingnullableBooleanCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableBooleanAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableBooleanAttribute(
                       (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableBooleanCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableBooleanAttribute", writeTestClusterNullableBooleanAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableBitmap8CommandParams =
+            writeUnitTestingNullableBooleanCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableBooleanAttribute", writeUnitTestingNullableBooleanAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableBitmap8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableBitmap8CommandParameterInfo =
+    CommandParameterInfo unitTestingnullableBitmap8CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableBitmap8CommandParams.put(
-        "value", testClusternullableBitmap8CommandParameterInfo);
-    InteractionInfo writeTestClusterNullableBitmap8AttributeInteractionInfo =
+    writeUnitTestingNullableBitmap8CommandParams.put(
+        "value", unitTestingnullableBitmap8CommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableBitmap8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableBitmap8Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableBitmap8CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableBitmap8Attribute", writeTestClusterNullableBitmap8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableBitmap16CommandParams =
+            writeUnitTestingNullableBitmap8CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableBitmap8Attribute", writeUnitTestingNullableBitmap8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableBitmap16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableBitmap16CommandParameterInfo =
+    CommandParameterInfo unitTestingnullableBitmap16CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableBitmap16CommandParams.put(
-        "value", testClusternullableBitmap16CommandParameterInfo);
-    InteractionInfo writeTestClusterNullableBitmap16AttributeInteractionInfo =
+    writeUnitTestingNullableBitmap16CommandParams.put(
+        "value", unitTestingnullableBitmap16CommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableBitmap16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableBitmap16Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableBitmap16CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableBitmap16Attribute", writeTestClusterNullableBitmap16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableBitmap32CommandParams =
+            writeUnitTestingNullableBitmap16CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableBitmap16Attribute", writeUnitTestingNullableBitmap16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableBitmap32CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableBitmap32CommandParameterInfo =
+    CommandParameterInfo unitTestingnullableBitmap32CommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableBitmap32CommandParams.put(
-        "value", testClusternullableBitmap32CommandParameterInfo);
-    InteractionInfo writeTestClusterNullableBitmap32AttributeInteractionInfo =
+    writeUnitTestingNullableBitmap32CommandParams.put(
+        "value", unitTestingnullableBitmap32CommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableBitmap32AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableBitmap32Attribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableBitmap32CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableBitmap32Attribute", writeTestClusterNullableBitmap32AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableBitmap64CommandParams =
+            writeUnitTestingNullableBitmap32CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableBitmap32Attribute", writeUnitTestingNullableBitmap32AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableBitmap64CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableBitmap64CommandParameterInfo =
+    CommandParameterInfo unitTestingnullableBitmap64CommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableBitmap64CommandParams.put(
-        "value", testClusternullableBitmap64CommandParameterInfo);
-    InteractionInfo writeTestClusterNullableBitmap64AttributeInteractionInfo =
+    writeUnitTestingNullableBitmap64CommandParams.put(
+        "value", unitTestingnullableBitmap64CommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableBitmap64AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableBitmap64Attribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableBitmap64CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableBitmap64Attribute", writeTestClusterNullableBitmap64AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt8uCommandParams =
+            writeUnitTestingNullableBitmap64CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableBitmap64Attribute", writeUnitTestingNullableBitmap64AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt8uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt8uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableInt8uCommandParams.put(
-        "value", testClusternullableInt8uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt8uAttributeInteractionInfo =
+    writeUnitTestingNullableInt8uCommandParams.put(
+        "value", unitTestingnullableInt8uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt8uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt8uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt8uAttribute", writeTestClusterNullableInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt16uCommandParams =
+            writeUnitTestingNullableInt8uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt8uAttribute", writeUnitTestingNullableInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt16uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt16uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableInt16uCommandParams.put(
-        "value", testClusternullableInt16uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt16uAttributeInteractionInfo =
+    writeUnitTestingNullableInt16uCommandParams.put(
+        "value", unitTestingnullableInt16uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt16uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt16uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt16uAttribute", writeTestClusterNullableInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt24uCommandParams =
+            writeUnitTestingNullableInt16uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt16uAttribute", writeUnitTestingNullableInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt24uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt24uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt24uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt24uCommandParams.put(
-        "value", testClusternullableInt24uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt24uAttributeInteractionInfo =
+    writeUnitTestingNullableInt24uCommandParams.put(
+        "value", unitTestingnullableInt24uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt24uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt24uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt24uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt24uAttribute", writeTestClusterNullableInt24uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt32uCommandParams =
+            writeUnitTestingNullableInt24uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt24uAttribute", writeUnitTestingNullableInt24uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt32uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt32uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt32uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt32uCommandParams.put(
-        "value", testClusternullableInt32uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt32uAttributeInteractionInfo =
+    writeUnitTestingNullableInt32uCommandParams.put(
+        "value", unitTestingnullableInt32uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt32uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt32uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt32uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt32uAttribute", writeTestClusterNullableInt32uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt40uCommandParams =
+            writeUnitTestingNullableInt32uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt32uAttribute", writeUnitTestingNullableInt32uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt40uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt40uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt40uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt40uCommandParams.put(
-        "value", testClusternullableInt40uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt40uAttributeInteractionInfo =
+    writeUnitTestingNullableInt40uCommandParams.put(
+        "value", unitTestingnullableInt40uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt40uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt40uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt40uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt40uAttribute", writeTestClusterNullableInt40uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt48uCommandParams =
+            writeUnitTestingNullableInt40uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt40uAttribute", writeUnitTestingNullableInt40uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt48uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt48uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt48uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt48uCommandParams.put(
-        "value", testClusternullableInt48uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt48uAttributeInteractionInfo =
+    writeUnitTestingNullableInt48uCommandParams.put(
+        "value", unitTestingnullableInt48uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt48uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt48uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt48uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt48uAttribute", writeTestClusterNullableInt48uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt56uCommandParams =
+            writeUnitTestingNullableInt48uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt48uAttribute", writeUnitTestingNullableInt48uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt56uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt56uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt56uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt56uCommandParams.put(
-        "value", testClusternullableInt56uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt56uAttributeInteractionInfo =
+    writeUnitTestingNullableInt56uCommandParams.put(
+        "value", unitTestingnullableInt56uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt56uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt56uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt56uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt56uAttribute", writeTestClusterNullableInt56uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt64uCommandParams =
+            writeUnitTestingNullableInt56uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt56uAttribute", writeUnitTestingNullableInt56uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt64uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt64uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt64uCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt64uCommandParams.put(
-        "value", testClusternullableInt64uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt64uAttributeInteractionInfo =
+    writeUnitTestingNullableInt64uCommandParams.put(
+        "value", unitTestingnullableInt64uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt64uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt64uAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt64uCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt64uAttribute", writeTestClusterNullableInt64uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt8sCommandParams =
+            writeUnitTestingNullableInt64uCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt64uAttribute", writeUnitTestingNullableInt64uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt8sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt8sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableInt8sCommandParams.put(
-        "value", testClusternullableInt8sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt8sAttributeInteractionInfo =
+    writeUnitTestingNullableInt8sCommandParams.put(
+        "value", unitTestingnullableInt8sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt8sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt8sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt8sAttribute", writeTestClusterNullableInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt16sCommandParams =
+            writeUnitTestingNullableInt8sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt8sAttribute", writeUnitTestingNullableInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt16sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt16sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableInt16sCommandParams.put(
-        "value", testClusternullableInt16sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt16sAttributeInteractionInfo =
+    writeUnitTestingNullableInt16sCommandParams.put(
+        "value", unitTestingnullableInt16sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt16sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt16sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt16sAttribute", writeTestClusterNullableInt16sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt24sCommandParams =
+            writeUnitTestingNullableInt16sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt16sAttribute", writeUnitTestingNullableInt16sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt24sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt24sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt24sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt24sCommandParams.put(
-        "value", testClusternullableInt24sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt24sAttributeInteractionInfo =
+    writeUnitTestingNullableInt24sCommandParams.put(
+        "value", unitTestingnullableInt24sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt24sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt24sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt24sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt24sAttribute", writeTestClusterNullableInt24sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt32sCommandParams =
+            writeUnitTestingNullableInt24sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt24sAttribute", writeUnitTestingNullableInt24sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt32sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt32sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt32sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt32sCommandParams.put(
-        "value", testClusternullableInt32sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt32sAttributeInteractionInfo =
+    writeUnitTestingNullableInt32sCommandParams.put(
+        "value", unitTestingnullableInt32sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt32sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt32sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt32sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt32sAttribute", writeTestClusterNullableInt32sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt40sCommandParams =
+            writeUnitTestingNullableInt32sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt32sAttribute", writeUnitTestingNullableInt32sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt40sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt40sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt40sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt40sCommandParams.put(
-        "value", testClusternullableInt40sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt40sAttributeInteractionInfo =
+    writeUnitTestingNullableInt40sCommandParams.put(
+        "value", unitTestingnullableInt40sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt40sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt40sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt40sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt40sAttribute", writeTestClusterNullableInt40sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt48sCommandParams =
+            writeUnitTestingNullableInt40sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt40sAttribute", writeUnitTestingNullableInt40sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt48sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt48sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt48sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt48sCommandParams.put(
-        "value", testClusternullableInt48sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt48sAttributeInteractionInfo =
+    writeUnitTestingNullableInt48sCommandParams.put(
+        "value", unitTestingnullableInt48sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt48sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt48sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt48sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt48sAttribute", writeTestClusterNullableInt48sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt56sCommandParams =
+            writeUnitTestingNullableInt48sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt48sAttribute", writeUnitTestingNullableInt48sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt56sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt56sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt56sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt56sCommandParams.put(
-        "value", testClusternullableInt56sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt56sAttributeInteractionInfo =
+    writeUnitTestingNullableInt56sCommandParams.put(
+        "value", unitTestingnullableInt56sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt56sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt56sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt56sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt56sAttribute", writeTestClusterNullableInt56sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableInt64sCommandParams =
+            writeUnitTestingNullableInt56sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt56sAttribute", writeUnitTestingNullableInt56sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableInt64sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableInt64sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableInt64sCommandParameterInfo =
         new CommandParameterInfo("value", Long.class, Long.class);
-    writeTestClusterNullableInt64sCommandParams.put(
-        "value", testClusternullableInt64sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableInt64sAttributeInteractionInfo =
+    writeUnitTestingNullableInt64sCommandParams.put(
+        "value", unitTestingnullableInt64sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableInt64sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableInt64sAttribute(
                       (DefaultClusterCallback) callback, (Long) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableInt64sCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableInt64sAttribute", writeTestClusterNullableInt64sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableEnum8CommandParams =
+            writeUnitTestingNullableInt64sCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableInt64sAttribute", writeUnitTestingNullableInt64sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableEnum8CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableEnum8CommandParameterInfo =
+    CommandParameterInfo unitTestingnullableEnum8CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableEnum8CommandParams.put(
-        "value", testClusternullableEnum8CommandParameterInfo);
-    InteractionInfo writeTestClusterNullableEnum8AttributeInteractionInfo =
+    writeUnitTestingNullableEnum8CommandParams.put(
+        "value", unitTestingnullableEnum8CommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableEnum8AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableEnum8Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableEnum8CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableEnum8Attribute", writeTestClusterNullableEnum8AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableEnum16CommandParams =
+            writeUnitTestingNullableEnum8CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableEnum8Attribute", writeUnitTestingNullableEnum8AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableEnum16CommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableEnum16CommandParameterInfo =
+    CommandParameterInfo unitTestingnullableEnum16CommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableEnum16CommandParams.put(
-        "value", testClusternullableEnum16CommandParameterInfo);
-    InteractionInfo writeTestClusterNullableEnum16AttributeInteractionInfo =
+    writeUnitTestingNullableEnum16CommandParams.put(
+        "value", unitTestingnullableEnum16CommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableEnum16AttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableEnum16Attribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableEnum16CommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableEnum16Attribute", writeTestClusterNullableEnum16AttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableFloatSingleCommandParams =
+            writeUnitTestingNullableEnum16CommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableEnum16Attribute", writeUnitTestingNullableEnum16AttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableFloatSingleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableFloatSingleCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableFloatSingleCommandParameterInfo =
         new CommandParameterInfo("value", Float.class, Float.class);
-    writeTestClusterNullableFloatSingleCommandParams.put(
-        "value", testClusternullableFloatSingleCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableFloatSingleAttributeInteractionInfo =
+    writeUnitTestingNullableFloatSingleCommandParams.put(
+        "value", unitTestingnullableFloatSingleCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableFloatSingleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableFloatSingleAttribute(
                       (DefaultClusterCallback) callback, (Float) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableFloatSingleCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableFloatSingleCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableFloatSingleAttribute",
-        writeTestClusterNullableFloatSingleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableFloatDoubleCommandParams =
+        writeUnitTestingNullableFloatSingleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableFloatDoubleCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableFloatDoubleCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableFloatDoubleCommandParameterInfo =
         new CommandParameterInfo("value", Double.class, Double.class);
-    writeTestClusterNullableFloatDoubleCommandParams.put(
-        "value", testClusternullableFloatDoubleCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableFloatDoubleAttributeInteractionInfo =
+    writeUnitTestingNullableFloatDoubleCommandParams.put(
+        "value", unitTestingnullableFloatDoubleCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableFloatDoubleAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableFloatDoubleAttribute(
                       (DefaultClusterCallback) callback, (Double) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableFloatDoubleCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableFloatDoubleCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableFloatDoubleAttribute",
-        writeTestClusterNullableFloatDoubleAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableOctetStringCommandParams =
+        writeUnitTestingNullableFloatDoubleAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableOctetStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableOctetStringCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableOctetStringCommandParameterInfo =
         new CommandParameterInfo("value", byte[].class, byte[].class);
-    writeTestClusterNullableOctetStringCommandParams.put(
-        "value", testClusternullableOctetStringCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableOctetStringAttributeInteractionInfo =
+    writeUnitTestingNullableOctetStringCommandParams.put(
+        "value", unitTestingnullableOctetStringCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableOctetStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableOctetStringAttribute(
                       (DefaultClusterCallback) callback, (byte[]) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableOctetStringCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableOctetStringCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableOctetStringAttribute",
-        writeTestClusterNullableOctetStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableCharStringCommandParams =
+        writeUnitTestingNullableOctetStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableCharStringCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableCharStringCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableCharStringCommandParameterInfo =
         new CommandParameterInfo("value", String.class, String.class);
-    writeTestClusterNullableCharStringCommandParams.put(
-        "value", testClusternullableCharStringCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableCharStringAttributeInteractionInfo =
+    writeUnitTestingNullableCharStringCommandParams.put(
+        "value", unitTestingnullableCharStringCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableCharStringAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableCharStringAttribute(
                       (DefaultClusterCallback) callback, (String) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableCharStringCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableCharStringCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableCharStringAttribute",
-        writeTestClusterNullableCharStringAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableEnumAttrCommandParams =
+        writeUnitTestingNullableCharStringAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableEnumAttrCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableEnumAttrCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableEnumAttrCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableEnumAttrCommandParams.put(
-        "value", testClusternullableEnumAttrCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableEnumAttrAttributeInteractionInfo =
+    writeUnitTestingNullableEnumAttrCommandParams.put(
+        "value", unitTestingnullableEnumAttrCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableEnumAttrAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableEnumAttrAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableEnumAttrCommandParams);
-    writeTestClusterInteractionInfo.put(
-        "writeNullableEnumAttrAttribute", writeTestClusterNullableEnumAttrAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableRangeRestrictedInt8uCommandParams =
+            writeUnitTestingNullableEnumAttrCommandParams);
+    writeUnitTestingInteractionInfo.put(
+        "writeNullableEnumAttrAttribute", writeUnitTestingNullableEnumAttrAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableRangeRestrictedInt8uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableRangeRestrictedInt8uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableRangeRestrictedInt8uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableRangeRestrictedInt8uCommandParams.put(
-        "value", testClusternullableRangeRestrictedInt8uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableRangeRestrictedInt8uAttributeInteractionInfo =
+    writeUnitTestingNullableRangeRestrictedInt8uCommandParams.put(
+        "value", unitTestingnullableRangeRestrictedInt8uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableRangeRestrictedInt8uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableRangeRestrictedInt8uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableRangeRestrictedInt8uCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableRangeRestrictedInt8uCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableRangeRestrictedInt8uAttribute",
-        writeTestClusterNullableRangeRestrictedInt8uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableRangeRestrictedInt8sCommandParams =
+        writeUnitTestingNullableRangeRestrictedInt8uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableRangeRestrictedInt8sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableRangeRestrictedInt8sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableRangeRestrictedInt8sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableRangeRestrictedInt8sCommandParams.put(
-        "value", testClusternullableRangeRestrictedInt8sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableRangeRestrictedInt8sAttributeInteractionInfo =
+    writeUnitTestingNullableRangeRestrictedInt8sCommandParams.put(
+        "value", unitTestingnullableRangeRestrictedInt8sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableRangeRestrictedInt8sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableRangeRestrictedInt8sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableRangeRestrictedInt8sCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableRangeRestrictedInt8sCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableRangeRestrictedInt8sAttribute",
-        writeTestClusterNullableRangeRestrictedInt8sAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableRangeRestrictedInt16uCommandParams =
+        writeUnitTestingNullableRangeRestrictedInt8sAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableRangeRestrictedInt16uCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableRangeRestrictedInt16uCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableRangeRestrictedInt16uCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableRangeRestrictedInt16uCommandParams.put(
-        "value", testClusternullableRangeRestrictedInt16uCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableRangeRestrictedInt16uAttributeInteractionInfo =
+    writeUnitTestingNullableRangeRestrictedInt16uCommandParams.put(
+        "value", unitTestingnullableRangeRestrictedInt16uCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableRangeRestrictedInt16uAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableRangeRestrictedInt16uAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableRangeRestrictedInt16uCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableRangeRestrictedInt16uCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableRangeRestrictedInt16uAttribute",
-        writeTestClusterNullableRangeRestrictedInt16uAttributeInteractionInfo);
-    Map<String, CommandParameterInfo> writeTestClusterNullableRangeRestrictedInt16sCommandParams =
+        writeUnitTestingNullableRangeRestrictedInt16uAttributeInteractionInfo);
+    Map<String, CommandParameterInfo> writeUnitTestingNullableRangeRestrictedInt16sCommandParams =
         new LinkedHashMap<String, CommandParameterInfo>();
-    CommandParameterInfo testClusternullableRangeRestrictedInt16sCommandParameterInfo =
+    CommandParameterInfo unitTestingnullableRangeRestrictedInt16sCommandParameterInfo =
         new CommandParameterInfo("value", Integer.class, Integer.class);
-    writeTestClusterNullableRangeRestrictedInt16sCommandParams.put(
-        "value", testClusternullableRangeRestrictedInt16sCommandParameterInfo);
-    InteractionInfo writeTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo =
+    writeUnitTestingNullableRangeRestrictedInt16sCommandParams.put(
+        "value", unitTestingnullableRangeRestrictedInt16sCommandParameterInfo);
+    InteractionInfo writeUnitTestingNullableRangeRestrictedInt16sAttributeInteractionInfo =
         new InteractionInfo(
             (cluster, callback, commandArguments) -> {
-              ((ChipClusters.TestClusterCluster) cluster)
+              ((ChipClusters.UnitTestingCluster) cluster)
                   .writeNullableRangeRestrictedInt16sAttribute(
                       (DefaultClusterCallback) callback, (Integer) commandArguments.get("value"));
             },
             () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
-            writeTestClusterNullableRangeRestrictedInt16sCommandParams);
-    writeTestClusterInteractionInfo.put(
+            writeUnitTestingNullableRangeRestrictedInt16sCommandParams);
+    writeUnitTestingInteractionInfo.put(
         "writeNullableRangeRestrictedInt16sAttribute",
-        writeTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo);
-    writeAttributeMap.put("testCluster", writeTestClusterInteractionInfo);
+        writeUnitTestingNullableRangeRestrictedInt16sAttributeInteractionInfo);
+    writeAttributeMap.put("unitTesting", writeUnitTestingInteractionInfo);
     return writeAttributeMap;
   }
 }
diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py
index 9c07108..96ccacc 100644
--- a/src/controller/python/chip/ChipDeviceCtrl.py
+++ b/src/controller/python/chip/ChipDeviceCtrl.py
@@ -867,7 +867,7 @@
                               timeout value based on transport characteristics as well as the responsiveness of the target.
 
         E.g
-            (1, Clusters.TestCluster.Attributes.XYZAttribute('hello')) -- Write 'hello' to the XYZ attribute on the test cluster to endpoint 1
+            (1, Clusters.UnitTesting.Attributes.XYZAttribute('hello')) -- Write 'hello' to the XYZ attribute on the test cluster to endpoint 1
         '''
         self.CheckIsActive()
 
diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py
index d7608f8..795f9ba 100644
--- a/src/controller/python/chip/clusters/Attribute.py
+++ b/src/controller/python/chip/clusters/Attribute.py
@@ -347,8 +347,8 @@
         cluster and attribute IDs, but instead by the cluster object descriptor types for each of those generated
         cluster objects.
 
-            E.g Clusters.TestCluster is the literal key for indexing the test cluster.
-                Clusters.TestCluster.Attributes.Int16u is the listeral key for indexing an attribute in the test cluster.
+            E.g Clusters.UnitTesting.is the literal key for indexing the test cluster.
+                Clusters.UnitTesting.Attributes.Int16u is the listeral key for indexing an attribute in the test cluster.
 
         This strongly typed keys permit a more natural and safer form of indexing.
     '''
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 7cea4b1..85c7d91 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -6737,8 +6737,8 @@
                 },
             },
     }
-    _TEST_CLUSTER_CLUSTER_INFO = {
-            "clusterName": "TestCluster",
+    _UNIT_TESTING_CLUSTER_INFO = {
+            "clusterName": "UnitTesting",
             "clusterId": 0xFFF1FC05,
             "commands": {
             0x00000000: {
@@ -7568,7 +7568,7 @@
     0x0000050D: _APPLICATION_BASIC_CLUSTER_INFO,
     0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO,
     0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO,
-    0xFFF1FC05: _TEST_CLUSTER_CLUSTER_INFO,
+    0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO,
     }
 
     _CLUSTER_NAME_DICT = {
@@ -7636,7 +7636,7 @@
         "ApplicationBasic": _APPLICATION_BASIC_CLUSTER_INFO,
         "AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO,
         "ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_CLUSTER_INFO,
-        "TestCluster": _TEST_CLUSTER_CLUSTER_INFO,
+        "UnitTesting": _UNIT_TESTING_CLUSTER_INFO,
     }
 
     def __init__(self, chipstack):
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 476925f..ebe66de 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -26806,7 +26806,7 @@
 
 
 @dataclass
-class TestCluster(Cluster):
+class UnitTesting(Cluster):
     id: typing.ClassVar[int] = 0xFFF1FC05
 
     @ChipUtility.classproperty
@@ -26841,22 +26841,22 @@
                 ClusterObjectFieldDescriptor(Label="octetString", Tag=0x00000019, Type=bytes),
                 ClusterObjectFieldDescriptor(Label="listInt8u", Tag=0x0000001A, Type=typing.List[uint]),
                 ClusterObjectFieldDescriptor(Label="listOctetString", Tag=0x0000001B, Type=typing.List[bytes]),
-                ClusterObjectFieldDescriptor(Label="listStructOctetString", Tag=0x0000001C, Type=typing.List[TestCluster.Structs.TestListStructOctet]),
+                ClusterObjectFieldDescriptor(Label="listStructOctetString", Tag=0x0000001C, Type=typing.List[UnitTesting.Structs.TestListStructOctet]),
                 ClusterObjectFieldDescriptor(Label="longOctetString", Tag=0x0000001D, Type=bytes),
                 ClusterObjectFieldDescriptor(Label="charString", Tag=0x0000001E, Type=str),
                 ClusterObjectFieldDescriptor(Label="longCharString", Tag=0x0000001F, Type=str),
                 ClusterObjectFieldDescriptor(Label="epochUs", Tag=0x00000020, Type=uint),
                 ClusterObjectFieldDescriptor(Label="epochS", Tag=0x00000021, Type=uint),
                 ClusterObjectFieldDescriptor(Label="vendorId", Tag=0x00000022, Type=uint),
-                ClusterObjectFieldDescriptor(Label="listNullablesAndOptionalsStruct", Tag=0x00000023, Type=typing.List[TestCluster.Structs.NullablesAndOptionalsStruct]),
-                ClusterObjectFieldDescriptor(Label="enumAttr", Tag=0x00000024, Type=TestCluster.Enums.SimpleEnum),
-                ClusterObjectFieldDescriptor(Label="structAttr", Tag=0x00000025, Type=TestCluster.Structs.SimpleStruct),
+                ClusterObjectFieldDescriptor(Label="listNullablesAndOptionalsStruct", Tag=0x00000023, Type=typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct]),
+                ClusterObjectFieldDescriptor(Label="enumAttr", Tag=0x00000024, Type=UnitTesting.Enums.SimpleEnum),
+                ClusterObjectFieldDescriptor(Label="structAttr", Tag=0x00000025, Type=UnitTesting.Structs.SimpleStruct),
                 ClusterObjectFieldDescriptor(Label="rangeRestrictedInt8u", Tag=0x00000026, Type=uint),
                 ClusterObjectFieldDescriptor(Label="rangeRestrictedInt8s", Tag=0x00000027, Type=int),
                 ClusterObjectFieldDescriptor(Label="rangeRestrictedInt16u", Tag=0x00000028, Type=uint),
                 ClusterObjectFieldDescriptor(Label="rangeRestrictedInt16s", Tag=0x00000029, Type=int),
                 ClusterObjectFieldDescriptor(Label="listLongOctetString", Tag=0x0000002A, Type=typing.List[bytes]),
-                ClusterObjectFieldDescriptor(Label="listFabricScoped", Tag=0x0000002B, Type=typing.List[TestCluster.Structs.TestFabricScoped]),
+                ClusterObjectFieldDescriptor(Label="listFabricScoped", Tag=0x0000002B, Type=typing.List[UnitTesting.Structs.TestFabricScoped]),
                 ClusterObjectFieldDescriptor(Label="timedWriteBoolean", Tag=0x00000030, Type=bool),
                 ClusterObjectFieldDescriptor(Label="generalErrorBoolean", Tag=0x00000031, Type=bool),
                 ClusterObjectFieldDescriptor(Label="clusterErrorBoolean", Tag=0x00000032, Type=bool),
@@ -26888,8 +26888,8 @@
                 ClusterObjectFieldDescriptor(Label="nullableFloatDouble", Tag=0x00004018, Type=typing.Union[Nullable, float]),
                 ClusterObjectFieldDescriptor(Label="nullableOctetString", Tag=0x00004019, Type=typing.Union[Nullable, bytes]),
                 ClusterObjectFieldDescriptor(Label="nullableCharString", Tag=0x0000401E, Type=typing.Union[Nullable, str]),
-                ClusterObjectFieldDescriptor(Label="nullableEnumAttr", Tag=0x00004024, Type=typing.Union[Nullable, TestCluster.Enums.SimpleEnum]),
-                ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=0x00004025, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]),
+                ClusterObjectFieldDescriptor(Label="nullableEnumAttr", Tag=0x00004024, Type=typing.Union[Nullable, UnitTesting.Enums.SimpleEnum]),
+                ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=0x00004025, Type=typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]),
                 ClusterObjectFieldDescriptor(Label="nullableRangeRestrictedInt8u", Tag=0x00004026, Type=typing.Union[Nullable, uint]),
                 ClusterObjectFieldDescriptor(Label="nullableRangeRestrictedInt8s", Tag=0x00004027, Type=typing.Union[Nullable, int]),
                 ClusterObjectFieldDescriptor(Label="nullableRangeRestrictedInt16u", Tag=0x00004028, Type=typing.Union[Nullable, uint]),
@@ -26930,22 +26930,22 @@
     octetString: 'bytes' = None
     listInt8u: 'typing.List[uint]' = None
     listOctetString: 'typing.List[bytes]' = None
-    listStructOctetString: 'typing.List[TestCluster.Structs.TestListStructOctet]' = None
+    listStructOctetString: 'typing.List[UnitTesting.Structs.TestListStructOctet]' = None
     longOctetString: 'bytes' = None
     charString: 'str' = None
     longCharString: 'str' = None
     epochUs: 'uint' = None
     epochS: 'uint' = None
     vendorId: 'uint' = None
-    listNullablesAndOptionalsStruct: 'typing.List[TestCluster.Structs.NullablesAndOptionalsStruct]' = None
-    enumAttr: 'TestCluster.Enums.SimpleEnum' = None
-    structAttr: 'TestCluster.Structs.SimpleStruct' = None
+    listNullablesAndOptionalsStruct: 'typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct]' = None
+    enumAttr: 'UnitTesting.Enums.SimpleEnum' = None
+    structAttr: 'UnitTesting.Structs.SimpleStruct' = None
     rangeRestrictedInt8u: 'uint' = None
     rangeRestrictedInt8s: 'int' = None
     rangeRestrictedInt16u: 'uint' = None
     rangeRestrictedInt16s: 'int' = None
     listLongOctetString: 'typing.List[bytes]' = None
-    listFabricScoped: 'typing.List[TestCluster.Structs.TestFabricScoped]' = None
+    listFabricScoped: 'typing.List[UnitTesting.Structs.TestFabricScoped]' = None
     timedWriteBoolean: 'bool' = None
     generalErrorBoolean: 'bool' = None
     clusterErrorBoolean: 'bool' = None
@@ -26977,8 +26977,8 @@
     nullableFloatDouble: 'typing.Union[Nullable, float]' = None
     nullableOctetString: 'typing.Union[Nullable, bytes]' = None
     nullableCharString: 'typing.Union[Nullable, str]' = None
-    nullableEnumAttr: 'typing.Union[Nullable, TestCluster.Enums.SimpleEnum]' = None
-    nullableStruct: 'typing.Union[Nullable, TestCluster.Structs.SimpleStruct]' = None
+    nullableEnumAttr: 'typing.Union[Nullable, UnitTesting.Enums.SimpleEnum]' = None
+    nullableStruct: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = None
     nullableRangeRestrictedInt8u: 'typing.Union[Nullable, uint]' = None
     nullableRangeRestrictedInt8s: 'typing.Union[Nullable, int]' = None
     nullableRangeRestrictedInt16u: 'typing.Union[Nullable, uint]' = None
@@ -27007,7 +27007,7 @@
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=uint),
                             ClusterObjectFieldDescriptor(Label="b", Tag=1, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=UnitTesting.Enums.SimpleEnum),
                             ClusterObjectFieldDescriptor(Label="d", Tag=3, Type=bytes),
                             ClusterObjectFieldDescriptor(Label="e", Tag=4, Type=str),
                             ClusterObjectFieldDescriptor(Label="f", Tag=5, Type=uint),
@@ -27017,7 +27017,7 @@
 
             a: 'uint' = 0
             b: 'bool' = False
-            c: 'TestCluster.Enums.SimpleEnum' = 0
+            c: 'UnitTesting.Enums.SimpleEnum' = 0
             d: 'bytes' = b""
             e: 'str' = ""
             f: 'uint' = 0
@@ -27035,7 +27035,7 @@
                             ClusterObjectFieldDescriptor(Label="nullableFabricSensitiveInt8u", Tag=3, Type=typing.Union[Nullable, uint]),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalFabricSensitiveInt8u", Tag=4, Type=typing.Union[None, Nullable, uint]),
                             ClusterObjectFieldDescriptor(Label="fabricSensitiveCharString", Tag=5, Type=str),
-                            ClusterObjectFieldDescriptor(Label="fabricSensitiveStruct", Tag=6, Type=TestCluster.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="fabricSensitiveStruct", Tag=6, Type=UnitTesting.Structs.SimpleStruct),
                             ClusterObjectFieldDescriptor(Label="fabricSensitiveInt8uList", Tag=7, Type=typing.List[uint]),
                             ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint),
                     ])
@@ -27045,7 +27045,7 @@
             nullableFabricSensitiveInt8u: 'typing.Union[Nullable, uint]' = NullValue
             nullableOptionalFabricSensitiveInt8u: 'typing.Union[None, Nullable, uint]' = None
             fabricSensitiveCharString: 'str' = ""
-            fabricSensitiveStruct: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
+            fabricSensitiveStruct: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
             fabricSensitiveInt8uList: 'typing.List[uint]' = field(default_factory=lambda: [])
             fabricIndex: 'uint' = 0
 
@@ -27061,12 +27061,12 @@
                             ClusterObjectFieldDescriptor(Label="nullableString", Tag=3, Type=typing.Union[Nullable, str]),
                             ClusterObjectFieldDescriptor(Label="optionalString", Tag=4, Type=typing.Optional[str]),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalString", Tag=5, Type=typing.Union[None, Nullable, str]),
-                            ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=6, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="optionalStruct", Tag=7, Type=typing.Optional[TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="nullableOptionalStruct", Tag=8, Type=typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="nullableList", Tag=9, Type=typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]),
-                            ClusterObjectFieldDescriptor(Label="optionalList", Tag=10, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]),
-                            ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=6, Type=typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="optionalStruct", Tag=7, Type=typing.Optional[UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="nullableOptionalStruct", Tag=8, Type=typing.Union[None, Nullable, UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="nullableList", Tag=9, Type=typing.Union[Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="optionalList", Tag=10, Type=typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]),
                     ])
 
             nullableInt: 'typing.Union[Nullable, uint]' = NullValue
@@ -27075,12 +27075,12 @@
             nullableString: 'typing.Union[Nullable, str]' = NullValue
             optionalString: 'typing.Optional[str]' = None
             nullableOptionalString: 'typing.Union[None, Nullable, str]' = None
-            nullableStruct: 'typing.Union[Nullable, TestCluster.Structs.SimpleStruct]' = NullValue
-            optionalStruct: 'typing.Optional[TestCluster.Structs.SimpleStruct]' = None
-            nullableOptionalStruct: 'typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]' = None
-            nullableList: 'typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]' = NullValue
-            optionalList: 'typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]' = None
-            nullableOptionalList: 'typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]' = None
+            nullableStruct: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = NullValue
+            optionalStruct: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None
+            nullableOptionalStruct: 'typing.Union[None, Nullable, UnitTesting.Structs.SimpleStruct]' = None
+            nullableList: 'typing.Union[Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]' = NullValue
+            optionalList: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None
+            nullableOptionalList: 'typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]' = None
 
         @dataclass
         class NestedStruct(ClusterObject):
@@ -27090,12 +27090,12 @@
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=uint),
                             ClusterObjectFieldDescriptor(Label="b", Tag=1, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=TestCluster.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=UnitTesting.Structs.SimpleStruct),
                     ])
 
             a: 'uint' = 0
             b: 'bool' = False
-            c: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
+            c: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
 
         @dataclass
         class NestedStructList(ClusterObject):
@@ -27105,8 +27105,8 @@
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=uint),
                             ClusterObjectFieldDescriptor(Label="b", Tag=1, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=TestCluster.Structs.SimpleStruct),
-                            ClusterObjectFieldDescriptor(Label="d", Tag=3, Type=typing.List[TestCluster.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=UnitTesting.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="d", Tag=3, Type=typing.List[UnitTesting.Structs.SimpleStruct]),
                             ClusterObjectFieldDescriptor(Label="e", Tag=4, Type=typing.List[uint]),
                             ClusterObjectFieldDescriptor(Label="f", Tag=5, Type=typing.List[bytes]),
                             ClusterObjectFieldDescriptor(Label="g", Tag=6, Type=typing.List[uint]),
@@ -27114,8 +27114,8 @@
 
             a: 'uint' = 0
             b: 'bool' = False
-            c: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
-            d: 'typing.List[TestCluster.Structs.SimpleStruct]' = field(default_factory=lambda: [])
+            c: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
+            d: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: [])
             e: 'typing.List[uint]' = field(default_factory=lambda: [])
             f: 'typing.List[bytes]' = field(default_factory=lambda: [])
             g: 'typing.List[uint]' = field(default_factory=lambda: [])
@@ -27126,10 +27126,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=typing.List[TestCluster.Structs.NestedStructList]),
+                            ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=typing.List[UnitTesting.Structs.NestedStructList]),
                     ])
 
-            a: 'typing.List[TestCluster.Structs.NestedStructList]' = field(default_factory=lambda: [])
+            a: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: [])
 
         @dataclass
         class TestListStructOctet(ClusterObject):
@@ -27262,19 +27262,19 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[TestCluster.Structs.NestedStructList]),
-                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=typing.List[TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="arg3", Tag=2, Type=typing.List[TestCluster.Enums.SimpleEnum]),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[UnitTesting.Structs.NestedStructList]),
+                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=typing.List[UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="arg3", Tag=2, Type=typing.List[UnitTesting.Enums.SimpleEnum]),
                             ClusterObjectFieldDescriptor(Label="arg4", Tag=3, Type=typing.List[bool]),
-                            ClusterObjectFieldDescriptor(Label="arg5", Tag=4, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="arg5", Tag=4, Type=UnitTesting.Enums.SimpleEnum),
                             ClusterObjectFieldDescriptor(Label="arg6", Tag=5, Type=bool),
                     ])
 
-            arg1: 'typing.List[TestCluster.Structs.NestedStructList]' = field(default_factory=lambda: [])
-            arg2: 'typing.List[TestCluster.Structs.SimpleStruct]' = field(default_factory=lambda: [])
-            arg3: 'typing.List[TestCluster.Enums.SimpleEnum]' = field(default_factory=lambda: [])
+            arg1: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: [])
+            arg2: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: [])
+            arg3: 'typing.List[UnitTesting.Enums.SimpleEnum]' = field(default_factory=lambda: [])
             arg4: 'typing.List[bool]' = field(default_factory=lambda: [])
-            arg5: 'TestCluster.Enums.SimpleEnum' = 0
+            arg5: 'UnitTesting.Enums.SimpleEnum' = 0
             arg6: 'bool' = False
 
         @dataclass
@@ -27339,11 +27339,11 @@
                 return ClusterObjectDescriptor(
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint),
-                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=UnitTesting.Enums.SimpleEnum),
                     ])
 
             arg1: 'uint' = 0
-            arg2: 'TestCluster.Enums.SimpleEnum' = 0
+            arg2: 'UnitTesting.Enums.SimpleEnum' = 0
 
         @dataclass
         class TestStructArrayArgumentRequest(ClusterCommand):
@@ -27356,19 +27356,19 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[TestCluster.Structs.NestedStructList]),
-                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=typing.List[TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="arg3", Tag=2, Type=typing.List[TestCluster.Enums.SimpleEnum]),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[UnitTesting.Structs.NestedStructList]),
+                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=typing.List[UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="arg3", Tag=2, Type=typing.List[UnitTesting.Enums.SimpleEnum]),
                             ClusterObjectFieldDescriptor(Label="arg4", Tag=3, Type=typing.List[bool]),
-                            ClusterObjectFieldDescriptor(Label="arg5", Tag=4, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="arg5", Tag=4, Type=UnitTesting.Enums.SimpleEnum),
                             ClusterObjectFieldDescriptor(Label="arg6", Tag=5, Type=bool),
                     ])
 
-            arg1: 'typing.List[TestCluster.Structs.NestedStructList]' = field(default_factory=lambda: [])
-            arg2: 'typing.List[TestCluster.Structs.SimpleStruct]' = field(default_factory=lambda: [])
-            arg3: 'typing.List[TestCluster.Enums.SimpleEnum]' = field(default_factory=lambda: [])
+            arg1: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: [])
+            arg2: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: [])
+            arg3: 'typing.List[UnitTesting.Enums.SimpleEnum]' = field(default_factory=lambda: [])
             arg4: 'typing.List[bool]' = field(default_factory=lambda: [])
-            arg5: 'TestCluster.Enums.SimpleEnum' = 0
+            arg5: 'UnitTesting.Enums.SimpleEnum' = 0
             arg6: 'bool' = False
 
         @dataclass
@@ -27404,10 +27404,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=TestCluster.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.SimpleStruct),
                     ])
 
-            arg1: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
+            arg1: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
 
         @dataclass
         class TestComplexNullableOptionalResponse(ClusterCommand):
@@ -27435,19 +27435,19 @@
                             ClusterObjectFieldDescriptor(Label="nullableOptionalStringWasNull", Tag=12, Type=typing.Optional[bool]),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalStringValue", Tag=13, Type=typing.Optional[str]),
                             ClusterObjectFieldDescriptor(Label="nullableStructWasNull", Tag=14, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="nullableStructValue", Tag=15, Type=typing.Optional[TestCluster.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="nullableStructValue", Tag=15, Type=typing.Optional[UnitTesting.Structs.SimpleStruct]),
                             ClusterObjectFieldDescriptor(Label="optionalStructWasPresent", Tag=16, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="optionalStructValue", Tag=17, Type=typing.Optional[TestCluster.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="optionalStructValue", Tag=17, Type=typing.Optional[UnitTesting.Structs.SimpleStruct]),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalStructWasPresent", Tag=18, Type=bool),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalStructWasNull", Tag=19, Type=typing.Optional[bool]),
-                            ClusterObjectFieldDescriptor(Label="nullableOptionalStructValue", Tag=20, Type=typing.Optional[TestCluster.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="nullableOptionalStructValue", Tag=20, Type=typing.Optional[UnitTesting.Structs.SimpleStruct]),
                             ClusterObjectFieldDescriptor(Label="nullableListWasNull", Tag=21, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="nullableListValue", Tag=22, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="nullableListValue", Tag=22, Type=typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]),
                             ClusterObjectFieldDescriptor(Label="optionalListWasPresent", Tag=23, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="optionalListValue", Tag=24, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="optionalListValue", Tag=24, Type=typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalListWasPresent", Tag=25, Type=bool),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalListWasNull", Tag=26, Type=typing.Optional[bool]),
-                            ClusterObjectFieldDescriptor(Label="nullableOptionalListValue", Tag=27, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="nullableOptionalListValue", Tag=27, Type=typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]),
                     ])
 
             nullableIntWasNull: 'bool' = False
@@ -27465,19 +27465,19 @@
             nullableOptionalStringWasNull: 'typing.Optional[bool]' = None
             nullableOptionalStringValue: 'typing.Optional[str]' = None
             nullableStructWasNull: 'bool' = False
-            nullableStructValue: 'typing.Optional[TestCluster.Structs.SimpleStruct]' = None
+            nullableStructValue: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None
             optionalStructWasPresent: 'bool' = False
-            optionalStructValue: 'typing.Optional[TestCluster.Structs.SimpleStruct]' = None
+            optionalStructValue: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None
             nullableOptionalStructWasPresent: 'bool' = False
             nullableOptionalStructWasNull: 'typing.Optional[bool]' = None
-            nullableOptionalStructValue: 'typing.Optional[TestCluster.Structs.SimpleStruct]' = None
+            nullableOptionalStructValue: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None
             nullableListWasNull: 'bool' = False
-            nullableListValue: 'typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]' = None
+            nullableListValue: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None
             optionalListWasPresent: 'bool' = False
-            optionalListValue: 'typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]' = None
+            optionalListValue: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None
             nullableOptionalListWasPresent: 'bool' = False
             nullableOptionalListWasNull: 'typing.Optional[bool]' = None
-            nullableOptionalListValue: 'typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]' = None
+            nullableOptionalListValue: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None
 
         @dataclass
         class TestNestedStructArgumentRequest(ClusterCommand):
@@ -27490,10 +27490,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=TestCluster.Structs.NestedStruct),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.NestedStruct),
                     ])
 
-            arg1: 'TestCluster.Structs.NestedStruct' = field(default_factory=lambda: TestCluster.Structs.NestedStruct())
+            arg1: 'UnitTesting.Structs.NestedStruct' = field(default_factory=lambda: UnitTesting.Structs.NestedStruct())
 
         @dataclass
         class BooleanResponse(ClusterCommand):
@@ -27522,10 +27522,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[TestCluster.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[UnitTesting.Structs.SimpleStruct]),
                     ])
 
-            arg1: 'typing.List[TestCluster.Structs.SimpleStruct]' = field(default_factory=lambda: [])
+            arg1: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: [])
 
         @dataclass
         class SimpleStructResponse(ClusterCommand):
@@ -27538,10 +27538,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=TestCluster.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.SimpleStruct),
                     ])
 
-            arg1: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
+            arg1: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
 
         @dataclass
         class TestListInt8UArgumentRequest(ClusterCommand):
@@ -27586,10 +27586,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=TestCluster.Structs.NestedStructList),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.NestedStructList),
                     ])
 
-            arg1: 'TestCluster.Structs.NestedStructList' = field(default_factory=lambda: TestCluster.Structs.NestedStructList())
+            arg1: 'UnitTesting.Structs.NestedStructList' = field(default_factory=lambda: UnitTesting.Structs.NestedStructList())
 
         @dataclass
         class TestEmitTestFabricScopedEventResponse(ClusterCommand):
@@ -27618,10 +27618,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[TestCluster.Structs.NestedStructList]),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[UnitTesting.Structs.NestedStructList]),
                     ])
 
-            arg1: 'typing.List[TestCluster.Structs.NestedStructList]' = field(default_factory=lambda: [])
+            arg1: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: [])
 
         @dataclass
         class TestListInt8UReverseRequest(ClusterCommand):
@@ -27651,11 +27651,11 @@
                 return ClusterObjectDescriptor(
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint),
-                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=UnitTesting.Enums.SimpleEnum),
                     ])
 
             arg1: 'uint' = 0
-            arg2: 'TestCluster.Enums.SimpleEnum' = 0
+            arg2: 'UnitTesting.Enums.SimpleEnum' = 0
 
         @dataclass
         class TestNullableOptionalRequest(ClusterCommand):
@@ -27690,12 +27690,12 @@
                             ClusterObjectFieldDescriptor(Label="nullableString", Tag=3, Type=typing.Union[Nullable, str]),
                             ClusterObjectFieldDescriptor(Label="optionalString", Tag=4, Type=typing.Optional[str]),
                             ClusterObjectFieldDescriptor(Label="nullableOptionalString", Tag=5, Type=typing.Union[None, Nullable, str]),
-                            ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=6, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="optionalStruct", Tag=7, Type=typing.Optional[TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="nullableOptionalStruct", Tag=8, Type=typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="nullableList", Tag=9, Type=typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]),
-                            ClusterObjectFieldDescriptor(Label="optionalList", Tag=10, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]),
-                            ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=6, Type=typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="optionalStruct", Tag=7, Type=typing.Optional[UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="nullableOptionalStruct", Tag=8, Type=typing.Union[None, Nullable, UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="nullableList", Tag=9, Type=typing.Union[Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="optionalList", Tag=10, Type=typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]),
+                            ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]),
                     ])
 
             nullableInt: 'typing.Union[Nullable, uint]' = NullValue
@@ -27704,12 +27704,12 @@
             nullableString: 'typing.Union[Nullable, str]' = NullValue
             optionalString: 'typing.Optional[str]' = None
             nullableOptionalString: 'typing.Union[None, Nullable, str]' = None
-            nullableStruct: 'typing.Union[Nullable, TestCluster.Structs.SimpleStruct]' = NullValue
-            optionalStruct: 'typing.Optional[TestCluster.Structs.SimpleStruct]' = None
-            nullableOptionalStruct: 'typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]' = None
-            nullableList: 'typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]' = NullValue
-            optionalList: 'typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]' = None
-            nullableOptionalList: 'typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]' = None
+            nullableStruct: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = NullValue
+            optionalStruct: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None
+            nullableOptionalStruct: 'typing.Union[None, Nullable, UnitTesting.Structs.SimpleStruct]' = None
+            nullableList: 'typing.Union[Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]' = NullValue
+            optionalList: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None
+            nullableOptionalList: 'typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]' = None
 
         @dataclass
         class SimpleStructEchoRequest(ClusterCommand):
@@ -27722,10 +27722,10 @@
             def descriptor(cls) -> ClusterObjectDescriptor:
                 return ClusterObjectDescriptor(
                     Fields = [
-                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=TestCluster.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.SimpleStruct),
                     ])
 
-            arg1: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
+            arg1: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
 
         @dataclass
         class TimedInvokeRequest(ClusterCommand):
@@ -27773,12 +27773,12 @@
                 return ClusterObjectDescriptor(
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint),
-                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=UnitTesting.Enums.SimpleEnum),
                             ClusterObjectFieldDescriptor(Label="arg3", Tag=2, Type=bool),
                     ])
 
             arg1: 'uint' = 0
-            arg2: 'TestCluster.Enums.SimpleEnum' = 0
+            arg2: 'UnitTesting.Enums.SimpleEnum' = 0
             arg3: 'bool' = False
 
         @dataclass
@@ -28259,9 +28259,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=typing.List[TestCluster.Structs.TestListStructOctet])
+                return ClusterObjectFieldDescriptor(Type=typing.List[UnitTesting.Structs.TestListStructOctet])
 
-            value: 'typing.List[TestCluster.Structs.TestListStructOctet]' = field(default_factory=lambda: [])
+            value: 'typing.List[UnitTesting.Structs.TestListStructOctet]' = field(default_factory=lambda: [])
 
         @dataclass
         class LongOctetString(ClusterAttributeDescriptor):
@@ -28371,9 +28371,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=typing.List[TestCluster.Structs.NullablesAndOptionalsStruct])
+                return ClusterObjectFieldDescriptor(Type=typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct])
 
-            value: 'typing.List[TestCluster.Structs.NullablesAndOptionalsStruct]' = field(default_factory=lambda: [])
+            value: 'typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct]' = field(default_factory=lambda: [])
 
         @dataclass
         class EnumAttr(ClusterAttributeDescriptor):
@@ -28387,9 +28387,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=TestCluster.Enums.SimpleEnum)
+                return ClusterObjectFieldDescriptor(Type=UnitTesting.Enums.SimpleEnum)
 
-            value: 'TestCluster.Enums.SimpleEnum' = 0
+            value: 'UnitTesting.Enums.SimpleEnum' = 0
 
         @dataclass
         class StructAttr(ClusterAttributeDescriptor):
@@ -28403,9 +28403,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=TestCluster.Structs.SimpleStruct)
+                return ClusterObjectFieldDescriptor(Type=UnitTesting.Structs.SimpleStruct)
 
-            value: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
+            value: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
 
         @dataclass
         class RangeRestrictedInt8u(ClusterAttributeDescriptor):
@@ -28499,9 +28499,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=typing.List[TestCluster.Structs.TestFabricScoped])
+                return ClusterObjectFieldDescriptor(Type=typing.List[UnitTesting.Structs.TestFabricScoped])
 
-            value: 'typing.List[TestCluster.Structs.TestFabricScoped]' = field(default_factory=lambda: [])
+            value: 'typing.List[UnitTesting.Structs.TestFabricScoped]' = field(default_factory=lambda: [])
 
         @dataclass
         class TimedWriteBoolean(ClusterAttributeDescriptor):
@@ -29015,9 +29015,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, TestCluster.Enums.SimpleEnum])
+                return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, UnitTesting.Enums.SimpleEnum])
 
-            value: 'typing.Union[Nullable, TestCluster.Enums.SimpleEnum]' = NullValue
+            value: 'typing.Union[Nullable, UnitTesting.Enums.SimpleEnum]' = NullValue
 
         @dataclass
         class NullableStruct(ClusterAttributeDescriptor):
@@ -29031,9 +29031,9 @@
 
             @ChipUtility.classproperty
             def attribute_type(cls) -> ClusterObjectFieldDescriptor:
-                return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct])
+                return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, UnitTesting.Structs.SimpleStruct])
 
-            value: 'typing.Union[Nullable, TestCluster.Structs.SimpleStruct]' = NullValue
+            value: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = NullValue
 
         @dataclass
         class NullableRangeRestrictedInt8u(ClusterAttributeDescriptor):
@@ -29212,19 +29212,19 @@
                 return ClusterObjectDescriptor(
                     Fields = [
                             ClusterObjectFieldDescriptor(Label="arg1", Tag=1, Type=uint),
-                            ClusterObjectFieldDescriptor(Label="arg2", Tag=2, Type=TestCluster.Enums.SimpleEnum),
+                            ClusterObjectFieldDescriptor(Label="arg2", Tag=2, Type=UnitTesting.Enums.SimpleEnum),
                             ClusterObjectFieldDescriptor(Label="arg3", Tag=3, Type=bool),
-                            ClusterObjectFieldDescriptor(Label="arg4", Tag=4, Type=TestCluster.Structs.SimpleStruct),
-                            ClusterObjectFieldDescriptor(Label="arg5", Tag=5, Type=typing.List[TestCluster.Structs.SimpleStruct]),
-                            ClusterObjectFieldDescriptor(Label="arg6", Tag=6, Type=typing.List[TestCluster.Enums.SimpleEnum]),
+                            ClusterObjectFieldDescriptor(Label="arg4", Tag=4, Type=UnitTesting.Structs.SimpleStruct),
+                            ClusterObjectFieldDescriptor(Label="arg5", Tag=5, Type=typing.List[UnitTesting.Structs.SimpleStruct]),
+                            ClusterObjectFieldDescriptor(Label="arg6", Tag=6, Type=typing.List[UnitTesting.Enums.SimpleEnum]),
                     ])
 
             arg1: 'uint' = 0
-            arg2: 'TestCluster.Enums.SimpleEnum' = 0
+            arg2: 'UnitTesting.Enums.SimpleEnum' = 0
             arg3: 'bool' = False
-            arg4: 'TestCluster.Structs.SimpleStruct' = field(default_factory=lambda: TestCluster.Structs.SimpleStruct())
-            arg5: 'typing.List[TestCluster.Structs.SimpleStruct]' = field(default_factory=lambda: [])
-            arg6: 'typing.List[TestCluster.Enums.SimpleEnum]' = field(default_factory=lambda: [])
+            arg4: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct())
+            arg5: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: [])
+            arg6: 'typing.List[UnitTesting.Enums.SimpleEnum]' = field(default_factory=lambda: [])
 
         @dataclass
         class TestFabricScopedEvent(ClusterEvent):
diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py
index ca4c30a..9d6e1e5 100644
--- a/src/controller/python/test/test_scripts/base.py
+++ b/src/controller/python/test/test_scripts/base.py
@@ -573,12 +573,12 @@
         def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.SubscriptionTransaction) -> None:
             nonlocal sawValueChange
             self.logger.info("Saw value change!")
-            if (path.AttributeType == Clusters.TestCluster.Attributes.Int8u and path.Path.EndpointId == 1):
+            if (path.AttributeType == Clusters.UnitTesting.Attributes.Int8u and path.Path.EndpointId == 1):
                 sawValueChange = True
 
         self.logger.info("Testing CASE defunct logic")
 
-        sub = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1))
+        sub = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.UnitTesting.Attributes.Int8u)], reportInterval=(0, 1))
         sub.SetAttributeUpdateCallback(OnValueChange)
 
         #
@@ -590,7 +590,7 @@
         # Now write the attribute from fabric2, give it some time before checking if the report
         # was received.
         #
-        await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))])
+        await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(4))])
         time.sleep(2)
 
         sub.Shutdown()
@@ -610,7 +610,7 @@
         self.logger.info("Testing fabric-isolated CASE eviction")
 
         sawValueChange = False
-        sub = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1))
+        sub = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.UnitTesting.Attributes.Int8u)], reportInterval=(0, 1))
         sub.SetAttributeUpdateCallback(OnValueChange)
 
         for x in range(minimumSupportedFabrics * minimumCASESessionsPerFabric * 2):
@@ -621,7 +621,7 @@
         # Now write the attribute from fabric2, give it some time before checking if the report
         # was received.
         #
-        await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))])
+        await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(4))])
         time.sleep(2)
 
         sub.Shutdown()
@@ -636,14 +636,14 @@
         self.logger.info("Testing fabric-isolated CASE eviction (reverse)")
 
         sawValueChange = False
-        sub = await self.devCtrl2.ReadAttribute(nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1))
+        sub = await self.devCtrl2.ReadAttribute(nodeid, [(Clusters.UnitTesting.Attributes.Int8u)], reportInterval=(0, 1))
         sub.SetAttributeUpdateCallback(OnValueChange)
 
         for x in range(minimumSupportedFabrics * minimumCASESessionsPerFabric * 2):
             self.devCtrl.CloseSession(nodeid)
             await self.devCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)])
 
-        await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))])
+        await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(4))])
         time.sleep(2)
 
         sub.Shutdown()
@@ -723,8 +723,8 @@
 
     async def TestFabricSensitive(self, nodeid: int):
         expectedDataFabric1 = [
-            Clusters.TestCluster.Structs.TestFabricScoped(),
-            Clusters.TestCluster.Structs.TestFabricScoped()
+            Clusters.UnitTesting.Structs.TestFabricScoped(),
+            Clusters.UnitTesting.Structs.TestFabricScoped()
         ]
 
         expectedDataFabric1[0].fabricIndex = 100
@@ -747,7 +747,7 @@
 
         self.logger.info("Writing data from fabric1...")
 
-        await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped(expectedDataFabric1))])
+        await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped(expectedDataFabric1))])
 
         expectedDataFabric2 = copy.deepcopy(expectedDataFabric1)
 
@@ -768,15 +768,15 @@
 
         self.logger.info("Writing data from fabric2...")
 
-        await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped(expectedDataFabric2))])
+        await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped(expectedDataFabric2))])
 
         #
         # Now read the data back filtered from fabric1 and ensure it matches.
         #
         self.logger.info("Reading back data from fabric1...")
 
-        data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)])
-        readListDataFabric1 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]
+        data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped)])
+        readListDataFabric1 = data[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]
 
         #
         # Update the expected data's fabric index to that we just read back
@@ -791,8 +791,8 @@
 
         self.logger.info("Reading back data from fabric2...")
 
-        data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)])
-        readListDataFabric2 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]
+        data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped)])
+        readListDataFabric2 = data[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]
 
         #
         # Update the expected data's fabric index to that we just read back
@@ -832,19 +832,19 @@
                     # which should automatically be initialized with defaults and compare that
                     # against what we got back.
                     #
-                    expectedDefaultData = Clusters.TestCluster.Structs.TestFabricScoped()
+                    expectedDefaultData = Clusters.UnitTesting.Structs.TestFabricScoped()
                     expectedDefaultData.fabricIndex = otherFabric
 
                     if (item != expectedDefaultData):
                         raise AssertionError("Got back mismatched data")
 
-        data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)], fabricFiltered=False)
-        readListDataFabric = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]
+        data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped)], fabricFiltered=False)
+        readListDataFabric = data[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]
         CompareUnfilteredData(self.currentFabric1,
                               self.currentFabric2, expectedDataFabric1)
 
-        data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)], fabricFiltered=False)
-        readListDataFabric = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]
+        data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped)], fabricFiltered=False)
+        readListDataFabric = data[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]
         CompareUnfilteredData(self.currentFabric2,
                               self.currentFabric1, expectedDataFabric2)
 
@@ -861,21 +861,21 @@
 
         expectedDataFabric1.pop(1)
 
-        await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped(expectedDataFabric1))])
+        await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped(expectedDataFabric1))])
 
         self.logger.info(
             "Reading back data (again) from fabric2 to ensure it hasn't changed")
 
-        data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)])
-        readListDataFabric2 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]
+        data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped)])
+        readListDataFabric2 = data[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]
         if (expectedDataFabric2 != readListDataFabric2):
             raise AssertionError("Got back mismatched data")
 
         self.logger.info(
             "Reading back data (again) from fabric1 to ensure it hasn't changed")
 
-        data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)])
-        readListDataFabric1 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]
+        data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.ListFabricScoped)])
+        readListDataFabric1 = data[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]
 
         self.logger.info("Comparing data on fabric1...")
         expectedDataFabric1[0].fabricIndex = self.currentFabric1
@@ -1050,7 +1050,7 @@
         return True
 
     def TestWriteBasicAttributes(self, nodeid: int, endpoint: int, group: int):
-        @dataclass
+        @ dataclass
         class AttributeWriteRequest:
             cluster: str
             attribute: str
@@ -1173,9 +1173,9 @@
         try:
             cluster = self.devCtrl.GetClusterHandler()
             clusterInfo = cluster.GetClusterInfoById(0xFFF1FC05)  # TestCluster
-            if clusterInfo["clusterName"] != "TestCluster":
+            if clusterInfo["clusterName"] != "UnitTesting":
                 raise Exception(
-                    f"Wrong cluster info clusterName: {clusterInfo['clusterName']} expected TestCluster")
+                    f"Wrong cluster info clusterName: {clusterInfo['clusterName']} expected 'UnitTesting'")
         except Exception as ex:
             self.logger.exception(f"Failed to finish API test: {ex}")
             return False
diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py
index 2145893..162dae0 100644
--- a/src/controller/python/test/test_scripts/cluster_objects.py
+++ b/src/controller/python/test/test_scripts/cluster_objects.py
@@ -35,10 +35,10 @@
 
 # Ignore failures decoding these attributes (e.g. not yet implemented)
 ignoreAttributeDecodeFailureList = [
-    (1, Clusters.Objects.TestCluster,
-     Clusters.Objects.TestCluster.Attributes.GeneralErrorBoolean),
-    (1, Clusters.Objects.TestCluster,
-     Clusters.Objects.TestCluster.Attributes.ClusterErrorBoolean),
+    (1, Clusters.Objects.UnitTesting,
+     Clusters.Objects.UnitTesting.Attributes.GeneralErrorBoolean),
+    (1, Clusters.Objects.UnitTesting,
+     Clusters.Objects.UnitTesting.Attributes.ClusterErrorBoolean),
 ]
 
 
@@ -113,9 +113,9 @@
     @classmethod
     @base.test_case
     async def TestCommandWithResponse(cls, devCtrl):
-        req = Clusters.TestCluster.Commands.TestAddArguments(arg1=2, arg2=3)
+        req = Clusters.UnitTesting.Commands.TestAddArguments(arg1=2, arg2=3)
         res = await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=LIGHTING_ENDPOINT_ID, payload=req)
-        if not isinstance(res, Clusters.TestCluster.Commands.TestAddArgumentsResponse):
+        if not isinstance(res, Clusters.UnitTesting.Commands.TestAddArgumentsResponse):
             logger.error(f"Unexpected response of type {type(res)} received.")
             raise ValueError()
         logger.info(f"Received response: {res}")
@@ -126,12 +126,12 @@
     @base.test_case
     async def TestReadWriteOnlyAttribute(cls, devCtrl):
         logger.info("Test wildcard read of attributes containing write-only attribute")
-        res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(Clusters.TestCluster)])
-        if Clusters.TestCluster.Attributes.WriteOnlyInt8u in res[1][Clusters.TestCluster]:
+        res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(Clusters.UnitTesting)])
+        if Clusters.UnitTesting.Attributes.WriteOnlyInt8u in res[1][Clusters.UnitTesting]:
             raise AssertionError("Received un-expected WriteOnlyInt8u attribute in TestCluster")
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestWriteRequest(cls, devCtrl):
         logger.info("1: Trivial writes (multiple attributes)")
         res = await devCtrl.WriteAttribute(nodeid=NODE_ID,
@@ -158,10 +158,10 @@
 
         logger.info("2: Write chunked list")
         res = await devCtrl.WriteAttribute(nodeid=NODE_ID,
-                                           attributes=[(1, Clusters.TestCluster.Attributes.ListLongOctetString([b"0123456789abcdef" * 32] * 5))])
+                                           attributes=[(1, Clusters.UnitTesting.Attributes.ListLongOctetString([b"0123456789abcdef" * 32] * 5))])
         expectedRes = [
             AttributeStatus(Path=AttributePath(
-                EndpointId=1, Attribute=Clusters.TestCluster.Attributes.ListLongOctetString), Status=chip.interaction_model.Status.Success),
+                EndpointId=1, Attribute=Clusters.UnitTesting.Attributes.ListLongOctetString), Status=chip.interaction_model.Status.Success),
         ]
 
         logger.info(f"Received WriteResponse: {res}")
@@ -169,8 +169,8 @@
             logger.error(f"Expect {expectedRes} got {res}")
             raise AssertionError("Write returned unexpected result.")
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestSubscribeAttribute(cls, devCtrl):
         logger.info("Test Subscription")
         sub = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.OnOff.Attributes.OnOff)], reportInterval=(3, 10))
@@ -195,8 +195,8 @@
 
         sub.Shutdown()
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestSubscribeZeroMinInterval(cls, devCtrl):
         '''
         This validates receiving subscription reports for two attributes at a time in quick succession after issuing a command that results in attribute side-effects.
@@ -230,8 +230,8 @@
 
         sub.Shutdown()
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestReadAttributeRequests(cls, devCtrl):
         '''
         Tests out various permutations of endpoint, cluster and attribute ID (with wildcards) to validate
@@ -290,12 +290,12 @@
         # TestCluster will be ValueDecodeError here, so we comment out the log below.
         # Values are not expected to be ValueDecodeError for real clusters.
         # logger.info(
-        #    f"Test Cluster - Struct: {res[1][Clusters.TestCluster].structAttr}")
-        logger.info(f"Test Cluster: {res[1][Clusters.TestCluster]}")
+        #    f"Test Cluster - Struct: {res[1][Clusters.UnitTesting].structAttr}")
+        logger.info(f"Test Cluster: {res[1][Clusters.UnitTesting]}")
 
         logger.info("7: Reading Chunked List")
-        res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.TestCluster.Attributes.ListLongOctetString)])
-        if res[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListLongOctetString] != [b'0123456789abcdef' * 32] * 4:
+        res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.UnitTesting.Attributes.ListLongOctetString)])
+        if res[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListLongOctetString] != [b'0123456789abcdef' * 32] * 4:
             raise AssertionError("Unexpected read result")
 
         logger.info("*: Getting current fabric index")
@@ -304,25 +304,25 @@
 
         # Note: ListFabricScoped is an empty list for now. We should re-enable this test after we make it return expected data.
         # logger.info("8: Read without fabric filter")
-        # res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.TestCluster.Attributes.ListFabricScoped)], fabricFiltered=False)
-        # if len(res[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]) == 1:
+        # res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.UnitTesting.Attributes.ListFabricScoped)], fabricFiltered=False)
+        # if len(res[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]) == 1:
         #     raise AssertionError("Expect more elements in the response")
         # logger.info("9: Read with fabric filter")
-        # res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.TestCluster.Attributes.ListFabricScoped)], fabricFiltered=True)
-        # if len(res[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped]) != 1:
+        # res = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.UnitTesting.Attributes.ListFabricScoped)], fabricFiltered=True)
+        # if len(res[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped]) != 1:
         #     raise AssertionError("Expect exact one element in the response")
-        # if res[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped][0].fabricIndex != fabricIndex:
+        # if res[1][Clusters.UnitTesting][Clusters.UnitTesting.Attributes.ListFabricScoped][0].fabricIndex != fabricIndex:
         #     raise AssertionError(
         #         "Expect the fabric index matches the one current reading")
 
-    @classmethod
+    @ classmethod
     async def _TriggerEvent(cls, devCtrl):
         # We trigger sending an event a couple of times just to be safe.
-        await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestEventRequest())
-        await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestEventRequest())
-        await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestEventRequest())
+        await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.UnitTesting.Commands.TestEmitTestEventRequest())
+        await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.UnitTesting.Commands.TestEmitTestEventRequest())
+        await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.UnitTesting.Commands.TestEmitTestEventRequest())
 
-    @classmethod
+    @ classmethod
     async def _RetryForContent(cls, request, until, retryCount=10, intervalSeconds=1):
         for i in range(retryCount):
             logger.info(f"Attempt {i + 1}/{retryCount}")
@@ -332,22 +332,22 @@
             asyncio.sleep(1)
         raise AssertionError("condition is not met")
 
-    @classmethod
+    @ classmethod
     async def TriggerAndWaitForEvents(cls, devCtrl, req):
         await cls._TriggerEvent(devCtrl)
         await cls._RetryForContent(request=lambda: devCtrl.ReadEvent(nodeid=NODE_ID, events=req), until=lambda res: res != 0)
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestGenerateUndefinedFabricScopedEventRequests(cls, devCtrl):
         logger.info("Running TestGenerateUndefinedFabricScopedEventRequests")
         try:
-            res = await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestFabricScopedEventRequest(arg1=0))
+            res = await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.UnitTesting.Commands.TestEmitTestFabricScopedEventRequest(arg1=0))
             raise ValueError(f"Unexpected Failure")
         except chip.interaction_model.InteractionModelError as ex:
             logger.info(f"Recevied {ex} from server.")
         res = await devCtrl.ReadEvent(nodeid=NODE_ID, events=[
-            (1, Clusters.TestCluster.Events.TestFabricScopedEvent, 0),
+            (1, Clusters.UnitTesting.Events.TestFabricScopedEvent, 0),
         ])
         logger.info(f"return result is {res}")
         if len(res) != 0:
@@ -355,19 +355,19 @@
         else:
             logger.info("TestGenerateUndefinedFabricScopedEventRequests: Success")
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestReadEventRequests(cls, devCtrl, expectEventsNum):
         logger.info("1: Reading Ex Cx Ex")
         req = [
-            (1, Clusters.TestCluster.Events.TestEvent, 0),
+            (1, Clusters.UnitTesting.Events.TestEvent, 0),
         ]
 
         await cls.TriggerAndWaitForEvents(devCtrl, req)
 
         logger.info("2: Reading Ex Cx E*")
         req = [
-            (1, Clusters.TestCluster, 0),
+            (1, Clusters.UnitTesting, 0),
         ]
 
         await cls.TriggerAndWaitForEvents(devCtrl, req)
@@ -388,24 +388,24 @@
 
         logger.info("5: Reading Ex Cx E* Urgency")
         req = [
-            (1, Clusters.TestCluster, 1),
+            (1, Clusters.UnitTesting, 1),
         ]
 
         await cls.TriggerAndWaitForEvents(devCtrl, req)
 
         # TODO: Add more wildcard test for IM events.
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestTimedRequest(cls, devCtrl):
         logger.info("1: Send Timed Command Request")
-        req = Clusters.TestCluster.Commands.TimedInvokeRequest()
+        req = Clusters.UnitTesting.Commands.TimedInvokeRequest()
         await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req, timedRequestTimeoutMs=1000)
 
         logger.info("2: Send Timed Write Request")
         await devCtrl.WriteAttribute(nodeid=NODE_ID,
                                      attributes=[
-                                         (1, Clusters.TestCluster.Attributes.TimedWriteBoolean(
+                                         (1, Clusters.UnitTesting.Attributes.TimedWriteBoolean(
                                              True)),
                                      ],
                                      timedRequestTimeoutMs=1000)
@@ -413,7 +413,7 @@
         logger.info(
             "3: Sending TestCluster-TimedInvokeRequest without timedRequestTimeoutMs should be rejected")
         try:
-            req = Clusters.TestCluster.Commands.TimedInvokeRequest()
+            req = Clusters.UnitTesting.Commands.TimedInvokeRequest()
             await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req)
             raise AssertionError("The command invoke should be rejected.")
         except ValueError:
@@ -424,19 +424,19 @@
         try:
             await devCtrl.WriteAttribute(nodeid=NODE_ID,
                                          attributes=[
-                                             (1, Clusters.TestCluster.Attributes.TimedWriteBoolean(
+                                             (1, Clusters.UnitTesting.Attributes.TimedWriteBoolean(
                                                  True)),
                                          ])
             raise AssertionError("The write request should be rejected.")
         except ValueError:
             pass
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestTimedRequestTimeout(cls, devCtrl):
         logger.info("1: Send Timed Command Request -- Timeout")
         try:
-            req = Clusters.TestCluster.Commands.TimedInvokeRequest()
+            req = Clusters.UnitTesting.Commands.TimedInvokeRequest()
             # 10ms is a pretty short timeout, RTT is 400ms in simulated network on CI, so this test should fail.
             await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req, timedRequestTimeoutMs=1)
             raise AssertionError("Timeout expected!")
@@ -447,7 +447,7 @@
         try:
             await devCtrl.WriteAttribute(nodeid=NODE_ID,
                                          attributes=[
-                                             (1, Clusters.TestCluster.Attributes.TimedWriteBoolean(
+                                             (1, Clusters.UnitTesting.Attributes.TimedWriteBoolean(
                                                  True)),
                                          ],
                                          timedRequestTimeoutMs=1)
@@ -455,8 +455,8 @@
         except chip.exceptions.ChipStackException:
             pass
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestReadWriteAttributeRequestsWithVersion(cls, devCtrl):
         logger.info("TestReadWriteAttributeRequestsWithVersion")
         req = [
@@ -534,8 +534,8 @@
                         f"Item {i} is not expected, expect {expectedRes[i]} got {res[i]}")
             raise AssertionError("Write returned unexpected result.")
 
-    @classmethod
-    @base.test_case
+    @ classmethod
+    @ base.test_case
     async def TestMixedReadAttributeAndEvents(cls, devCtrl):
         def attributePathPossibilities():
             yield ('Ex Cx Ax', [
@@ -548,11 +548,11 @@
             yield ('E* A* A*', ['*'])
 
         def eventPathPossibilities():
-            yield ('Ex Cx Ex', [(1, Clusters.TestCluster.Events.TestEvent, 0)])
-            yield ('Ex Cx E*', [(1, Clusters.TestCluster, 0)])
+            yield ('Ex Cx Ex', [(1, Clusters.UnitTesting.Events.TestEvent, 0)])
+            yield ('Ex Cx E*', [(1, Clusters.UnitTesting, 0)])
             yield ('Ex C* E*', [1])
             yield ('E* C* E*', ['*'])
-            yield ('Ex Cx E* Urgent', [(1, Clusters.TestCluster, 1)])
+            yield ('Ex Cx E* Urgent', [(1, Clusters.UnitTesting, 1)])
 
         testCount = 0
 
@@ -564,7 +564,7 @@
                 res = await cls._RetryForContent(request=lambda: devCtrl.Read(nodeid=NODE_ID, attributes=attributes[1], events=events[1]), until=lambda res: res != 0)
                 VerifyDecodeSuccess(res.attributes)
 
-    @classmethod
+    @ classmethod
     async def RunTest(cls, devCtrl):
         try:
             cls.TestAPI()
diff --git a/src/controller/python/test/unit_tests/test_generated_clusterobjects.py b/src/controller/python/test/unit_tests/test_generated_clusterobjects.py
index c607259..2c41534 100644
--- a/src/controller/python/test/unit_tests/test_generated_clusterobjects.py
+++ b/src/controller/python/test/unit_tests/test_generated_clusterobjects.py
@@ -29,10 +29,10 @@
         self.assertEqual(actual, expected)
 
     def test_simple_struct(self):
-        data = Clusters.TestCluster.Structs.SimpleStruct()
+        data = Clusters.UnitTesting.Structs.SimpleStruct()
         data.a = 23
         data.b = True
-        data.c = Clusters.TestCluster.Enums.SimpleEnum.kValueA
+        data.c = Clusters.UnitTesting.Enums.SimpleEnum.kValueA
         data.d = b'1234'
         data.e = 'hello'
         data.f = 1
@@ -42,17 +42,17 @@
         self.CheckData(data)
 
     def test_double_nested_struct_list(self):
-        simpleStruct = Clusters.TestCluster.Structs.SimpleStruct()
+        simpleStruct = Clusters.UnitTesting.Structs.SimpleStruct()
         simpleStruct.a = 23
         simpleStruct.b = True
-        simpleStruct.c = Clusters.TestCluster.Enums.SimpleEnum.kValueA
+        simpleStruct.c = Clusters.UnitTesting.Enums.SimpleEnum.kValueA
         simpleStruct.d = b'1234'
         simpleStruct.e = 'hello'
         simpleStruct.f = 1
         simpleStruct.g = 0
         simpleStruct.h = 0
 
-        data = Clusters.TestCluster.Structs.NestedStructList()
+        data = Clusters.UnitTesting.Structs.NestedStructList()
         data.a = 23
         data.b = True
         data.c = simpleStruct
@@ -67,7 +67,7 @@
         self.CheckData(data)
 
     def test_nullable_optional_struct(self):
-        data = Clusters.TestCluster.Structs.NullablesAndOptionalsStruct()
+        data = Clusters.UnitTesting.Structs.NullablesAndOptionalsStruct()
 
         data.nullableInt = 2
         data.optionalInt = 3
@@ -75,17 +75,17 @@
         data.nullableString = 'hello1'
         data.optionalString = 'hello2'
         data.nullableOptionalString = 'hello3'
-        data.nullableStruct = Clusters.TestCluster.Structs.SimpleStruct(
-            23, True, Clusters.TestCluster.Enums.SimpleEnum.kValueA, b'1234', 'hello', 1, 0, 0)
-        data.optionalStruct = Clusters.TestCluster.Structs.SimpleStruct(
-            24, True, Clusters.TestCluster.Enums.SimpleEnum.kValueA, b'1234', 'hello', 1, 0, 0)
-        data.nullableOptionalStruct = Clusters.TestCluster.Structs.SimpleStruct(
-            25, True, Clusters.TestCluster.Enums.SimpleEnum.kValueA, b'1234', 'hello', 1, 0, 0)
+        data.nullableStruct = Clusters.UnitTesting.Structs.SimpleStruct(
+            23, True, Clusters.UnitTesting.Enums.SimpleEnum.kValueA, b'1234', 'hello', 1, 0, 0)
+        data.optionalStruct = Clusters.UnitTesting.Structs.SimpleStruct(
+            24, True, Clusters.UnitTesting.Enums.SimpleEnum.kValueA, b'1234', 'hello', 1, 0, 0)
+        data.nullableOptionalStruct = Clusters.UnitTesting.Structs.SimpleStruct(
+            25, True, Clusters.UnitTesting.Enums.SimpleEnum.kValueA, b'1234', 'hello', 1, 0, 0)
 
-        data.nullableList = [Clusters.TestCluster.Enums.SimpleEnum.kValueA]
-        data.optionalList = [Clusters.TestCluster.Enums.SimpleEnum.kValueA]
+        data.nullableList = [Clusters.UnitTesting.Enums.SimpleEnum.kValueA]
+        data.optionalList = [Clusters.UnitTesting.Enums.SimpleEnum.kValueA]
         data.nullableOptionalList = [
-            Clusters.TestCluster.Enums.SimpleEnum.kValueA]
+            Clusters.UnitTesting.Enums.SimpleEnum.kValueA]
 
         self.CheckData(data)
 
diff --git a/src/controller/tests/TestEventCaching.cpp b/src/controller/tests/TestEventCaching.cpp
index eaf57af..8723f81 100644
--- a/src/controller/tests/TestEventCaching.cpp
+++ b/src/controller/tests/TestEventCaching.cpp
@@ -43,6 +43,7 @@
 #include <nlunit-test.h>
 
 using namespace chip;
+using namespace chip::app;
 using namespace chip::app::Clusters;
 
 namespace {
@@ -117,7 +118,7 @@
 DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint, testEndpointClusters);
 
@@ -139,7 +140,7 @@
     CHIP_ERROR err                 = CHIP_NO_ERROR;
     static uint8_t generationCount = 0;
 
-    TestCluster::Events::TestEvent::Type content;
+    Clusters::UnitTesting::Events::TestEvent::Type content;
 
     for (int i = 0; i < 5; i++)
     {
@@ -183,7 +184,7 @@
 
     app::EventPathParams eventPath;
     eventPath.mEndpointId = kTestEndpointId;
-    eventPath.mClusterId  = app::Clusters::TestCluster::Id;
+    eventPath.mClusterId  = app::Clusters::UnitTesting::Id;
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpEventPathParamsList    = &eventPath;
@@ -203,11 +204,11 @@
         uint8_t generationCount = 0;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
@@ -227,18 +228,18 @@
         generationCount = 0;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
                 generationCount++;
                 return CHIP_NO_ERROR;
             },
-            app::EventPathParams(kInvalidEndpointId, TestCluster::Id, kInvalidEventId));
+            app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, kInvalidEventId));
 
         NL_TEST_ASSERT(apSuite, generationCount == 5);
 
@@ -248,18 +249,18 @@
         generationCount = 0;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
                 generationCount++;
                 return CHIP_NO_ERROR;
             },
-            app::EventPathParams(kInvalidEndpointId, TestCluster::Id, TestCluster::Events::TestEvent::Id));
+            app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Events::TestEvent::Id));
 
         NL_TEST_ASSERT(apSuite, generationCount == 5);
 
@@ -269,11 +270,11 @@
         generationCount = 1;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
@@ -291,18 +292,18 @@
         generationCount = 1;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
                 generationCount++;
                 return CHIP_NO_ERROR;
             },
-            app::EventPathParams(kInvalidEndpointId, TestCluster::Id, kInvalidEventId), 1);
+            app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, kInvalidEventId), 1);
 
         NL_TEST_ASSERT(apSuite, generationCount == 5);
     }
@@ -327,11 +328,11 @@
         uint8_t generationCount = 0;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
@@ -376,11 +377,11 @@
         uint8_t generationCount = 4;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
@@ -416,11 +417,11 @@
         uint8_t generationCount = 5;
         readCallback.mClusterCacheAdapter.ForEachEventData(
             [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) {
-                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == TestCluster::Id);
-                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == TestCluster::Events::TestEvent::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id);
+                NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id);
                 NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId);
 
-                TestCluster::Events::TestEvent::DecodableType eventData;
+                Clusters::UnitTesting::Events::TestEvent::DecodableType eventData;
                 NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR);
 
                 NL_TEST_ASSERT(apSuite, eventData.arg1 == generationCount);
diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp
index d013230..b4add71 100644
--- a/src/controller/tests/TestEventChunking.cpp
+++ b/src/controller/tests/TestEventChunking.cpp
@@ -43,6 +43,7 @@
 #include <nlunit-test.h>
 
 using namespace chip;
+using namespace chip::app;
 using namespace chip::app::Clusters;
 
 namespace {
@@ -126,7 +127,7 @@
     DECLARE_DYNAMIC_ATTRIBUTE(0x00000005, INT8U, 1, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint, testEndpointClusters);
 
@@ -134,7 +135,7 @@
 DECLARE_DYNAMIC_ATTRIBUTE(kTestListLargeAttribute, ARRAY, 1, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpoint4Clusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrsOnEndpoint4, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrsOnEndpoint4, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint4, testEndpoint4Clusters);
 
@@ -229,7 +230,7 @@
 {
 public:
     // Register for the Test Cluster cluster on all endpoints.
-    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), TestCluster::Id)
+    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), Clusters::UnitTesting::Id)
     {
         registerAttributeAccessOverride(this);
     }
@@ -270,7 +271,7 @@
 {
     CHIP_ERROR err = CHIP_NO_ERROR;
 
-    TestCluster::Events::TestEvent::Type content;
+    Clusters::UnitTesting::Events::TestEvent::Type content;
     content.arg1 = static_cast<uint8_t>(gIterationCount);
 
     for (int i = 0; i < 5; i++)
@@ -322,7 +323,7 @@
 
     app::EventPathParams eventPath;
     eventPath.mEndpointId = kTestEndpointId;
-    eventPath.mClusterId  = app::Clusters::TestCluster::Id;
+    eventPath.mClusterId  = app::Clusters::UnitTesting::Id;
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpEventPathParamsList    = &eventPath;
@@ -389,9 +390,9 @@
     GenerateEvents(apSuite, firstEventNumber, lastEventNumber);
 
     app::EventPathParams eventPath;
-    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::TestCluster::Id);
+    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id);
     eventPath.mEndpointId = kTestEndpointId;
-    eventPath.mClusterId  = app::Clusters::TestCluster::Id;
+    eventPath.mClusterId  = app::Clusters::UnitTesting::Id;
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpAttributePathParamsList    = &attributePath;
@@ -468,9 +469,9 @@
     GenerateEvents(apSuite, firstEventNumber, lastEventNumber);
 
     app::EventPathParams eventPath;
-    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::TestCluster::Id, kTestListLargeAttribute);
+    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListLargeAttribute);
     eventPath.mEndpointId = kTestEndpointId;
-    eventPath.mClusterId  = app::Clusters::TestCluster::Id;
+    eventPath.mClusterId  = app::Clusters::UnitTesting::Id;
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpAttributePathParamsList    = &attributePath;
diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp
index 1e1f0c4..22937fd 100644
--- a/src/controller/tests/TestReadChunking.cpp
+++ b/src/controller/tests/TestReadChunking.cpp
@@ -45,6 +45,7 @@
 
 using TestContext = chip::Test::AppContext;
 using namespace chip;
+using namespace chip::app;
 using namespace chip::app::Clusters;
 
 namespace {
@@ -88,7 +89,7 @@
     DECLARE_DYNAMIC_ATTRIBUTE(0x00000005, INT8U, 1, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint, testEndpointClusters);
 
@@ -97,7 +98,7 @@
     DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpoint3Clusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrsOnEndpoint3, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrsOnEndpoint3, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint3, testEndpoint3Clusters);
 
@@ -105,7 +106,7 @@
 DECLARE_DYNAMIC_ATTRIBUTE(0x00000001, INT8U, 1, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpoint4Clusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrsOnEndpoint4, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrsOnEndpoint4, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint4, testEndpoint4Clusters);
 
@@ -115,7 +116,7 @@
     DECLARE_DYNAMIC_ATTRIBUTE(0x00000003, INT8U, 1, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpoint5Clusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrsOnEndpoint5, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrsOnEndpoint5, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint5, testEndpoint5Clusters);
 
@@ -211,7 +212,7 @@
     {
         app::AttributePathParams path;
         path.mEndpointId  = kTestEndpointId5;
-        path.mClusterId   = TestCluster::Id;
+        path.mClusterId   = Clusters::UnitTesting::Id;
         path.mAttributeId = attr;
         app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(path);
     }
@@ -245,7 +246,7 @@
 {
 public:
     // Register for the Test Cluster cluster on all endpoints.
-    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), TestCluster::Id)
+    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), Clusters::UnitTesting::Id)
     {
         registerAttributeAccessOverride(this);
     }
@@ -319,7 +320,7 @@
                                               const app::StatusIB & aStatus)
 {
     VerifyOrReturn(apData != nullptr);
-    NL_TEST_ASSERT(gSuite, aPath.mClusterId == TestCluster::Id);
+    NL_TEST_ASSERT(gSuite, aPath.mClusterId == Clusters::UnitTesting::Id);
 
     mAttributeCount++;
     if (aPath.mAttributeId <= 5)
@@ -372,7 +373,7 @@
     DataVersion dataVersionStorage[ArraySize(testEndpointClusters)];
     emberAfSetDynamicEndpoint(0, kTestEndpointId, &testEndpoint, Span<DataVersion>(dataVersionStorage));
 
-    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::TestCluster::Id);
+    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id);
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpAttributePathParamsList    = &attributePath;
@@ -437,7 +438,7 @@
     DataVersion dataVersionStorage[ArraySize(testEndpoint3Clusters)];
     emberAfSetDynamicEndpoint(0, kTestEndpointId3, &testEndpoint3, Span<DataVersion>(dataVersionStorage));
 
-    app::AttributePathParams attributePath(kTestEndpointId3, app::Clusters::TestCluster::Id, kTestListAttribute);
+    app::AttributePathParams attributePath(kTestEndpointId3, app::Clusters::UnitTesting::Id, kTestListAttribute);
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpAttributePathParamsList    = &attributePath;
@@ -503,7 +504,7 @@
     DataVersion dataVersionStorage[ArraySize(testEndpoint3Clusters)];
     emberAfSetDynamicEndpoint(0, kTestEndpointId3, &testEndpoint3, Span<DataVersion>(dataVersionStorage));
 
-    app::AttributePathParams attributePath(kTestEndpointId3, app::Clusters::TestCluster::Id, kTestBadAttribute);
+    app::AttributePathParams attributePath(kTestEndpointId3, app::Clusters::UnitTesting::Id, kTestBadAttribute);
     app::ReadPrepareParams readParams(sessionHandle);
 
     readParams.mpAttributePathParamsList    = &attributePath;
@@ -648,7 +649,7 @@
     return [=]() {
         app::AttributePathParams path;
         path.mEndpointId  = attr.first;
-        path.mClusterId   = TestCluster::Id;
+        path.mClusterId   = Clusters::UnitTesting::Id;
         path.mAttributeId = attr.second;
         gIterationCount++;
         app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(path);
@@ -842,9 +843,9 @@
         app::AttributePathParams attributePath[3];
         app::ReadPrepareParams readParams(sessionHandle);
 
-        attributePath[0] = app::AttributePathParams(kTestEndpointId5, TestCluster::Id, Attr1);
-        attributePath[1] = app::AttributePathParams(kTestEndpointId5, TestCluster::Id, Attr2);
-        attributePath[2] = app::AttributePathParams(kTestEndpointId5, TestCluster::Id, Attr3);
+        attributePath[0] = app::AttributePathParams(kTestEndpointId5, Clusters::UnitTesting::Id, Attr1);
+        attributePath[1] = app::AttributePathParams(kTestEndpointId5, Clusters::UnitTesting::Id, Attr2);
+        attributePath[2] = app::AttributePathParams(kTestEndpointId5, Clusters::UnitTesting::Id, Attr3);
 
         readParams.mpAttributePathParamsList    = attributePath;
         readParams.mAttributePathParamsListSize = 3;
diff --git a/src/controller/tests/TestServerCommandDispatch.cpp b/src/controller/tests/TestServerCommandDispatch.cpp
index 1e820e9..4754f75 100644
--- a/src/controller/tests/TestServerCommandDispatch.cpp
+++ b/src/controller/tests/TestServerCommandDispatch.cpp
@@ -63,7 +63,7 @@
 class TestClusterCommandHandler : public chip::app::CommandHandlerInterface
 {
 public:
-    TestClusterCommandHandler() : chip::app::CommandHandlerInterface(Optional<EndpointId>::Missing(), TestCluster::Id)
+    TestClusterCommandHandler() : chip::app::CommandHandlerInterface(Optional<EndpointId>::Missing(), Clusters::UnitTesting::Id)
     {
         chip::app::InteractionModelEngine::GetInstance()->RegisterCommandHandler(this);
     }
@@ -83,12 +83,12 @@
 
 void TestClusterCommandHandler::InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & handlerContext)
 {
-    HandleCommand<TestCluster::Commands::TestSimpleArgumentRequest::DecodableType>(
+    HandleCommand<Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::DecodableType>(
         handlerContext, [](chip::app::CommandHandlerInterface::HandlerContext & ctx, const auto & requestPayload) {
             if (responseDirective == kSendDataResponse)
             {
-                TestCluster::Commands::TestStructArrayArgumentResponse::Type dataResponse;
-                TestCluster::Structs::NestedStructList::Type nestedStructList[4];
+                Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::Type dataResponse;
+                Clusters::UnitTesting::Structs::NestedStructList::Type nestedStructList[4];
 
                 uint8_t i = 0;
                 for (auto & item : nestedStructList)
@@ -124,7 +124,7 @@
     }
 
     // We just have one command id.
-    callback(TestCluster::Commands::TestSimpleArgumentRequest::Id, context);
+    callback(Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id, context);
     return CHIP_NO_ERROR;
 }
 
@@ -152,9 +152,9 @@
 // We want to send a TestSimpleArgumentRequest::Type, but get a
 // TestStructArrayArgumentResponse in return, so need to shadow the actual
 // ResponseType that TestSimpleArgumentRequest has.
-struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
 {
-    using ResponseType = TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType;
 };
 
 void TestCommandInteraction::TestNoHandler(nlTestSuite * apSuite, void * apContext)
@@ -211,11 +211,11 @@
 DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 constexpr CommandId testClusterCommands1[] = {
-    TestCluster::Commands::TestSimpleArgumentRequest::Id,
+    Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id,
     kInvalidCommandId,
 };
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters1)
-DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::TestCluster::Id, testClusterAttrs, testClusterCommands1, nullptr),
+DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::UnitTesting::Id, testClusterAttrs, testClusterCommands1, nullptr),
     DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr),
     DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
@@ -225,14 +225,14 @@
     kInvalidCommandId,
 };
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters2)
-DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::TestCluster::Id, testClusterAttrs, testClusterCommands2, nullptr),
+DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::UnitTesting::Id, testClusterAttrs, testClusterCommands2, nullptr),
     DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr),
     DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint2, testEndpointClusters2);
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters3)
-DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::TestCluster::Id, testClusterAttrs, nullptr, nullptr),
+DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::UnitTesting::Id, testClusterAttrs, nullptr, nullptr),
     DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr),
     DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
@@ -308,7 +308,7 @@
         {
             // We only expect 0 or 1 command ids here.
             NL_TEST_ASSERT(apSuite, count == 0);
-            NL_TEST_ASSERT(apSuite, iter.GetValue() == TestCluster::Commands::TestSimpleArgumentRequest::Id);
+            NL_TEST_ASSERT(apSuite, iter.GetValue() == Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id);
             ++count;
         }
         NL_TEST_ASSERT(apSuite, iter.GetStatus() == CHIP_NO_ERROR);
@@ -327,7 +327,7 @@
         ChipLogError(NotSpecified, "TEST FAILURE: %" CHIP_ERROR_FORMAT, aError.Format());
     };
 
-    chip::Controller::ReadAttribute<TestCluster::Attributes::AcceptedCommandList::TypeInfo>(
+    chip::Controller::ReadAttribute<Clusters::UnitTesting::Attributes::AcceptedCommandList::TypeInfo>(
         &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, readSuccessCb, readFailureCb);
 
     ctx.DrainAndServiceIO();
diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp
index 726e73f..80141c5 100644
--- a/src/controller/tests/TestWriteChunking.cpp
+++ b/src/controller/tests/TestWriteChunking.cpp
@@ -83,7 +83,7 @@
     DECLARE_DYNAMIC_ATTRIBUTE(kTestListAttribute2, ARRAY, 1, ATTRIBUTE_MASK_WRITABLE), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
 
 DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(testEndpointClusters)
-DECLARE_DYNAMIC_CLUSTER(TestCluster::Id, testClusterAttrsOnEndpoint, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
+DECLARE_DYNAMIC_CLUSTER(Clusters::UnitTesting::Id, testClusterAttrsOnEndpoint, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;
 
 DECLARE_DYNAMIC_ENDPOINT(testEndpoint, testEndpointClusters);
 
@@ -126,7 +126,7 @@
 {
 public:
     // Register for the Test Cluster cluster on all endpoints.
-    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), TestCluster::Id) {}
+    TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), Clusters::UnitTesting::Id) {}
 
     CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override;
     CHIP_ERROR Write(const app::ConcreteDataAttributePath & aPath, app::AttributeValueDecoder & aDecoder) override;
@@ -201,7 +201,7 @@
     // Register our fake attribute access interface.
     registerAttributeAccessOverride(&testServer);
 
-    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::TestCluster::Id, kTestListAttribute);
+    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute);
     //
     // We've empirically determined that by reserving 950 bytes in the packet buffer, we can fit 2
     // AttributeDataIBs into the packet. ~30-40 bytes covers a single write chunk, but let's 2-3x that
@@ -275,7 +275,7 @@
     // Register our fake attribute access interface.
     registerAttributeAccessOverride(&testServer);
 
-    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::TestCluster::Id, kTestListAttribute);
+    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute);
 
     for (int i = 850; i < static_cast<int>(chip::app::kMaxSecureSduLengthBytes); i++)
     {
@@ -356,7 +356,7 @@
     // Register our fake attribute access interface.
     registerAttributeAccessOverride(&testServer);
 
-    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::TestCluster::Id, kTestListAttribute);
+    app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute);
 
     TestWriteCallback writeCallback1;
     app::WriteClient writeClient1(
@@ -432,8 +432,8 @@
     // Register our fake attribute access interface.
     registerAttributeAccessOverride(&testServer);
 
-    app::AttributePathParams attributePath1(kTestEndpointId, app::Clusters::TestCluster::Id, kTestListAttribute);
-    app::AttributePathParams attributePath2(kTestEndpointId, app::Clusters::TestCluster::Id, kTestListAttribute2);
+    app::AttributePathParams attributePath1(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute);
+    app::AttributePathParams attributePath2(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute2);
 
     TestWriteCallback writeCallback1;
     app::WriteClient writeClient1(
@@ -617,7 +617,7 @@
     ChipLogProgress(Zcl, "Test 1: we should receive transaction notifications");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
                 .expectedStatus = { true },
             });
 
@@ -625,7 +625,7 @@
     RunTest(
         apSuite, ctx,
         Instructions{
-            .paths                   = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+            .paths                   = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
             .onListWriteBeginActions = [&](const app::ConcreteAttributePath & aPath) { return Operations::kShutdownWriteClient; },
             .expectedStatus          = { false },
         });
@@ -633,16 +633,16 @@
     ChipLogProgress(Zcl, "Test 3: we should receive transaction notifications for every list in the transaction");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute),
-                           ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute2) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute),
+                           ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute2) },
                 .expectedStatus = { true, true },
             });
 
     ChipLogProgress(Zcl, "Test 4: we should receive transaction notifications with the status of each list");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute),
-                           ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute2) },
+                .paths = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute),
+                           ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute2) },
                 .onListWriteBeginActions =
                     [&](const app::ConcreteAttributePath & aPath) {
                         if (aPath.mAttributeId == kTestListAttribute2)
@@ -659,8 +659,8 @@
                     "null value before non null values");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute),
-                           ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute),
+                           ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
                 .data           = { ListData::kNull, ListData::kList },
                 .expectedStatus = { true },
             });
@@ -670,8 +670,8 @@
                     "null value after non null values");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute),
-                           ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute),
+                           ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
                 .data           = { ListData::kList, ListData::kNull },
                 .expectedStatus = { true },
             });
@@ -681,9 +681,9 @@
                     "null value between non null values");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute),
-                           ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute),
-                           ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute),
+                           ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute),
+                           ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
                 .data           = { ListData::kList, ListData::kNull, ListData::kList },
                 .expectedStatus = { true },
             });
@@ -691,7 +691,7 @@
     ChipLogProgress(Zcl, "Test 8: transactional list callbacks will be called for nullable lists");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
                 .data           = { ListData::kNull },
                 .expectedStatus = { true },
             });
@@ -701,7 +701,7 @@
                     "during processing the requests");
     RunTest(apSuite, ctx,
             Instructions{
-                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::TestCluster::Id, kTestListAttribute) },
+                .paths          = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) },
                 .data           = { ListData::kBadValue },
                 .expectedStatus = { false },
             });
diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp
index 360425e..9ecac05d 100644
--- a/src/controller/tests/data_model/TestCommands.cpp
+++ b/src/controller/tests/data_model/TestCommands.cpp
@@ -78,10 +78,10 @@
     ChipLogDetail(Controller, "Received Cluster Command: Endpoint=%x Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI,
                   aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId));
 
-    if (aCommandPath.mClusterId == TestCluster::Id &&
-        aCommandPath.mCommandId == TestCluster::Commands::TestSimpleArgumentRequest::Type::GetCommandId())
+    if (aCommandPath.mClusterId == Clusters::UnitTesting::Id &&
+        aCommandPath.mCommandId == Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type::GetCommandId())
     {
-        TestCluster::Commands::TestSimpleArgumentRequest::DecodableType dataRequest;
+        Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::DecodableType dataRequest;
 
         if (DataModel::Decode(aReader, dataRequest) != CHIP_NO_ERROR)
         {
@@ -92,8 +92,8 @@
 
         if (responseDirective == kSendDataResponse)
         {
-            TestCluster::Commands::TestStructArrayArgumentResponse::Type dataResponse;
-            TestCluster::Structs::NestedStructList::Type nestedStructList[4];
+            Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::Type dataResponse;
+            Clusters::UnitTesting::Structs::NestedStructList::Type nestedStructList[4];
 
             uint8_t i = 0;
             for (auto & item : nestedStructList)
@@ -163,7 +163,7 @@
         return Status::UnsupportedEndpoint;
     }
 
-    if (aCommandPath.mClusterId != TestCluster::Id)
+    if (aCommandPath.mClusterId != Clusters::UnitTesting::Id)
     {
         return Status::UnsupportedCluster;
     }
@@ -197,9 +197,9 @@
     // We want to send a TestSimpleArgumentRequest::Type, but get a
     // TestStructArrayArgumentResponse in return, so need to shadow the actual
     // ResponseType that TestSimpleArgumentRequest has.
-    struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+    struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
     {
-        using ResponseType = TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType;
+        using ResponseType = Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType;
     };
 
     FakeRequest request;
@@ -250,7 +250,7 @@
 
 void TestCommandInteraction::TestSuccessNoDataResponse(nlTestSuite * apSuite, void * apContext)
 {
-    struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+    struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
     {
         using ResponseType = DataModel::NullObjectType;
     };
@@ -289,7 +289,7 @@
 
 void TestCommandInteraction::TestMultipleSuccessNoDataResponses(nlTestSuite * apSuite, void * apContext)
 {
-    struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+    struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
     {
         using ResponseType = DataModel::NullObjectType;
     };
@@ -328,7 +328,7 @@
 
 void TestCommandInteraction::TestAsyncResponse(nlTestSuite * apSuite, void * apContext)
 {
-    struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+    struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
     {
         using ResponseType = DataModel::NullObjectType;
     };
@@ -385,7 +385,7 @@
 void TestCommandInteraction::TestFailure(nlTestSuite * apSuite, void * apContext)
 {
     TestContext & ctx = *static_cast<TestContext *>(apContext);
-    TestCluster::Commands::TestSimpleArgumentRequest::Type request;
+    Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type request;
     auto sessionHandle = ctx.GetSessionBobToAlice();
 
     bool onSuccessWasCalled = false;
@@ -418,7 +418,7 @@
 
 void TestCommandInteraction::TestMultipleFailures(nlTestSuite * apSuite, void * apContext)
 {
-    struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+    struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
     {
         using ResponseType = DataModel::NullObjectType;
     };
@@ -457,7 +457,7 @@
 
 void TestCommandInteraction::TestSuccessNoDataResponseWithClusterStatus(nlTestSuite * apSuite, void * apContext)
 {
-    struct FakeRequest : public TestCluster::Commands::TestSimpleArgumentRequest::Type
+    struct FakeRequest : public Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type
     {
         using ResponseType = DataModel::NullObjectType;
     };
@@ -498,7 +498,7 @@
 void TestCommandInteraction::TestFailureWithClusterStatus(nlTestSuite * apSuite, void * apContext)
 {
     TestContext & ctx = *static_cast<TestContext *>(apContext);
-    TestCluster::Commands::TestSimpleArgumentRequest::Type request;
+    Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type request;
     auto sessionHandle = ctx.GetSessionBobToAlice();
 
     bool onSuccessWasCalled = false;
diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp
index 5c1677a..ddc3b72 100644
--- a/src/controller/tests/data_model/TestRead.cpp
+++ b/src/controller/tests/data_model/TestRead.cpp
@@ -36,6 +36,7 @@
 using TestContext = chip::Test::AppContext;
 
 using namespace chip;
+using namespace chip::app;
 using namespace chip::app::Clusters;
 using namespace chip::Protocols;
 
@@ -43,8 +44,8 @@
 
 constexpr EndpointId kTestEndpointId        = 1;
 constexpr DataVersion kDataVersion          = 5;
-constexpr AttributeId kPerpetualAttributeid = Test::MockAttributeId(1);
-constexpr ClusterId kPerpetualClusterId     = Test::MockClusterId(2);
+constexpr AttributeId kPerpetualAttributeid = chip::Test::MockAttributeId(1);
+constexpr ClusterId kPerpetualClusterId     = chip::Test::MockClusterId(2);
 bool expectedAttribute1                     = true;
 int16_t expectedAttribute2                  = 42;
 uint64_t expectedAttribute3                 = 0xdeadbeef0000cafe;
@@ -74,7 +75,7 @@
 
 ResponseDirective responseDirective;
 
-// Number of reads of TestCluster::Attributes::Int16u that we have observed.
+// Number of reads of Clusters::UnitTesting::Attributes::Int16u that we have observed.
 // Every read will increment this count by 1 and return the new value.
 uint16_t totalReadCount = 0;
 
@@ -86,14 +87,14 @@
                                  const ConcreteReadAttributePath & aPath, AttributeReportIBs::Builder & aAttributeReports,
                                  AttributeValueEncoder::AttributeEncodeState * apEncoderState)
 {
-    if (aPath.mEndpointId >= Test::kMockEndpointMin)
+    if (aPath.mEndpointId >= chip::Test::kMockEndpointMin)
     {
-        return Test::ReadSingleMockClusterData(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState);
+        return chip::Test::ReadSingleMockClusterData(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState);
     }
 
     if (responseDirective == kSendManyDataResponses || responseDirective == kSendManyDataResponsesWrongPath)
     {
-        if (aPath.mClusterId != Clusters::TestCluster::Id || aPath.mAttributeId != Clusters::TestCluster::Attributes::Boolean::Id)
+        if (aPath.mClusterId != Clusters::UnitTesting::Id || aPath.mAttributeId != Clusters::UnitTesting::Attributes::Boolean::Id)
         {
             return CHIP_ERROR_INCORRECT_STATE;
         }
@@ -116,8 +117,8 @@
 
     if (responseDirective == kSendDataResponse)
     {
-        if (aPath.mClusterId == app::Clusters::TestCluster::Id &&
-            aPath.mAttributeId == app::Clusters::TestCluster::Attributes::ListFabricScoped::Id)
+        if (aPath.mClusterId == app::Clusters::UnitTesting::Id &&
+            aPath.mAttributeId == app::Clusters::UnitTesting::Attributes::ListFabricScoped::Id)
         {
             AttributeValueEncoder::AttributeEncodeState state =
                 (apEncoderState == nullptr ? AttributeValueEncoder::AttributeEncodeState() : *apEncoderState);
@@ -125,7 +126,7 @@
                                                kDataVersion /* data version */, aIsFabricFiltered, state);
 
             return valueEncoder.EncodeList([aSubjectDescriptor](const auto & encoder) -> CHIP_ERROR {
-                app::Clusters::TestCluster::Structs::TestFabricScoped::Type val;
+                app::Clusters::UnitTesting::Structs::TestFabricScoped::Type val;
                 val.fabricIndex = aSubjectDescriptor.fabricIndex;
                 ReturnErrorOnFailure(encoder.Encode(val));
                 val.fabricIndex = (val.fabricIndex == 1) ? 2 : 1;
@@ -133,8 +134,8 @@
                 return CHIP_NO_ERROR;
             });
         }
-        if (aPath.mClusterId == app::Clusters::TestCluster::Id &&
-            aPath.mAttributeId == app::Clusters::TestCluster::Attributes::Int16u::Id)
+        if (aPath.mClusterId == app::Clusters::UnitTesting::Id &&
+            aPath.mAttributeId == app::Clusters::UnitTesting::Attributes::Int16u::Id)
         {
             AttributeValueEncoder::AttributeEncodeState state =
                 (apEncoderState == nullptr ? AttributeValueEncoder::AttributeEncodeState() : *apEncoderState);
@@ -144,7 +145,7 @@
             return valueEncoder.Encode(++totalReadCount);
         }
         if (aPath.mClusterId == kPerpetualClusterId ||
-            (aPath.mClusterId == app::Clusters::TestCluster::Id && aPath.mAttributeId == kPerpetualAttributeid))
+            (aPath.mClusterId == app::Clusters::UnitTesting::Id && aPath.mAttributeId == kPerpetualAttributeid))
         {
             AttributeValueEncoder::AttributeEncodeState state = AttributeValueEncoder::AttributeEncodeState();
             AttributeValueEncoder valueEncoder(aAttributeReports, aSubjectDescriptor.fabricIndex, aPath,
@@ -171,8 +172,8 @@
         ReturnErrorOnFailure(aAttributeReports.GetError());
         AttributeDataIB::Builder & attributeData = attributeReport.CreateAttributeData();
         ReturnErrorOnFailure(attributeReport.GetError());
-        TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
-        TestCluster::Structs::TestListStructOctet::Type valueBuf[4];
+        Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
+        Clusters::UnitTesting::Structs::TestListStructOctet::Type valueBuf[4];
 
         value = valueBuf;
 
@@ -406,8 +407,8 @@
         onFailureCbInvoked = true;
     };
 
-    Controller::ReadAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle,
-                                                                                        kTestEndpointId, onSuccessCb, onFailureCb);
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
+        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -429,8 +430,8 @@
     chip::app::EventPathParams eventPathParams[100];
     for (auto & eventPathParam : eventPathParams)
     {
-        eventPathParam.mEndpointId = Test::kMockEndpoint3;
-        eventPathParam.mClusterId  = Test::MockClusterId(2);
+        eventPathParam.mEndpointId = chip::Test::kMockEndpoint3;
+        eventPathParam.mClusterId  = chip::Test::MockClusterId(2);
         eventPathParam.mEventId    = 0;
     }
 
@@ -453,16 +454,16 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[3];
-        attributePathParams1[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[0].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[0].mAttributeId = Test::MockAttributeId(1);
+        attributePathParams1[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[0].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[0].mAttributeId = chip::Test::MockAttributeId(1);
 
         attributePathParams1[1].mEndpointId  = kInvalidEndpointId;
-        attributePathParams1[1].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[1].mAttributeId = Test::MockAttributeId(1);
+        attributePathParams1[1].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[1].mAttributeId = chip::Test::MockAttributeId(1);
 
-        attributePathParams1[2].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[2].mClusterId   = Test::MockClusterId(3);
+        attributePathParams1[2].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[2].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams1[2].mAttributeId = kInvalidAttributeId;
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
@@ -474,7 +475,7 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 6);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version1.HasValue());
         delegate.mNumAttributeResponse = 0;
@@ -488,17 +489,17 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[3];
-        attributePathParams1[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[0].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[0].mAttributeId = Test::MockAttributeId(1);
+        attributePathParams1[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[0].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[0].mAttributeId = chip::Test::MockAttributeId(1);
 
-        attributePathParams1[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[1].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[1].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[1].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[1].mAttributeId = chip::Test::MockAttributeId(2);
 
-        attributePathParams1[2].mEndpointId  = Test::kMockEndpoint3;
-        attributePathParams1[2].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[2].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[2].mEndpointId  = chip::Test::kMockEndpoint3;
+        attributePathParams1[2].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[2].mAttributeId = chip::Test::MockAttributeId(2);
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -509,16 +510,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 3);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version1.HasValue());
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -527,7 +529,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -536,7 +539,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -557,16 +561,16 @@
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[3];
         attributePathParams1[0].mEndpointId  = kInvalidEndpointId;
-        attributePathParams1[0].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[0].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[0].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[0].mAttributeId = chip::Test::MockAttributeId(2);
 
-        attributePathParams1[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[1].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[1].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[1].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[1].mAttributeId = chip::Test::MockAttributeId(2);
 
-        attributePathParams1[2].mEndpointId  = Test::kMockEndpoint3;
-        attributePathParams1[2].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[2].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[2].mEndpointId  = chip::Test::kMockEndpoint3;
+        attributePathParams1[2].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[2].mAttributeId = chip::Test::MockAttributeId(2);
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -577,22 +581,24 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version1.HasValue());
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint1, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint1, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) != CHIP_NO_ERROR);
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -601,7 +607,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -619,13 +626,13 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams2[2];
-        attributePathParams2[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams2[0].mClusterId   = Test::MockClusterId(3);
+        attributePathParams2[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams2[0].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams2[0].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams2[1].mEndpointId            = Test::kMockEndpoint3;
-        attributePathParams2[1].mClusterId             = Test::MockClusterId(2);
-        attributePathParams2[1].mAttributeId           = Test::MockAttributeId(2);
+        attributePathParams2[1].mEndpointId            = chip::Test::kMockEndpoint3;
+        attributePathParams2[1].mClusterId             = chip::Test::MockClusterId(2);
+        attributePathParams2[1].mAttributeId           = chip::Test::MockAttributeId(2);
         readPrepareParams.mpAttributePathParamsList    = attributePathParams2;
         readPrepareParams.mAttributePathParamsListSize = 2;
         err                                            = readClient.SendRequest(readPrepareParams);
@@ -636,16 +643,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 6);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 0));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -654,7 +662,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -663,7 +672,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -672,7 +682,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -690,17 +701,17 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[3];
-        attributePathParams1[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[0].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[0].mAttributeId = Test::MockAttributeId(1);
+        attributePathParams1[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[0].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[0].mAttributeId = chip::Test::MockAttributeId(1);
 
-        attributePathParams1[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[1].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[1].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[1].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[1].mAttributeId = chip::Test::MockAttributeId(2);
 
-        attributePathParams1[2].mEndpointId  = Test::kMockEndpoint3;
-        attributePathParams1[2].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[2].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[2].mEndpointId  = chip::Test::kMockEndpoint3;
+        attributePathParams1[2].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[2].mAttributeId = chip::Test::MockAttributeId(2);
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -711,16 +722,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 0));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -729,7 +741,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -738,7 +751,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -756,13 +770,13 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams2[2];
-        attributePathParams2[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams2[0].mClusterId   = Test::MockClusterId(3);
+        attributePathParams2[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams2[0].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams2[0].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams2[1].mEndpointId            = Test::kMockEndpoint3;
-        attributePathParams2[1].mClusterId             = Test::MockClusterId(2);
-        attributePathParams2[1].mAttributeId           = Test::MockAttributeId(2);
+        attributePathParams2[1].mEndpointId            = chip::Test::kMockEndpoint3;
+        attributePathParams2[1].mClusterId             = chip::Test::MockClusterId(2);
+        attributePathParams2[1].mAttributeId           = chip::Test::MockAttributeId(2);
         readPrepareParams.mpAttributePathParamsList    = attributePathParams2;
         readPrepareParams.mAttributePathParamsListSize = 2;
         err                                            = readClient.SendRequest(readPrepareParams);
@@ -772,16 +786,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 0));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -790,7 +805,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -799,7 +815,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -808,7 +825,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -818,7 +836,7 @@
         delegate.mNumAttributeResponse = 0;
     }
 
-    Test::BumpVersion();
+    chip::Test::BumpVersion();
 
     // Read of E2C3A1, E2C3A2 and E3C2A2. It would use the stored data versions in the cache since our subsequent read's C1A*
     // path intersects with previous cached data version, server's version is changed. Expect E2C3A1, E2C3A2 and E3C2A2 attribute in
@@ -829,17 +847,17 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[3];
-        attributePathParams1[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[0].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[0].mAttributeId = Test::MockAttributeId(1);
+        attributePathParams1[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[0].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[0].mAttributeId = chip::Test::MockAttributeId(1);
 
-        attributePathParams1[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[1].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[1].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[1].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[1].mAttributeId = chip::Test::MockAttributeId(2);
 
-        attributePathParams1[2].mEndpointId  = Test::kMockEndpoint3;
-        attributePathParams1[2].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[2].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[2].mEndpointId  = chip::Test::kMockEndpoint3;
+        attributePathParams1[2].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[2].mAttributeId = chip::Test::MockAttributeId(2);
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -850,16 +868,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 3);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version1.HasValue());
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -868,7 +887,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -877,7 +897,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -895,17 +916,17 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[3];
-        attributePathParams1[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[0].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[0].mAttributeId = Test::MockAttributeId(1);
+        attributePathParams1[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[0].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[0].mAttributeId = chip::Test::MockAttributeId(1);
 
-        attributePathParams1[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams1[1].mClusterId   = Test::MockClusterId(3);
-        attributePathParams1[1].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams1[1].mClusterId   = chip::Test::MockClusterId(3);
+        attributePathParams1[1].mAttributeId = chip::Test::MockAttributeId(2);
 
-        attributePathParams1[2].mEndpointId  = Test::kMockEndpoint3;
-        attributePathParams1[2].mClusterId   = Test::MockClusterId(2);
-        attributePathParams1[2].mAttributeId = Test::MockAttributeId(2);
+        attributePathParams1[2].mEndpointId  = chip::Test::kMockEndpoint3;
+        attributePathParams1[2].mClusterId   = chip::Test::MockClusterId(2);
+        attributePathParams1[2].mAttributeId = chip::Test::MockAttributeId(2);
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -916,16 +937,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 3);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version1.HasValue());
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -934,7 +956,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -943,7 +966,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -961,13 +985,13 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams2[2];
-        attributePathParams2[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams2[0].mClusterId   = Test::MockClusterId(3);
+        attributePathParams2[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams2[0].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams2[0].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams2[1].mEndpointId            = Test::kMockEndpoint3;
-        attributePathParams2[1].mClusterId             = Test::MockClusterId(2);
-        attributePathParams2[1].mAttributeId           = Test::MockAttributeId(2);
+        attributePathParams2[1].mEndpointId            = chip::Test::kMockEndpoint3;
+        attributePathParams2[1].mClusterId             = chip::Test::MockClusterId(2);
+        attributePathParams2[1].mAttributeId           = chip::Test::MockAttributeId(2);
         readPrepareParams.mpAttributePathParamsList    = attributePathParams2;
         readPrepareParams.mAttributePathParamsListSize = 2;
         err                                            = readClient.SendRequest(readPrepareParams);
@@ -977,16 +1001,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 6);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 1));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -995,7 +1020,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1004,7 +1030,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -1013,7 +1040,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1032,13 +1060,13 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams2[2];
-        attributePathParams2[0].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams2[0].mClusterId   = Test::MockClusterId(3);
+        attributePathParams2[0].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams2[0].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams2[0].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams2[1].mEndpointId            = Test::kMockEndpoint3;
-        attributePathParams2[1].mClusterId             = Test::MockClusterId(2);
-        attributePathParams2[1].mAttributeId           = Test::MockAttributeId(2);
+        attributePathParams2[1].mEndpointId            = chip::Test::kMockEndpoint3;
+        attributePathParams2[1].mClusterId             = chip::Test::MockClusterId(2);
+        attributePathParams2[1].mAttributeId           = chip::Test::MockAttributeId(2);
         readPrepareParams.mpAttributePathParamsList    = attributePathParams2;
         readPrepareParams.mAttributePathParamsListSize = 2;
 
@@ -1052,16 +1080,17 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 6);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 1));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, !version2.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1070,7 +1099,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1079,7 +1109,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -1088,7 +1119,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1100,7 +1132,7 @@
         readPrepareParams.mEventPathParamsListSize = 0;
     }
 
-    Test::BumpVersion();
+    chip::Test::BumpVersion();
 
     // Read of E1C2A* and E2C3A* and E2C2A*, it would use C1 cached version to construct DataVersionFilter, but version has
     // changed in server. Expect E1C2A* and C2C3A* and E2C2A* attributes in report, and cache their versions
@@ -1111,16 +1143,16 @@
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
 
         chip::app::AttributePathParams attributePathParams3[3];
-        attributePathParams3[0].mEndpointId  = Test::kMockEndpoint1;
-        attributePathParams3[0].mClusterId   = Test::MockClusterId(2);
+        attributePathParams3[0].mEndpointId  = chip::Test::kMockEndpoint1;
+        attributePathParams3[0].mClusterId   = chip::Test::MockClusterId(2);
         attributePathParams3[0].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams3[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams3[1].mClusterId   = Test::MockClusterId(3);
+        attributePathParams3[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams3[1].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams3[1].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams3[2].mEndpointId            = Test::kMockEndpoint2;
-        attributePathParams3[2].mClusterId             = Test::MockClusterId(2);
+        attributePathParams3[2].mEndpointId            = chip::Test::kMockEndpoint2;
+        attributePathParams3[2].mClusterId             = chip::Test::MockClusterId(2);
         attributePathParams3[2].mAttributeId           = kInvalidAttributeId;
         readPrepareParams.mpAttributePathParamsList    = attributePathParams3;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -1133,20 +1165,21 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 12);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 2));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint2, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version2.HasValue() && (version2.Value() == 2));
         Optional<DataVersion> version3;
-        app::ConcreteClusterPath clusterPath3(Test::kMockEndpoint1, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath3(chip::Test::kMockEndpoint1, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath3, version3) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version3.HasValue() && (version3.Value() == 2));
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint1, Test::MockClusterId(2), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint1, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1155,7 +1188,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1164,7 +1198,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1173,7 +1208,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -1182,7 +1218,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(2), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1190,7 +1227,8 @@
             NL_TEST_ASSERT(apSuite, receivedAttribute1 == expectedAttribute1);
         }
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1212,16 +1250,16 @@
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
 
         chip::app::AttributePathParams attributePathParams3[3];
-        attributePathParams3[0].mEndpointId  = Test::kMockEndpoint1;
-        attributePathParams3[0].mClusterId   = Test::MockClusterId(2);
+        attributePathParams3[0].mEndpointId  = chip::Test::kMockEndpoint1;
+        attributePathParams3[0].mClusterId   = chip::Test::MockClusterId(2);
         attributePathParams3[0].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams3[1].mEndpointId  = Test::kMockEndpoint2;
-        attributePathParams3[1].mClusterId   = Test::MockClusterId(3);
+        attributePathParams3[1].mEndpointId  = chip::Test::kMockEndpoint2;
+        attributePathParams3[1].mClusterId   = chip::Test::MockClusterId(3);
         attributePathParams3[1].mAttributeId = kInvalidAttributeId;
 
-        attributePathParams3[2].mEndpointId            = Test::kMockEndpoint2;
-        attributePathParams3[2].mClusterId             = Test::MockClusterId(2);
+        attributePathParams3[2].mEndpointId            = chip::Test::kMockEndpoint2;
+        attributePathParams3[2].mClusterId             = chip::Test::MockClusterId(2);
         attributePathParams3[2].mAttributeId           = kInvalidAttributeId;
         readPrepareParams.mpAttributePathParamsList    = attributePathParams3;
         readPrepareParams.mAttributePathParamsListSize = 3;
@@ -1234,20 +1272,21 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 7);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath1(Test::kMockEndpoint2, Test::MockClusterId(3));
+        app::ConcreteClusterPath clusterPath1(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath1, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue() && (version1.Value() == 2));
         Optional<DataVersion> version2;
-        app::ConcreteClusterPath clusterPath2(Test::kMockEndpoint2, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath2(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath2, version2) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version2.HasValue() && (version2.Value() == 2));
         Optional<DataVersion> version3;
-        app::ConcreteClusterPath clusterPath3(Test::kMockEndpoint1, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath3(chip::Test::kMockEndpoint1, chip::Test::MockClusterId(2));
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath3, version3) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version3.HasValue() && (version3.Value() == 2));
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint1, Test::MockClusterId(2), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint1, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1256,7 +1295,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1265,7 +1305,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1274,7 +1315,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(3), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(3),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -1283,7 +1325,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(2), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1292,7 +1335,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint2, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint2, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1312,8 +1356,8 @@
         app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(),
                                    cache.GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read);
         chip::app::AttributePathParams attributePathParams1[1];
-        attributePathParams1[0].mEndpointId = Test::kMockEndpoint3;
-        attributePathParams1[0].mClusterId  = Test::MockClusterId(2);
+        attributePathParams1[0].mEndpointId = chip::Test::kMockEndpoint3;
+        attributePathParams1[0].mClusterId  = chip::Test::MockClusterId(2);
 
         readPrepareParams.mpAttributePathParamsList    = attributePathParams1;
         readPrepareParams.mAttributePathParamsListSize = 1;
@@ -1324,13 +1368,14 @@
         NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 6);
         NL_TEST_ASSERT(apSuite, !delegate.mReadError);
         Optional<DataVersion> version1;
-        app::ConcreteClusterPath clusterPath(Test::kMockEndpoint3, Test::MockClusterId(2));
+        app::ConcreteClusterPath clusterPath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2));
 
         NL_TEST_ASSERT(apSuite, cache.GetVersion(clusterPath, version1) == CHIP_NO_ERROR);
         NL_TEST_ASSERT(apSuite, version1.HasValue());
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(1));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(1));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             bool receivedAttribute1;
@@ -1339,7 +1384,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(2));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(2));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             int16_t receivedAttribute2;
@@ -1348,7 +1394,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(3));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(3));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint64_t receivedAttribute3;
@@ -1357,7 +1404,8 @@
         }
 
         {
-            app::ConcreteAttributePath attributePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(4));
+            app::ConcreteAttributePath attributePath(chip::Test::kMockEndpoint3, chip::Test::MockClusterId(2),
+                                                     chip::Test::MockAttributeId(4));
             TLV::TLVReader reader;
             NL_TEST_ASSERT(apSuite, cache.Get(attributePath, reader) == CHIP_NO_ERROR);
             uint8_t receivedAttribute4[256];
@@ -1393,8 +1441,8 @@
 
     auto onDoneCb = [&onDoneCbInvoked](app::ReadClient * apReadClient) { onDoneCbInvoked = true; };
 
-    Controller::ReadEvent<TestCluster::Events::TestEvent::DecodableType>(&ctx.GetExchangeManager(), sessionHandle, kTestEndpointId,
-                                                                         onSuccessCb, onFailureCb, onDoneCb);
+    Controller::ReadEvent<Clusters::UnitTesting::Events::TestEvent::DecodableType>(
+        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, onDoneCb);
 
     ctx.DrainAndServiceIO();
 
@@ -1427,8 +1475,8 @@
         onFailureCbInvoked = true;
     };
 
-    Controller::ReadAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle,
-                                                                                        kTestEndpointId, onSuccessCb, onFailureCb);
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
+        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -1459,8 +1507,8 @@
         onFailureCbInvoked = true;
     };
 
-    Controller::ReadAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle,
-                                                                                        kTestEndpointId, onSuccessCb, onFailureCb);
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
+        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb);
 
     ctx.ExpireSessionAliceToBob();
 
@@ -1544,7 +1592,7 @@
     TestContext & ctx  = *static_cast<TestContext *>(apContext);
     auto sessionHandle = ctx.GetSessionBobToAlice();
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kResponsive);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kResponsive);
 
     {
         TestResubscriptionCallback callback;
@@ -1560,8 +1608,8 @@
         readPrepareParams.mpAttributePathParamsList    = attributePathParams;
         readPrepareParams.mAttributePathParamsListSize = ArraySize(attributePathParams);
         attributePathParams[0].mEndpointId             = kTestEndpointId;
-        attributePathParams[0].mClusterId              = app::Clusters::TestCluster::Id;
-        attributePathParams[0].mAttributeId            = app::Clusters::TestCluster::Attributes::Boolean::Id;
+        attributePathParams[0].mClusterId              = app::Clusters::UnitTesting::Id;
+        attributePathParams[0].mAttributeId            = app::Clusters::UnitTesting::Attributes::Boolean::Id;
 
         readPrepareParams.mMaxIntervalCeilingSeconds = 1;
 
@@ -1582,7 +1630,7 @@
         //
         // 1.5s should cover the liveness timeout in the client of 1s max interval + 50ms ACK timeout.
         //
-        ctx.GetLoopback().mNumMessagesToDrop = Test::LoopbackTransport::kUnlimitedMessageCount;
+        ctx.GetLoopback().mNumMessagesToDrop = chip::Test::LoopbackTransport::kUnlimitedMessageCount;
         ctx.GetIOContext().DriveIOUntil(System::Clock::Milliseconds32(1500),
                                         [&]() { return callback.mOnResubscriptionsAttempted > 0; });
 
@@ -1606,7 +1654,7 @@
         NL_TEST_ASSERT(apSuite, callback.mOnDone == 0);
     }
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kDefault);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kDefault);
 
     app::InteractionModelEngine::GetInstance()->ShutdownActiveReads();
     NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
@@ -1621,7 +1669,7 @@
     TestContext & ctx  = *static_cast<TestContext *>(apContext);
     auto sessionHandle = ctx.GetSessionBobToAlice();
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kResponsive);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kResponsive);
 
     {
         TestResubscriptionCallback callback;
@@ -1636,8 +1684,8 @@
         readPrepareParams.mpAttributePathParamsList    = attributePathParams;
         readPrepareParams.mAttributePathParamsListSize = ArraySize(attributePathParams);
         attributePathParams[0].mEndpointId             = kTestEndpointId;
-        attributePathParams[0].mClusterId              = app::Clusters::TestCluster::Id;
-        attributePathParams[0].mAttributeId            = app::Clusters::TestCluster::Attributes::Boolean::Id;
+        attributePathParams[0].mClusterId              = app::Clusters::UnitTesting::Id;
+        attributePathParams[0].mAttributeId            = app::Clusters::UnitTesting::Attributes::Boolean::Id;
 
         //
         // Request a max interval that's very small to reduce time to discovering a liveness failure.
@@ -1657,7 +1705,7 @@
         //
         // Request we drop all further messages.
         //
-        ctx.GetLoopback().mNumMessagesToDrop = Test::LoopbackTransport::kUnlimitedMessageCount;
+        ctx.GetLoopback().mNumMessagesToDrop = chip::Test::LoopbackTransport::kUnlimitedMessageCount;
 
         //
         // Drive IO until we get an error on the subscription, which should be caused
@@ -1673,7 +1721,7 @@
         NL_TEST_ASSERT(apSuite, callback.mOnResubscriptionsAttempted == 0);
     }
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kDefault);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kDefault);
 
     app::InteractionModelEngine::GetInstance()->ShutdownActiveReads();
     NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
@@ -1722,7 +1770,7 @@
     for (size_t i = 0; i < (app::InteractionModelEngine::kReadHandlerPoolSize + 1); i++)
     {
         NL_TEST_ASSERT(apSuite,
-                       Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                       Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                            &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 20,
                            onSubscriptionEstablishedCb, nullptr, false, true) == CHIP_NO_ERROR);
     }
@@ -1744,7 +1792,7 @@
     NL_TEST_ASSERT(apSuite, gTestReadInteraction.mNumActiveSubscriptions == 0);
     NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kDefault);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kDefault);
     app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback();
 }
 
@@ -1786,7 +1834,7 @@
     gTestReadInteraction.mEmitSubscriptionError = true;
 
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10,
                        onSubscriptionEstablishedCb, nullptr, false, true) == CHIP_NO_ERROR);
 
@@ -1859,7 +1907,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = false;
 
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 5, 5,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -1934,7 +1982,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = false;
 
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2009,7 +2057,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = true;
     gTestReadInteraction.mMaxInterval                = 3000;
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2075,7 +2123,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = true;
     gTestReadInteraction.mMaxInterval                = 3700;
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2149,7 +2197,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = false;
 
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 4000,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2224,7 +2272,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = true;
     gTestReadInteraction.mMaxInterval                = 3000;
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 4000,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2298,7 +2346,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = true;
     gTestReadInteraction.mMaxInterval                = 3700;
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 4000,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2363,7 +2411,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = true;
     gTestReadInteraction.mMaxInterval                = 4100;
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 4000,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_NO_ERROR);
 
@@ -2427,7 +2475,7 @@
     gTestReadInteraction.mAlterSubscriptionIntervals = false;
 
     NL_TEST_ASSERT(apSuite,
-                   Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 5, 4,
                        onSubscriptionEstablishedCb, nullptr, true) == CHIP_ERROR_INVALID_ARGUMENT);
 
@@ -2532,7 +2580,7 @@
     for (size_t i = 0; i < aSubscribeCount; ++i)
     {
         NL_TEST_ASSERT(apSuite,
-                       Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                       Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                            &aCtx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10,
                            onSubscriptionEstablishedCb, nullptr, false, true) == CHIP_NO_ERROR);
     }
@@ -2574,7 +2622,7 @@
         };
 
         NL_TEST_ASSERT(apSuite,
-                       Controller::ReadAttribute<TestCluster::Attributes::Int16u::TypeInfo>(
+                       Controller::ReadAttribute<Clusters::UnitTesting::Attributes::Int16u::TypeInfo>(
                            &aCtx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb) == CHIP_NO_ERROR);
     }
 }
@@ -2631,7 +2679,7 @@
     for (size_t i = 0; i < (app::InteractionModelEngine::kReadHandlerPoolSize + 1); i++)
     {
         NL_TEST_ASSERT(apSuite,
-                       Controller::SubscribeAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                       Controller::SubscribeAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                            &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10,
                            onSubscriptionEstablishedCb, nullptr, false, true, dataVersion) == CHIP_NO_ERROR);
     }
@@ -2682,7 +2730,7 @@
     app::InteractionModelEngine::GetInstance()->SetForceHandlerQuota(true);
 
     NL_TEST_ASSERT(apSuite,
-                   Controller::ReadAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+                   Controller::ReadAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
                        &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb) == CHIP_NO_ERROR);
 
     ctx.DrainAndServiceIO();
@@ -2733,7 +2781,7 @@
         onFailureCbInvoked = true;
     };
 
-    Controller::ReadAttribute<TestCluster::Attributes::ListFabricScoped::TypeInfo>(
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo>(
         &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, false /* fabric filtered */);
 
     ctx.DrainAndServiceIO();
@@ -2789,7 +2837,7 @@
         onFailureCbInvoked = true;
     };
 
-    Controller::ReadAttribute<TestCluster::Attributes::ListFabricScoped::TypeInfo>(
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo>(
         &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, true /* fabric filtered */);
 
     ctx.DrainAndServiceIO();
@@ -2901,7 +2949,7 @@
     TestContext & ctx  = *static_cast<TestContext *>(apContext);
     auto sessionHandle = ctx.GetSessionBobToAlice();
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kResponsive);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kResponsive);
 
     {
         SubscriptionPathQuotaHelpers::TestReadCallback callback;
@@ -2913,8 +2961,8 @@
         app::AttributePathParams attributePathParams[1];
         readPrepareParams.mpAttributePathParamsList    = attributePathParams;
         readPrepareParams.mAttributePathParamsListSize = ArraySize(attributePathParams);
-        attributePathParams[0].mClusterId              = app::Clusters::TestCluster::Id;
-        attributePathParams[0].mAttributeId            = app::Clusters::TestCluster::Attributes::ListStructOctetString::Id;
+        attributePathParams[0].mClusterId              = app::Clusters::UnitTesting::Id;
+        attributePathParams[0].mAttributeId            = app::Clusters::UnitTesting::Attributes::ListStructOctetString::Id;
 
         //
         // Request a max interval that's very small to reduce time to discovering a liveness failure.
@@ -2931,7 +2979,7 @@
         NL_TEST_ASSERT(apSuite, callback.mOnDone == 1);
     }
 
-    ctx.SetMRPMode(Test::MessagingContext::MRPMode::kDefault);
+    ctx.SetMRPMode(chip::Test::MessagingContext::MRPMode::kDefault);
 
     app::InteractionModelEngine::GetInstance()->ShutdownActiveReads();
     NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
@@ -2958,10 +3006,10 @@
     std::vector<std::unique_ptr<app::ReadClient>> readClients;
 
     EstablishReadOrSubscriptions(apSuite, ctx.GetSessionAliceToBob(), 1, 1,
-                                 app::AttributePathParams(kTestEndpointId, TestCluster::Id, kPerpetualAttributeid),
+                                 app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, kPerpetualAttributeid),
                                  app::ReadClient::InteractionType::Read, &perpetualReadCallback, readClients);
     EstablishReadOrSubscriptions(apSuite, ctx.GetSessionBobToAlice(), 1, 1,
-                                 app::AttributePathParams(kTestEndpointId, TestCluster::Id, kPerpetualAttributeid),
+                                 app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, kPerpetualAttributeid),
                                  app::ReadClient::InteractionType::Read, &perpetualReadCallback, readClients);
     ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() {
         return app::InteractionModelEngine::GetInstance()->GetNumActiveReadHandlers(app::ReadHandler::InteractionType::Read) == 2;
@@ -2980,15 +3028,15 @@
     // of the minimum later below.
     //
     // Subscription A
-    EstablishReadOrSubscriptions(apSuite, ctx.GetSessionBobToAlice(), 1,
-                                 app::InteractionModelEngine::kMinSupportedPathsPerSubscription + 1,
-                                 app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
-                                 app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
+    EstablishReadOrSubscriptions(
+        apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerSubscription + 1,
+        app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
+        app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
     // Subscription B
-    EstablishReadOrSubscriptions(apSuite, ctx.GetSessionBobToAlice(), kExpectedParallelSubs,
-                                 app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
-                                 app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
-                                 app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
+    EstablishReadOrSubscriptions(
+        apSuite, ctx.GetSessionBobToAlice(), kExpectedParallelSubs, app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
+        app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
+        app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
 
     // There are too many messages and the test (gcc_debug, which includes many sanity checks) will be quite slow. Note: report
     // engine is using ScheduleWork which cannot be handled by DrainAndServiceIO correctly.
@@ -3020,7 +3068,7 @@
         std::vector<std::unique_ptr<app::ReadClient>> outReadClient;
         EstablishReadOrSubscriptions(
             apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerSubscription + 1,
-            app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+            app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
             app::ReadClient::InteractionType::Subscribe, &callback, outReadClient);
 
         ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return callback.mOnError == 1; });
@@ -3035,7 +3083,7 @@
     {
         EstablishReadOrSubscriptions(
             apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
-            app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+            app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
             app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
 
         readCallback.ClearCounters();
@@ -3058,8 +3106,8 @@
     {
         app::AttributePathParams path;
         path.mEndpointId  = kTestEndpointId;
-        path.mClusterId   = TestCluster::Id;
-        path.mAttributeId = TestCluster::Attributes::Int16u::Id;
+        path.mClusterId   = Clusters::UnitTesting::Id;
+        path.mAttributeId = Clusters::UnitTesting::Attributes::Int16u::Id;
         app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(path);
     }
     readCallback.ClearCounters();
@@ -3091,7 +3139,7 @@
         EstablishReadOrSubscriptions(
             apSuite, ctx.GetSessionAliceToBob(), app::InteractionModelEngine::kMinSupportedSubscriptionsPerFabric,
             app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
-            app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+            app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
             app::ReadClient::InteractionType::Subscribe, &readCallbackFabric2, readClients);
 
         // Run until we have established the subscriptions.
@@ -3117,8 +3165,8 @@
     {
         app::AttributePathParams path;
         path.mEndpointId  = kTestEndpointId;
-        path.mClusterId   = TestCluster::Id;
-        path.mAttributeId = TestCluster::Attributes::Int16u::Id;
+        path.mClusterId   = Clusters::UnitTesting::Id;
+        path.mAttributeId = Clusters::UnitTesting::Attributes::Int16u::Id;
         app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(path);
     }
     readCallback.ClearCounters();
@@ -3183,10 +3231,10 @@
     app::InteractionModelEngine::GetInstance()->SetPathPoolCapacityForSubscriptions(kExpectedParallelPaths);
 
     // This should just use all availbale resources.
-    EstablishReadOrSubscriptions(apSuite, ctx.GetSessionBobToAlice(), kExpectedParallelSubs,
-                                 app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
-                                 app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
-                                 app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
+    EstablishReadOrSubscriptions(
+        apSuite, ctx.GetSessionBobToAlice(), kExpectedParallelSubs, app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
+        app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
+        app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
 
     ctx.DrainAndServiceIO();
 
@@ -3205,7 +3253,7 @@
         std::vector<std::unique_ptr<app::ReadClient>> outReadClient;
         EstablishReadOrSubscriptions(
             apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerSubscription + 1,
-            app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+            app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
             app::ReadClient::InteractionType::Subscribe, &callback, outReadClient);
 
         ctx.DrainAndServiceIO();
@@ -3219,7 +3267,7 @@
     {
         EstablishReadOrSubscriptions(
             apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerSubscription,
-            app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+            app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
             app::ReadClient::InteractionType::Subscribe, &readCallback, readClients);
         readCallback.ClearCounters();
 
@@ -3236,8 +3284,8 @@
     {
         app::AttributePathParams path;
         path.mEndpointId  = kTestEndpointId;
-        path.mClusterId   = TestCluster::Id;
-        path.mAttributeId = TestCluster::Attributes::Int16u::Id;
+        path.mClusterId   = Clusters::UnitTesting::Id;
+        path.mAttributeId = Clusters::UnitTesting::Attributes::Int16u::Id;
         app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(path);
     }
     readCallback.ClearCounters();
@@ -3341,7 +3389,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest + 1,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3384,7 +3432,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest + 1,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3425,7 +3473,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest + 1,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3476,7 +3524,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, 1,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3525,7 +3573,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3581,7 +3629,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3637,7 +3685,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3688,7 +3736,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3742,7 +3790,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3800,7 +3848,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionCharlieToDavid(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3855,7 +3903,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionCharlieToDavid(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3911,7 +3959,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionCharlieToDavid(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -3958,7 +4006,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionCharlieToDavid(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
 
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
@@ -4003,7 +4051,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
 
@@ -4049,7 +4097,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionBobToAlice(), 1, 1,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
 
@@ -4100,7 +4148,7 @@
 
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionBobToAlice(), 1, 1,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
 
@@ -4154,7 +4202,7 @@
             // We have to evict one read transaction on PASE session and one read transaction on Alice's fabric.
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionAliceToBob(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
 
@@ -4216,7 +4264,7 @@
             // To handle this read request, we must evict both read transactions from the PASE session.
             EstablishReadOrSubscriptions(
                 apSuite, ctx.GetSessionBobToAlice(), 1, app::InteractionModelEngine::kMinSupportedPathsPerReadRequest,
-                app::AttributePathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id),
+                app::AttributePathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id),
                 app::ReadClient::InteractionType::Read, &readCallback, readClients);
             ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(5), [&]() { return readCallback.mOnDone != 0; });
 
@@ -4374,8 +4422,8 @@
     // not safe to do so.
     auto onFailureCb = [&failureCalls](const app::ConcreteDataAttributePath * attributePath, CHIP_ERROR aError) { ++failureCalls; };
 
-    Controller::ReadAttribute<TestCluster::Attributes::Boolean::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle, kTestEndpointId,
-                                                                          onSuccessCb, onFailureCb);
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::Boolean::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle,
+                                                                                    kTestEndpointId, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -4408,8 +4456,8 @@
     // not safe to do so.
     auto onFailureCb = [&failureCalls](const app::ConcreteDataAttributePath * attributePath, CHIP_ERROR aError) { ++failureCalls; };
 
-    Controller::ReadAttribute<TestCluster::Attributes::Boolean::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle, kTestEndpointId,
-                                                                          onSuccessCb, onFailureCb);
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::Boolean::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle,
+                                                                                    kTestEndpointId, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -4442,8 +4490,8 @@
     // not safe to do so.
     auto onFailureCb = [&failureCalls](const app::ConcreteDataAttributePath * attributePath, CHIP_ERROR aError) { ++failureCalls; };
 
-    Controller::ReadAttribute<TestCluster::Attributes::Boolean::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle, kTestEndpointId,
-                                                                          onSuccessCb, onFailureCb);
+    Controller::ReadAttribute<Clusters::UnitTesting::Attributes::Boolean::TypeInfo>(&ctx.GetExchangeManager(), sessionHandle,
+                                                                                    kTestEndpointId, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -4466,7 +4514,7 @@
 
     TestContext & ctx = *static_cast<TestContext *>(apContext);
     TestReadCallback readCallback;
-    app::AttributePathParams pathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id);
+    app::AttributePathParams pathParams(kTestEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Attributes::Int16u::Id);
 
     app::ReadPrepareParams readParam(ctx.GetSessionAliceToBob());
     readParam.mpAttributePathParamsList    = &pathParams;
diff --git a/src/controller/tests/data_model/TestWrite.cpp b/src/controller/tests/data_model/TestWrite.cpp
index 948bb01..a24c3a2 100644
--- a/src/controller/tests/data_model/TestWrite.cpp
+++ b/src/controller/tests/data_model/TestWrite.cpp
@@ -34,7 +34,7 @@
 using namespace chip;
 using namespace chip::app;
 using namespace chip::app::Clusters;
-using namespace chip::app::Clusters::TestCluster;
+using namespace chip::app::Clusters::UnitTesting;
 using namespace chip::Protocols;
 
 namespace {
@@ -75,7 +75,8 @@
         return aWriteHandler->AddStatus(aPath, Protocols::InteractionModel::Status::DataVersionMismatch);
     }
 
-    if (aPath.mClusterId == TestCluster::Id && aPath.mAttributeId == Attributes::ListStructOctetString::TypeInfo::GetAttributeId())
+    if (aPath.mClusterId == Clusters::UnitTesting::Id &&
+        aPath.mAttributeId == Attributes::ListStructOctetString::TypeInfo::GetAttributeId())
     {
         if (responseDirective == kSendAttributeSuccess)
         {
@@ -119,7 +120,7 @@
 
         return CHIP_NO_ERROR;
     }
-    if (aPath.mClusterId == TestCluster::Id && aPath.mAttributeId == Attributes::ListFabricScoped::Id)
+    if (aPath.mClusterId == Clusters::UnitTesting::Id && aPath.mAttributeId == Attributes::ListFabricScoped::Id)
     {
         // Mock a invalid SubjectDescriptor
         AttributeValueDecoder decoder(aReader, Access::SubjectDescriptor());
@@ -152,7 +153,7 @@
         return CHIP_NO_ERROR;
     }
 
-    if (aPath.mClusterId == TestCluster::Id && aPath.mAttributeId == Attributes::Boolean::TypeInfo::GetAttributeId())
+    if (aPath.mClusterId == Clusters::UnitTesting::Id && aPath.mAttributeId == Attributes::Boolean::TypeInfo::GetAttributeId())
     {
         InteractionModel::Status status;
         if (responseDirective == kSendMultipleSuccess)
@@ -203,8 +204,8 @@
     TestContext & ctx       = *static_cast<TestContext *>(apContext);
     auto sessionHandle      = ctx.GetSessionBobToAlice();
     bool onSuccessCbInvoked = false, onFailureCbInvoked = false;
-    TestCluster::Structs::TestListStructOctet::Type valueBuf[4];
-    TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
+    Clusters::UnitTesting::Structs::TestListStructOctet::Type valueBuf[4];
+    Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
 
     value = valueBuf;
 
@@ -227,8 +228,8 @@
         onFailureCbInvoked = true;
     };
 
-    chip::Controller::WriteAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(sessionHandle, kTestEndpointId,
-                                                                                               value, onSuccessCb, onFailureCb);
+    chip::Controller::WriteAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
+        sessionHandle, kTestEndpointId, value, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -242,8 +243,8 @@
     TestContext & ctx       = *static_cast<TestContext *>(apContext);
     auto sessionHandle      = ctx.GetSessionBobToAlice();
     bool onSuccessCbInvoked = false, onFailureCbInvoked = false;
-    TestCluster::Structs::TestListStructOctet::Type valueBuf[4];
-    TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
+    Clusters::UnitTesting::Structs::TestListStructOctet::Type valueBuf[4];
+    Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
 
     value = valueBuf;
 
@@ -268,7 +269,7 @@
 
     chip::Optional<chip::DataVersion> dataVersion;
     dataVersion.SetValue(kAcceptedDataVersion);
-    chip::Controller::WriteAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+    chip::Controller::WriteAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
         sessionHandle, kTestEndpointId, value, onSuccessCb, onFailureCb, nullptr, dataVersion);
 
     ctx.DrainAndServiceIO();
@@ -283,8 +284,8 @@
     TestContext & ctx       = *static_cast<TestContext *>(apContext);
     auto sessionHandle      = ctx.GetSessionBobToAlice();
     bool onSuccessCbInvoked = false, onFailureCbInvoked = false;
-    TestCluster::Structs::TestListStructOctet::Type valueBuf[4];
-    TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value;
+    Clusters::UnitTesting::Structs::TestListStructOctet::Type valueBuf[4];
+    Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::Type value;
 
     value = valueBuf;
 
@@ -308,7 +309,7 @@
     };
 
     chip::Optional<chip::DataVersion> dataVersion(kRejectedDataVersion);
-    chip::Controller::WriteAttribute<TestCluster::Attributes::ListStructOctetString::TypeInfo>(
+    chip::Controller::WriteAttribute<Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo>(
         sessionHandle, kTestEndpointId, value, onSuccessCb, onFailureCb, nullptr, dataVersion);
 
     ctx.DrainAndServiceIO();
@@ -363,8 +364,8 @@
     TestContext & ctx       = *static_cast<TestContext *>(apContext);
     auto sessionHandle      = ctx.GetSessionBobToAlice();
     bool onSuccessCbInvoked = false, onFailureCbInvoked = false;
-    TestCluster::Structs::TestFabricScoped::Type valueBuf[4];
-    TestCluster::Attributes::ListFabricScoped::TypeInfo::Type value;
+    Clusters::UnitTesting::Structs::TestFabricScoped::Type valueBuf[4];
+    Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo::Type value;
 
     value = valueBuf;
 
@@ -386,8 +387,8 @@
         onFailureCbInvoked = true;
     };
 
-    chip::Controller::WriteAttribute<TestCluster::Attributes::ListFabricScoped::TypeInfo>(sessionHandle, kTestEndpointId, value,
-                                                                                          onSuccessCb, onFailureCb);
+    chip::Controller::WriteAttribute<Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo>(
+        sessionHandle, kTestEndpointId, value, onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -413,8 +414,8 @@
     // not safe to do so.
     auto onFailureCb = [&failureCalls](const ConcreteAttributePath * attributePath, CHIP_ERROR aError) { ++failureCalls; };
 
-    chip::Controller::WriteAttribute<TestCluster::Attributes::Boolean::TypeInfo>(sessionHandle, kTestEndpointId, true, onSuccessCb,
-                                                                                 onFailureCb);
+    chip::Controller::WriteAttribute<Clusters::UnitTesting::Attributes::Boolean::TypeInfo>(sessionHandle, kTestEndpointId, true,
+                                                                                           onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
@@ -441,8 +442,8 @@
     // not safe to do so.
     auto onFailureCb = [&failureCalls](const ConcreteAttributePath * attributePath, CHIP_ERROR aError) { ++failureCalls; };
 
-    chip::Controller::WriteAttribute<TestCluster::Attributes::Boolean::TypeInfo>(sessionHandle, kTestEndpointId, true, onSuccessCb,
-                                                                                 onFailureCb);
+    chip::Controller::WriteAttribute<Clusters::UnitTesting::Attributes::Boolean::TypeInfo>(sessionHandle, kTestEndpointId, true,
+                                                                                           onSuccessCb, onFailureCb);
 
     ctx.DrainAndServiceIO();
 
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 10ed208..010ca73 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -16082,8 +16082,8 @@
         }
         break;
     }
-    case Clusters::TestCluster::Id: {
-        using namespace Clusters::TestCluster;
+    case Clusters::UnitTesting::Id: {
+        using namespace Clusters::UnitTesting;
         switch (aPath.mAttributeId) {
         case Attributes::Boolean::Id: {
             using TypeInfo = Attributes::Boolean::TypeInfo;
@@ -16436,8 +16436,8 @@
                 auto iter_0 = cppValue.begin();
                 while (iter_0.Next()) {
                     auto & entry_0 = iter_0.GetValue();
-                    MTRTestClusterClusterTestListStructOctet * newElement_0;
-                    newElement_0 = [MTRTestClusterClusterTestListStructOctet new];
+                    MTRUnitTestingClusterTestListStructOctet * newElement_0;
+                    newElement_0 = [MTRUnitTestingClusterTestListStructOctet new];
                     newElement_0.member1 = [NSNumber numberWithUnsignedLongLong:entry_0.member1];
                     newElement_0.member2 = [NSData dataWithBytes:entry_0.member2.data() length:entry_0.member2.size()];
                     [array_0 addObject:newElement_0];
@@ -16530,8 +16530,8 @@
                 auto iter_0 = cppValue.begin();
                 while (iter_0.Next()) {
                     auto & entry_0 = iter_0.GetValue();
-                    MTRTestClusterClusterNullablesAndOptionalsStruct * newElement_0;
-                    newElement_0 = [MTRTestClusterClusterNullablesAndOptionalsStruct new];
+                    MTRUnitTestingClusterNullablesAndOptionalsStruct * newElement_0;
+                    newElement_0 = [MTRUnitTestingClusterNullablesAndOptionalsStruct new];
                     if (entry_0.nullableInt.IsNull()) {
                         newElement_0.nullableInt = nil;
                     } else {
@@ -16581,7 +16581,7 @@
                     if (entry_0.nullableStruct.IsNull()) {
                         newElement_0.nullableStruct = nil;
                     } else {
-                        newElement_0.nullableStruct = [MTRTestClusterClusterSimpleStruct new];
+                        newElement_0.nullableStruct = [MTRUnitTestingClusterSimpleStruct new];
                         newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a];
                         newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b];
                         newElement_0.nullableStruct.c =
@@ -16596,7 +16596,7 @@
                         newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h];
                     }
                     if (entry_0.optionalStruct.HasValue()) {
-                        newElement_0.optionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                        newElement_0.optionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                         newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a];
                         newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b];
                         newElement_0.optionalStruct.c =
@@ -16616,7 +16616,7 @@
                         if (entry_0.nullableOptionalStruct.Value().IsNull()) {
                             newElement_0.nullableOptionalStruct = nil;
                         } else {
-                            newElement_0.nullableOptionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                            newElement_0.nullableOptionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                             newElement_0.nullableOptionalStruct.a =
                                 [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a];
                             newElement_0.nullableOptionalStruct.b =
@@ -16733,8 +16733,8 @@
             if (*aError != CHIP_NO_ERROR) {
                 return nil;
             }
-            MTRTestClusterClusterSimpleStruct * _Nonnull value;
-            value = [MTRTestClusterClusterSimpleStruct new];
+            MTRUnitTestingClusterSimpleStruct * _Nonnull value;
+            value = [MTRUnitTestingClusterSimpleStruct new];
             value.a = [NSNumber numberWithUnsignedChar:cppValue.a];
             value.b = [NSNumber numberWithBool:cppValue.b];
             value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.c)];
@@ -16828,8 +16828,8 @@
                 auto iter_0 = cppValue.begin();
                 while (iter_0.Next()) {
                     auto & entry_0 = iter_0.GetValue();
-                    MTRTestClusterClusterTestFabricScoped * newElement_0;
-                    newElement_0 = [MTRTestClusterClusterTestFabricScoped new];
+                    MTRUnitTestingClusterTestFabricScoped * newElement_0;
+                    newElement_0 = [MTRUnitTestingClusterTestFabricScoped new];
                     newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u];
                     if (entry_0.optionalFabricSensitiveInt8u.HasValue()) {
                         newElement_0.optionalFabricSensitiveInt8u =
@@ -16857,7 +16857,7 @@
                         [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data()
                                                  length:entry_0.fabricSensitiveCharString.size()
                                                encoding:NSUTF8StringEncoding];
-                    newElement_0.fabricSensitiveStruct = [MTRTestClusterClusterSimpleStruct new];
+                    newElement_0.fabricSensitiveStruct = [MTRUnitTestingClusterSimpleStruct new];
                     newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a];
                     newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b];
                     newElement_0.fabricSensitiveStruct.c =
@@ -17371,11 +17371,11 @@
             if (*aError != CHIP_NO_ERROR) {
                 return nil;
             }
-            MTRTestClusterClusterSimpleStruct * _Nullable value;
+            MTRUnitTestingClusterSimpleStruct * _Nullable value;
             if (cppValue.IsNull()) {
                 value = nil;
             } else {
-                value = [MTRTestClusterClusterSimpleStruct new];
+                value = [MTRUnitTestingClusterSimpleStruct new];
                 value.a = [NSNumber numberWithUnsignedChar:cppValue.Value().a];
                 value.b = [NSNumber numberWithBool:cppValue.Value().b];
                 value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().c)];
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 7c4f33c..73bf001 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -18322,88 +18322,88 @@
 @end
 
 /**
- * Cluster Test Cluster
+ * Cluster Unit Testing
  *    The Test Cluster is meant to validate the generated code
  */
-@interface MTRBaseClusterTestCluster : MTRCluster
+@interface MTRBaseClusterUnitTesting : MTRCluster
 
 - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
                               endpointID:(NSNumber *)endpointID
                                    queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE;
 
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params
             completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)testWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                       completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
-                    completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
+                    completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testSpecificWithCompletion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithCompletion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                           completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
-                        completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
+                        completion:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
-                                 completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
+                                 completion:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                       completion:
-                                          (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                          (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
-                                 completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
+                                 completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
-                                       completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
+                                       completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
-                                     completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
+                                     completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
-                                    completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
+                                    completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
-                                           completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
+                                           completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
-                                               completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
+                                               completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
-                                   completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
+                                   completion:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
-                        completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
+                        completion:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
-                                   completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
+                                   completion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                           completion:
                                               (void (^)(
-                                                  MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                                  MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
-                               completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
+                               completion:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                           completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                          completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
-                                completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
+                                completion:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 - (void)
-    testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+    testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                         completion:
                                             (void (^)(
-                                                MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                                MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 
 - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
@@ -19156,11 +19156,11 @@
                                      completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
     MTR_NEWLY_AVAILABLE;
 
-- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                   NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                                completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                                    params:(MTRWriteParams * _Nullable)params
                                completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 /**
@@ -19169,12 +19169,12 @@
  */
 - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams *)params
                        subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
-                                 reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                 reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                    NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE;
 + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                          endpoint:(NSNumber *)endpoint
                                             queue:(dispatch_queue_t)queue
-                                       completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                       completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                       NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 
 - (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
@@ -19976,11 +19976,11 @@
                                              completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
     MTR_NEWLY_AVAILABLE;
 
-- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                       NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                                    completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                                        params:(MTRWriteParams * _Nullable)params
                                    completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 /**
@@ -19989,12 +19989,12 @@
  */
 - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams *)params
                            subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
-                                     reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                     reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                        NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE;
 + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                              endpoint:(NSNumber *)endpoint
                                                 queue:(dispatch_queue_t)queue
-                                           completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                           completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                           NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 
 - (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value,
@@ -21590,45 +21590,45 @@
     MTRApplicationBasicApplicationStatusActiveVisibleNotFocus = 0x03,
 };
 
-typedef NS_ENUM(uint8_t, MTRTestClusterSimple) {
-    MTRTestClusterSimpleUnspecified = 0x00,
-    MTRTestClusterSimpleValueA = 0x01,
-    MTRTestClusterSimpleValueB = 0x02,
-    MTRTestClusterSimpleValueC = 0x03,
+typedef NS_ENUM(uint8_t, MTRUnitTestingSimple) {
+    MTRUnitTestingSimpleUnspecified = 0x00,
+    MTRUnitTestingSimpleValueA = 0x01,
+    MTRUnitTestingSimpleValueB = 0x02,
+    MTRUnitTestingSimpleValueC = 0x03,
 };
 
-typedef NS_OPTIONS(uint16_t, MTRTestClusterBitmap16MaskMap) {
-    MTRTestClusterBitmap16MaskMapMaskVal1 = 0x1,
-    MTRTestClusterBitmap16MaskMapMaskVal2 = 0x2,
-    MTRTestClusterBitmap16MaskMapMaskVal3 = 0x4,
-    MTRTestClusterBitmap16MaskMapMaskVal4 = 0x4000,
+typedef NS_OPTIONS(uint16_t, MTRUnitTestingBitmap16MaskMap) {
+    MTRUnitTestingBitmap16MaskMapMaskVal1 = 0x1,
+    MTRUnitTestingBitmap16MaskMapMaskVal2 = 0x2,
+    MTRUnitTestingBitmap16MaskMapMaskVal3 = 0x4,
+    MTRUnitTestingBitmap16MaskMapMaskVal4 = 0x4000,
 };
 
-typedef NS_OPTIONS(uint32_t, MTRTestClusterBitmap32MaskMap) {
-    MTRTestClusterBitmap32MaskMapMaskVal1 = 0x1,
-    MTRTestClusterBitmap32MaskMapMaskVal2 = 0x2,
-    MTRTestClusterBitmap32MaskMapMaskVal3 = 0x4,
-    MTRTestClusterBitmap32MaskMapMaskVal4 = 0x40000000,
+typedef NS_OPTIONS(uint32_t, MTRUnitTestingBitmap32MaskMap) {
+    MTRUnitTestingBitmap32MaskMapMaskVal1 = 0x1,
+    MTRUnitTestingBitmap32MaskMapMaskVal2 = 0x2,
+    MTRUnitTestingBitmap32MaskMapMaskVal3 = 0x4,
+    MTRUnitTestingBitmap32MaskMapMaskVal4 = 0x40000000,
 };
 
-typedef NS_OPTIONS(uint64_t, MTRTestClusterBitmap64MaskMap) {
-    MTRTestClusterBitmap64MaskMapMaskVal1 = 0x1,
-    MTRTestClusterBitmap64MaskMapMaskVal2 = 0x2,
-    MTRTestClusterBitmap64MaskMapMaskVal3 = 0x4,
-    MTRTestClusterBitmap64MaskMapMaskVal4 = 0x4000000000000000,
+typedef NS_OPTIONS(uint64_t, MTRUnitTestingBitmap64MaskMap) {
+    MTRUnitTestingBitmap64MaskMapMaskVal1 = 0x1,
+    MTRUnitTestingBitmap64MaskMapMaskVal2 = 0x2,
+    MTRUnitTestingBitmap64MaskMapMaskVal3 = 0x4,
+    MTRUnitTestingBitmap64MaskMapMaskVal4 = 0x4000000000000000,
 };
 
-typedef NS_OPTIONS(uint8_t, MTRTestClusterBitmap8MaskMap) {
-    MTRTestClusterBitmap8MaskMapMaskVal1 = 0x1,
-    MTRTestClusterBitmap8MaskMapMaskVal2 = 0x2,
-    MTRTestClusterBitmap8MaskMapMaskVal3 = 0x4,
-    MTRTestClusterBitmap8MaskMapMaskVal4 = 0x40,
+typedef NS_OPTIONS(uint8_t, MTRUnitTestingBitmap8MaskMap) {
+    MTRUnitTestingBitmap8MaskMapMaskVal1 = 0x1,
+    MTRUnitTestingBitmap8MaskMapMaskVal2 = 0x2,
+    MTRUnitTestingBitmap8MaskMapMaskVal3 = 0x4,
+    MTRUnitTestingBitmap8MaskMapMaskVal4 = 0x40,
 };
 
-typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) {
-    MTRTestClusterSimpleBitmapValueA = 0x1,
-    MTRTestClusterSimpleBitmapValueB = 0x2,
-    MTRTestClusterSimpleBitmapValueC = 0x4,
+typedef NS_OPTIONS(uint8_t, MTRUnitTestingSimpleBitmap) {
+    MTRUnitTestingSimpleBitmapValueA = 0x1,
+    MTRUnitTestingSimpleBitmapValueB = 0x2,
+    MTRUnitTestingSimpleBitmapValueC = 0x4,
 };
 
 typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) {
@@ -40685,107 +40685,107 @@
 
 @end
 
-@interface MTRBaseClusterTestCluster (Deprecated)
+@interface MTRBaseClusterUnitTesting (Deprecated)
 
 - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device
                                endpoint:(uint16_t)endpoint
                                   queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:");
 
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params
      completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use testWithParams:completion:");
 - (void)testWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use testWithCompletion:");
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNotHandledWithParams:completion:");
 - (void)testNotHandledWithCompletionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNotHandledWithCompletion:");
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
-             completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
+             completionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSpecificWithParams:completion:");
 - (void)testSpecificWithCompletionHandler:
-    (void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completionHandler
+    (void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSpecificWithCompletion:");
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                    completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithParams:completion:");
 - (void)testUnknownCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithCompletion:");
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
-                 completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testAddArgumentsWithParams:completion:");
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
-                          completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
+                          completionHandler:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSimpleArgumentRequestWithParams:completion:");
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                completionHandler:
-                                   (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                   (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testStructArrayArgumentRequestWithParams:completion:");
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
-                          completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
+                          completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testStructArgumentRequestWithParams:completion:");
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
-                                completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
+                                completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNestedStructArgumentRequestWithParams:completion:");
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
-                              completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
+                              completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListStructArgumentRequestWithParams:completion:");
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
-                             completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
+                             completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListInt8UArgumentRequestWithParams:completion:");
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
-                                    completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
+                                    completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNestedStructListArgumentRequestWithParams:completion:");
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
-                                        completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
+                                        completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListNestedStructListArgumentRequestWithParams:completion:");
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
-                            completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListInt8UReverseRequestWithParams:completion:");
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
-                 completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testEnumsRequestWithParams:completion:");
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
-                            completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNullableOptionalRequestWithParams:completion:");
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                    completionHandler:
-                                       (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                       (void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                            NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testComplexNullableOptionalRequestWithParams:completion:");
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
-                        completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
+                        completionHandler:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use simpleStructEchoRequestWithParams:completion:");
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                    completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithParams:completion:");
 - (void)timedInvokeRequestWithCompletionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithCompletion:");
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                   completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSimpleOptionalArgumentRequestWithParams:completion:");
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
-                         completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
+                         completionHandler:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testEmitTestEventRequestWithParams:completion:");
-- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                      completionHandler:
                                          (void (^)(
-                                             MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                             MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                              NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testEmitTestFabricScopedEventRequestWithParams:completion:");
 
@@ -41596,12 +41596,12 @@
     MTR_NEWLY_DEPRECATED("Please use readAttributeEnumAttrWithAttributeCache:endpoint:queue:completion:");
 
 - (void)readAttributeStructAttrWithCompletionHandler:
-    (void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler
+    (void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use readAttributeStructAttrWithCompletion:");
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                         completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use writeAttributeStructAttrWithValue:completion:");
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                                    params:(MTRWriteParams * _Nullable)params
                         completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use writeAttributeStructAttrWithValue:params:completion:");
@@ -41609,13 +41609,13 @@
                                         maxInterval:(NSNumber * _Nonnull)maxInterval
                                              params:(MTRSubscribeParams * _Nullable)params
                             subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
-                                      reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                      reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                         NSError * _Nullable error))reportHandler
     MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStructAttrWithParams:subscriptionEstablished:");
 + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                          endpoint:(NSNumber *)endpoint
                                             queue:(dispatch_queue_t)queue
-                                completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                completionHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                       NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use readAttributeStructAttrWithAttributeCache:endpoint:queue:completion:");
 
@@ -42543,12 +42543,12 @@
     MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnumAttrWithAttributeCache:endpoint:queue:completion:");
 
 - (void)readAttributeNullableStructWithCompletionHandler:
-    (void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler
+    (void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use readAttributeNullableStructWithCompletion:");
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                             completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableStructWithValue:completion:");
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                                        params:(MTRWriteParams * _Nullable)params
                             completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableStructWithValue:params:completion:");
@@ -42556,13 +42556,13 @@
                                             maxInterval:(NSNumber * _Nonnull)maxInterval
                                                  params:(MTRSubscribeParams * _Nullable)params
                                 subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
-                                          reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                          reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                             NSError * _Nullable error))reportHandler
     MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableStructWithParams:subscriptionEstablished:");
 + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                              endpoint:(NSNumber *)endpoint
                                                 queue:(dispatch_queue_t)queue
-                                    completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                    completionHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                           NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use readAttributeNullableStructWithAttributeCache:endpoint:queue:completion:");
 
@@ -42668,32 +42668,27 @@
 
 - (void)readAttributeWriteOnlyInt8uWithCompletionHandler:
     (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
-        MTR_NEWLY_DEPRECATED("Please use readAttributeWriteOnlyInt8uWithCompletion:");
+    MTR_NEWLY_DEPRECATED("Please use readAttributeWriteOnlyInt8uWithCompletion:");
 - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value
                             completionHandler:(MTRStatusCompletion)completionHandler
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
-        MTR_NEWLY_DEPRECATED("Please use writeAttributeWriteOnlyInt8uWithValue:completion:");
+    MTR_NEWLY_DEPRECATED("Please use writeAttributeWriteOnlyInt8uWithValue:completion:");
 - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value
                                        params:(MTRWriteParams * _Nullable)params
                             completionHandler:(MTRStatusCompletion)completionHandler
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
-        MTR_NEWLY_DEPRECATED("Please use writeAttributeWriteOnlyInt8uWithValue:params:completion:");
+    MTR_NEWLY_DEPRECATED("Please use writeAttributeWriteOnlyInt8uWithValue:params:completion:");
 - (void)subscribeAttributeWriteOnlyInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval
                                             maxInterval:(NSNumber * _Nonnull)maxInterval
                                                  params:(MTRSubscribeParams * _Nullable)params
                                 subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
                                           reportHandler:
                                               (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
-        MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWriteOnlyInt8uWithParams:subscriptionEstablished:");
+    MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWriteOnlyInt8uWithParams:subscriptionEstablished:");
 + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                              endpoint:(NSNumber *)endpoint
                                                 queue:(dispatch_queue_t)queue
                                     completionHandler:
                                         (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
-        MTR_NEWLY_DEPRECATED("Please use readAttributeWriteOnlyInt8uWithAttributeCache:endpoint:queue:completion:");
+    MTR_NEWLY_DEPRECATED("Please use readAttributeWriteOnlyInt8uWithAttributeCache:endpoint:queue:completion:");
 
 - (void)readAttributeGeneratedCommandListWithCompletionHandler:
     (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index ba602ab..4037618 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -121187,7 +121187,7 @@
 
 @end
 
-@implementation MTRBaseClusterTestCluster
+@implementation MTRBaseClusterUnitTesting
 
 - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue
 {
@@ -121206,7 +121206,7 @@
 {
     [self testWithParams:nil completion:completion];
 }
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
@@ -121219,14 +121219,14 @@
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::Test::Type request;
+            UnitTesting::Commands::Test::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -121236,7 +121236,7 @@
 {
     [self testNotHandledWithParams:nil completion:completion];
 }
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                       completion:(MTRStatusCompletion)completion
 {
     // Make a copy of params before we go async.
@@ -121250,44 +121250,44 @@
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestNotHandled::Type request;
+            UnitTesting::Commands::TestNotHandled::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testSpecificWithCompletion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithCompletion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion
 {
     [self testSpecificWithParams:nil completion:completion];
 }
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
-                    completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
+                    completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestSpecificResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestSpecific::Type request;
+            UnitTesting::Commands::TestSpecific::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -121297,7 +121297,7 @@
 {
     [self testUnknownCommandWithParams:nil completion:completion];
 }
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                           completion:(MTRStatusCompletion)completion
 {
     // Make a copy of params before we go async.
@@ -121311,32 +121311,32 @@
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestUnknownCommand::Type request;
+            UnitTesting::Commands::TestUnknownCommand::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
-                        completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
+                        completion:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestAddArguments::Type request;
+            UnitTesting::Commands::TestAddArguments::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121345,25 +121345,25 @@
             request.arg1 = params.arg1.unsignedCharValue;
             request.arg2 = params.arg2.unsignedCharValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
-                                 completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
+                                 completion:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestSimpleArgumentRequest::Type request;
+            UnitTesting::Commands::TestSimpleArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121371,26 +121371,26 @@
             }
             request.arg1 = params.arg1.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                       completion:
-                                          (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                          (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestStructArrayArgumentRequest::Type request;
+            UnitTesting::Commands::TestStructArrayArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121406,11 +121406,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) {
-                        if (![params.arg1[i_0] isKindOfClass:[MTRTestClusterClusterNestedStructList class]]) {
+                        if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterNestedStructList *) params.arg1[i_0];
+                        auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0];
                         listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                         listHolder_0->mList[i_0].b = element_0.b.boolValue;
                         listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue;
@@ -121433,11 +121433,11 @@
                                 }
                                 listFreer.add(listHolder_2);
                                 for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) {
-                                    if (![element_0.d[i_2] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                                    if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                         // Wrong kind of value.
                                         return CHIP_ERROR_INVALID_ARGUMENT;
                                     }
-                                    auto element_2 = (MTRTestClusterClusterSimpleStruct *) element_0.d[i_2];
+                                    auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2];
                                     listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue;
                                     listHolder_2->mList[i_2].b = element_2.b.boolValue;
                                     listHolder_2->mList[i_2].c
@@ -121538,11 +121538,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < params.arg2.count; ++i_0) {
-                        if (![params.arg2[i_0] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                        if (![params.arg2[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterSimpleStruct *) params.arg2[i_0];
+                        auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg2[i_0];
                         listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                         listHolder_0->mList[i_0].b = element_0.b.boolValue;
                         listHolder_0->mList[i_0].c = static_cast<std::remove_reference_t<decltype(listHolder_0->mList[i_0].c)>>(
@@ -121607,24 +121607,24 @@
             request.arg5 = static_cast<std::remove_reference_t<decltype(request.arg5)>>(params.arg5.unsignedCharValue);
             request.arg6 = params.arg6.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
-                                 completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
+                                 completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterBooleanResponseCallbackType successCb,
+    auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestStructArgumentRequest::Type request;
+            UnitTesting::Commands::TestStructArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121639,24 +121639,24 @@
             request.arg1.g = params.arg1.g.floatValue;
             request.arg1.h = params.arg1.h.doubleValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
-                                       completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
+                                       completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterBooleanResponseCallbackType successCb,
+    auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestNestedStructArgumentRequest::Type request;
+            UnitTesting::Commands::TestNestedStructArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121673,24 +121673,24 @@
             request.arg1.c.g = params.arg1.c.g.floatValue;
             request.arg1.c.h = params.arg1.c.h.doubleValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
-                                     completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
+                                     completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterBooleanResponseCallbackType successCb,
+    auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestListStructArgumentRequest::Type request;
+            UnitTesting::Commands::TestListStructArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121706,11 +121706,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) {
-                        if (![params.arg1[i_0] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                        if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterSimpleStruct *) params.arg1[i_0];
+                        auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg1[i_0];
                         listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                         listHolder_0->mList[i_0].b = element_0.b.boolValue;
                         listHolder_0->mList[i_0].c = static_cast<std::remove_reference_t<decltype(listHolder_0->mList[i_0].c)>>(
@@ -121728,24 +121728,24 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
-                                    completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
+                                    completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterBooleanResponseCallbackType successCb,
+    auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestListInt8UArgumentRequest::Type request;
+            UnitTesting::Commands::TestListInt8UArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121774,24 +121774,24 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
-                                           completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
+                                           completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterBooleanResponseCallbackType successCb,
+    auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestNestedStructListArgumentRequest::Type request;
+            UnitTesting::Commands::TestNestedStructListArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121817,11 +121817,11 @@
                     }
                     listFreer.add(listHolder_1);
                     for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) {
-                        if (![params.arg1.d[i_1] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                        if (![params.arg1.d[i_1] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_1 = (MTRTestClusterClusterSimpleStruct *) params.arg1.d[i_1];
+                        auto element_1 = (MTRUnitTestingClusterSimpleStruct *) params.arg1.d[i_1];
                         listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue;
                         listHolder_1->mList[i_1].b = element_1.b.boolValue;
                         listHolder_1->mList[i_1].c = static_cast<std::remove_reference_t<decltype(listHolder_1->mList[i_1].c)>>(
@@ -121905,25 +121905,25 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
-                                               completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
+                                               completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterBooleanResponseCallbackType successCb,
+    auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterBooleanResponseCallbackType successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request;
+            UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -121939,11 +121939,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) {
-                        if (![params.arg1[i_0] isKindOfClass:[MTRTestClusterClusterNestedStructList class]]) {
+                        if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterNestedStructList *) params.arg1[i_0];
+                        auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0];
                         listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                         listHolder_0->mList[i_0].b = element_0.b.boolValue;
                         listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue;
@@ -121966,11 +121966,11 @@
                                 }
                                 listFreer.add(listHolder_2);
                                 for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) {
-                                    if (![element_0.d[i_2] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                                    if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                         // Wrong kind of value.
                                         return CHIP_ERROR_INVALID_ARGUMENT;
                                     }
-                                    auto element_2 = (MTRTestClusterClusterSimpleStruct *) element_0.d[i_2];
+                                    auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2];
                                     listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue;
                                     listHolder_2->mList[i_2].b = element_2.b.boolValue;
                                     listHolder_2->mList[i_2].c
@@ -122062,25 +122062,25 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
-                                   completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
+                                   completion:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestListInt8UReverseRequest::Type request;
+            UnitTesting::Commands::TestListInt8UReverseRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122109,24 +122109,24 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
-                        completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
+                        completion:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestEnumsResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
+            UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestEnumsRequest::Type request;
+            UnitTesting::Commands::TestEnumsRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122135,25 +122135,25 @@
             request.arg1 = static_cast<std::remove_reference_t<decltype(request.arg1)>>(params.arg1.unsignedShortValue);
             request.arg2 = static_cast<std::remove_reference_t<decltype(request.arg2)>>(params.arg2.unsignedCharValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
-                                   completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
+                                   completion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestNullableOptionalRequest::Type request;
+            UnitTesting::Commands::TestNullableOptionalRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122171,27 +122171,27 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                           completion:
                                               (void (^)(
-                                                  MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                                  MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestComplexNullableOptionalRequest::Type request;
+            UnitTesting::Commands::TestComplexNullableOptionalRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122367,25 +122367,25 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
-                               completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
+                               completion:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterSimpleStructResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::SimpleStructEchoRequest::Type request;
+            UnitTesting::Commands::SimpleStructEchoRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122400,7 +122400,7 @@
             request.arg1.g = params.arg1.g.floatValue;
             request.arg1.h = params.arg1.h.doubleValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122410,7 +122410,7 @@
 {
     [self timedInvokeRequestWithParams:nil completion:completion];
 }
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                           completion:(MTRStatusCompletion)completion
 {
     // Make a copy of params before we go async.
@@ -122424,7 +122424,7 @@
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TimedInvokeRequest::Type request;
+            UnitTesting::Commands::TimedInvokeRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122434,13 +122434,13 @@
                 timedInvokeTimeoutMs.SetValue(10000);
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                          completion:(MTRStatusCompletion)completion
 {
     // Make a copy of params before we go async.
@@ -122454,7 +122454,7 @@
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request;
+            UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122467,25 +122467,25 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
-                                completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
+                                completion:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestEmitTestEventRequest::Type request;
+            UnitTesting::Commands::TestEmitTestEventRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122495,28 +122495,28 @@
             request.arg2 = static_cast<std::remove_reference_t<decltype(request.arg2)>>(params.arg2.unsignedCharValue);
             request.arg3 = params.arg3.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
 - (void)
-    testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+    testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                         completion:
                                             (void (^)(
-                                                MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                                MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb,
+            UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             chip::Optional<uint16_t> timedInvokeTimeoutMs;
             ListFreer listFreer;
-            TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type request;
+            UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type request;
             if (params != nil) {
                 if (params.timedInvokeTimeoutMs != nil) {
                     timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue);
@@ -122524,7 +122524,7 @@
             }
             request.arg1 = params.arg1.unsignedCharValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122535,8 +122535,8 @@
     auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122569,11 +122569,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122594,9 +122594,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -122621,7 +122621,7 @@
     std::move(*bridge).DispatchLocalAction(^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -122638,11 +122638,11 @@
 
 - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap8AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingBitmap8AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap8AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122675,11 +122675,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = static_cast<std::remove_reference_t<decltype(cppValue)>>(value.unsignedCharValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122691,21 +122691,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap8AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap8AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
+                MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
                 !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
                 // Now that we kicked off the subscribe, flag our callback bridge
@@ -122723,11 +122723,11 @@
                                          queue:(dispatch_queue_t)queue
                                     completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterBitmap8AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingBitmap8AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingBitmap8AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -122744,11 +122744,11 @@
 
 - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap16AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingBitmap16AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap16AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122781,11 +122781,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = static_cast<std::remove_reference_t<decltype(cppValue)>>(value.unsignedShortValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122797,21 +122797,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap16AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap16AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
+                MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
                 !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
                 // Now that we kicked off the subscribe, flag our callback bridge
@@ -122829,11 +122829,11 @@
                                           queue:(dispatch_queue_t)queue
                                      completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterBitmap16AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingBitmap16AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingBitmap16AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -122850,11 +122850,11 @@
 
 - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap32AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingBitmap32AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap32AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122887,11 +122887,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = static_cast<std::remove_reference_t<decltype(cppValue)>>(value.unsignedIntValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122903,21 +122903,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap32AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap32AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
+                MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
                 !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
                 // Now that we kicked off the subscribe, flag our callback bridge
@@ -122935,11 +122935,11 @@
                                           queue:(dispatch_queue_t)queue
                                      completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterBitmap32AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingBitmap32AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingBitmap32AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -122956,11 +122956,11 @@
 
 - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap64AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingBitmap64AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap64AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -122993,11 +122993,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = static_cast<std::remove_reference_t<decltype(cppValue)>>(value.unsignedLongLongValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123009,21 +123009,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap64AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap64AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
+                MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
                 !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
                 // Now that we kicked off the subscribe, flag our callback bridge
@@ -123041,11 +123041,11 @@
                                           queue:(dispatch_queue_t)queue
                                      completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterBitmap64AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingBitmap64AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingBitmap64AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123065,8 +123065,8 @@
     auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123099,11 +123099,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedCharValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123124,9 +123124,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123151,7 +123151,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123171,8 +123171,8 @@
     auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123205,11 +123205,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedShortValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123230,9 +123230,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123257,7 +123257,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123277,8 +123277,8 @@
     auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123311,11 +123311,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedIntValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123336,9 +123336,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123363,7 +123363,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123383,8 +123383,8 @@
     auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123417,11 +123417,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedIntValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123442,9 +123442,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123469,7 +123469,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123489,8 +123489,8 @@
     auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123523,11 +123523,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedLongLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123548,9 +123548,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123575,7 +123575,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123595,8 +123595,8 @@
     auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123629,11 +123629,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedLongLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123654,9 +123654,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123681,7 +123681,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123701,8 +123701,8 @@
     auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123735,11 +123735,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedLongLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123760,9 +123760,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123787,7 +123787,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123807,8 +123807,8 @@
     auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123841,11 +123841,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedLongLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123866,9 +123866,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123893,7 +123893,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -123913,8 +123913,8 @@
     auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123947,11 +123947,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.charValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -123972,9 +123972,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -123999,7 +123999,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124019,8 +124019,8 @@
     auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124053,11 +124053,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.shortValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124078,9 +124078,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124105,7 +124105,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124125,8 +124125,8 @@
     auto * bridge = new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124159,11 +124159,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.intValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124184,9 +124184,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124211,7 +124211,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int32sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124231,8 +124231,8 @@
     auto * bridge = new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124265,11 +124265,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.intValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124290,9 +124290,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124317,7 +124317,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int32sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124337,8 +124337,8 @@
     auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124371,11 +124371,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.longLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124396,9 +124396,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124423,7 +124423,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124443,8 +124443,8 @@
     auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124477,11 +124477,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.longLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124502,9 +124502,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124529,7 +124529,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124549,8 +124549,8 @@
     auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124583,11 +124583,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.longLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124608,9 +124608,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124635,7 +124635,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124655,8 +124655,8 @@
     auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124689,11 +124689,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.longLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124714,9 +124714,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124741,7 +124741,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124761,8 +124761,8 @@
     auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124795,11 +124795,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedCharValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124820,9 +124820,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124847,7 +124847,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124867,8 +124867,8 @@
     auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124901,11 +124901,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedShortValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -124926,9 +124926,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -124953,7 +124953,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -124973,8 +124973,8 @@
     auto * bridge = new MTRFloatAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, FloatAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125007,11 +125007,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.floatValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125032,9 +125032,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -125059,7 +125059,7 @@
     std::move(*bridge).DispatchLocalAction(^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125079,8 +125079,8 @@
     auto * bridge = new MTRDoubleAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoubleAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125113,11 +125113,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.doubleValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125138,9 +125138,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -125165,7 +125165,7 @@
     std::move(*bridge).DispatchLocalAction(^(DoubleAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125185,8 +125185,8 @@
     auto * bridge = new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, OctetStringAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125219,11 +125219,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = [self asByteSpan:value];
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125244,9 +125244,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -125271,7 +125271,7 @@
     std::move(*bridge).DispatchLocalAction(^(OctetStringAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125288,11 +125288,11 @@
 
 - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListInt8uListAttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterListInt8uListAttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingListInt8uListAttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingListInt8uListAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125325,7 +125325,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo;
             TypeInfo::Type cppValue;
             {
                 using ListType_0 = std::remove_reference_t<decltype(cppValue)>;
@@ -125350,7 +125350,7 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125362,21 +125362,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterListInt8uListAttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingListInt8uListAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -125395,11 +125395,11 @@
                                            queue:(dispatch_queue_t)queue
                                       completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterListInt8uListAttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingListInt8uListAttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingListInt8uListAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125416,11 +125416,11 @@
 
 - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListOctetStringListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingListOctetStringListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            UnitTestingListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
+            using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125453,7 +125453,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo;
             TypeInfo::Type cppValue;
             {
                 using ListType_0 = std::remove_reference_t<decltype(cppValue)>;
@@ -125478,7 +125478,7 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125490,21 +125490,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge *>(bridge);
+            UnitTestingListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
+            auto * typedBridge = static_cast<MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -125523,12 +125523,12 @@
                                                  queue:(dispatch_queue_t)queue
                                             completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingListOctetStringListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125545,12 +125545,12 @@
 
 - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125583,7 +125583,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo;
             TypeInfo::Type cppValue;
             {
                 using ListType_0 = std::remove_reference_t<decltype(cppValue)>;
@@ -125595,11 +125595,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < value.count; ++i_0) {
-                        if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestListStructOctet class]]) {
+                        if (![value[i_0] isKindOfClass:[MTRUnitTestingClusterTestListStructOctet class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterTestListStructOctet *) value[i_0];
+                        auto element_0 = (MTRUnitTestingClusterTestListStructOctet *) value[i_0];
                         listHolder_0->mList[i_0].member1 = element_0.member1.unsignedLongLongValue;
                         listHolder_0->mList[i_0].member2 = [self asByteSpan:element_0.member2];
                     }
@@ -125609,7 +125609,7 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125622,22 +125622,22 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -125657,12 +125657,12 @@
                                                   completion:
                                                       (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125682,8 +125682,8 @@
     auto * bridge = new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, OctetStringAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125716,11 +125716,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = [self asByteSpan:value];
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125741,9 +125741,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -125768,7 +125768,7 @@
     std::move(*bridge).DispatchLocalAction(^(OctetStringAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125788,8 +125788,8 @@
     auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::CharString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125822,11 +125822,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::CharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = [self asCharSpan:value];
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125847,9 +125847,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::CharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -125874,7 +125874,7 @@
     std::move(*bridge).DispatchLocalAction(^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::CharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -125894,8 +125894,8 @@
     auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125928,11 +125928,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = [self asCharSpan:value];
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -125953,9 +125953,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -125980,7 +125980,7 @@
     std::move(*bridge).DispatchLocalAction(^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126000,8 +126000,8 @@
     auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126034,11 +126034,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedLongLongValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126059,9 +126059,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -126086,7 +126086,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126106,8 +126106,8 @@
     auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126140,11 +126140,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedIntValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126165,9 +126165,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -126192,7 +126192,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126212,8 +126212,8 @@
     auto * bridge = new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126246,11 +126246,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = static_cast<std::remove_reference_t<decltype(cppValue)>>(value.unsignedShortValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126271,9 +126271,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -126298,7 +126298,7 @@
     std::move(*bridge).DispatchLocalAction(^(VendorIdAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126316,12 +126316,12 @@
 - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value,
                                                                        NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126354,7 +126354,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
             TypeInfo::Type cppValue;
             {
                 using ListType_0 = std::remove_reference_t<decltype(cppValue)>;
@@ -126366,11 +126366,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < value.count; ++i_0) {
-                        if (![value[i_0] isKindOfClass:[MTRTestClusterClusterNullablesAndOptionalsStruct class]]) {
+                        if (![value[i_0] isKindOfClass:[MTRUnitTestingClusterNullablesAndOptionalsStruct class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterNullablesAndOptionalsStruct *) value[i_0];
+                        auto element_0 = (MTRUnitTestingClusterNullablesAndOptionalsStruct *) value[i_0];
                         if (element_0.nullableInt == nil) {
                             listHolder_0->mList[i_0].nullableInt.SetNull();
                         } else {
@@ -126551,7 +126551,7 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126565,23 +126565,23 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
             auto * typedBridge
-                = static_cast<MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge *>(bridge);
+                = static_cast<MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished,
+                MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished,
                 nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -126601,12 +126601,12 @@
                                                             completion:(void (^)(NSArray * _Nullable value,
                                                                            NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126623,11 +126623,11 @@
 
 - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterSimpleEnumAttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterSimpleEnumAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126660,11 +126660,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = static_cast<std::remove_reference_t<decltype(cppValue)>>(value.unsignedCharValue);
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126676,21 +126676,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterSimpleEnumAttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterSimpleEnumAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -126709,11 +126709,11 @@
                                           queue:(dispatch_queue_t)queue
                                      completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126728,25 +126728,25 @@
     });
 }
 
-- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                   NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterStructAttrStructAttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterStructAttrStructAttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingStructAttrStructAttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingStructAttrStructAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                                completion:(MTRStatusCompletion)completion
 {
-    [self writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull) value params:nil completion:completion];
+    [self writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull) value params:nil completion:completion];
 }
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                                    params:(MTRWriteParams * _Nullable)params
                                completion:(MTRStatusCompletion)completion
 {
@@ -126769,7 +126769,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue.a = value.a.unsignedCharValue;
             cppValue.b = value.b.boolValue;
@@ -126780,7 +126780,7 @@
             cppValue.g = value.g.floatValue;
             cppValue.h = value.h.doubleValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126788,26 +126788,26 @@
 
 - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)params
                        subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
-                                 reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                 reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                    NSError * _Nullable error))reportHandler
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterStructAttrStructAttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingStructAttrStructAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -126824,14 +126824,14 @@
 + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                          endpoint:(NSNumber *)endpoint
                                             queue:(dispatch_queue_t)queue
-                                       completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                       completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                       NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterStructAttrStructAttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingStructAttrStructAttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingStructAttrStructAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126851,8 +126851,8 @@
     auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126885,11 +126885,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedCharValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126911,9 +126911,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -126939,7 +126939,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -126959,8 +126959,8 @@
     auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -126993,11 +126993,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.charValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127019,9 +127019,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -127047,7 +127047,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127067,8 +127067,8 @@
     auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127101,11 +127101,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedShortValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127127,9 +127127,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -127155,7 +127155,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127175,8 +127175,8 @@
     auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127209,11 +127209,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.shortValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127235,9 +127235,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -127263,7 +127263,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127280,12 +127280,12 @@
 
 - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127318,7 +127318,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo;
             TypeInfo::Type cppValue;
             {
                 using ListType_0 = std::remove_reference_t<decltype(cppValue)>;
@@ -127343,7 +127343,7 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127356,22 +127356,22 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -127391,12 +127391,12 @@
                                                 completion:
                                                     (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127415,12 +127415,12 @@
                                      completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 { // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListFabricScopedListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingListFabricScopedListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb, params.filterByFabric);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127453,7 +127453,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo;
             TypeInfo::Type cppValue;
             {
                 using ListType_0 = std::remove_reference_t<decltype(cppValue)>;
@@ -127465,11 +127465,11 @@
                     }
                     listFreer.add(listHolder_0);
                     for (size_t i_0 = 0; i_0 < value.count; ++i_0) {
-                        if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestFabricScoped class]]) {
+                        if (![value[i_0] isKindOfClass:[MTRUnitTestingClusterTestFabricScoped class]]) {
                             // Wrong kind of value.
                             return CHIP_ERROR_INVALID_ARGUMENT;
                         }
-                        auto element_0 = (MTRTestClusterClusterTestFabricScoped *) value[i_0];
+                        auto element_0 = (MTRUnitTestingClusterTestFabricScoped *) value[i_0];
                         listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue;
                         if (element_0.optionalFabricSensitiveInt8u != nil) {
                             auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace();
@@ -127534,7 +127534,7 @@
                 }
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127546,22 +127546,22 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -127580,12 +127580,12 @@
                                                   queue:(dispatch_queue_t)queue
                                              completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingListFabricScopedListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127605,8 +127605,8 @@
     auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127639,11 +127639,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127664,9 +127664,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -127691,7 +127691,7 @@
     std::move(*bridge).DispatchLocalAction(^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127711,8 +127711,8 @@
     auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127745,11 +127745,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127771,9 +127771,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -127799,7 +127799,7 @@
     std::move(*bridge).DispatchLocalAction(^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127819,8 +127819,8 @@
     auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127853,11 +127853,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127879,9 +127879,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -127907,7 +127907,7 @@
     std::move(*bridge).DispatchLocalAction(^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -127927,8 +127927,8 @@
     auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127961,11 +127961,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.boolValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -127986,9 +127986,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -128013,7 +128013,7 @@
     std::move(*bridge).DispatchLocalAction(^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128033,8 +128033,8 @@
     auto * bridge = new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128067,7 +128067,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128076,7 +128076,7 @@
                 nonNullValue_0 = value.boolValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128097,9 +128097,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -128124,7 +128124,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableBooleanAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128141,11 +128141,11 @@
 
 - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap8AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap8AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingNullableBitmap8AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap8AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128178,7 +128178,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128187,7 +128187,7 @@
                 nonNullValue_0 = static_cast<std::remove_reference_t<decltype(nonNullValue_0)>>(value.unsignedCharValue);
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128199,21 +128199,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap8AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap8AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -128232,11 +128232,11 @@
                                                  queue:(dispatch_queue_t)queue
                                             completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterNullableBitmap8AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingNullableBitmap8AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingNullableBitmap8AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128253,11 +128253,11 @@
 
 - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap16AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap16AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingNullableBitmap16AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap16AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128290,7 +128290,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128299,7 +128299,7 @@
                 nonNullValue_0 = static_cast<std::remove_reference_t<decltype(nonNullValue_0)>>(value.unsignedShortValue);
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128311,21 +128311,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap16AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap16AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -128344,11 +128344,11 @@
                                                   queue:(dispatch_queue_t)queue
                                              completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterNullableBitmap16AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingNullableBitmap16AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingNullableBitmap16AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128365,11 +128365,11 @@
 
 - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap32AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap32AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingNullableBitmap32AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap32AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128402,7 +128402,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128411,7 +128411,7 @@
                 nonNullValue_0 = static_cast<std::remove_reference_t<decltype(nonNullValue_0)>>(value.unsignedIntValue);
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128423,21 +128423,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap32AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap32AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -128456,11 +128456,11 @@
                                                   queue:(dispatch_queue_t)queue
                                              completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterNullableBitmap32AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingNullableBitmap32AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingNullableBitmap32AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128477,11 +128477,11 @@
 
 - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap64AttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap64AttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingNullableBitmap64AttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap64AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128514,7 +128514,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128523,7 +128523,7 @@
                 nonNullValue_0 = static_cast<std::remove_reference_t<decltype(nonNullValue_0)>>(value.unsignedLongLongValue);
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128535,21 +128535,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap64AttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap64AttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -128568,11 +128568,11 @@
                                                   queue:(dispatch_queue_t)queue
                                              completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterNullableBitmap64AttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingNullableBitmap64AttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingNullableBitmap64AttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128592,8 +128592,8 @@
     auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128626,7 +128626,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128635,7 +128635,7 @@
                 nonNullValue_0 = value.unsignedCharValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128656,9 +128656,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -128683,7 +128683,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128703,8 +128703,8 @@
     auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128737,7 +128737,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128746,7 +128746,7 @@
                 nonNullValue_0 = value.unsignedShortValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128767,9 +128767,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -128794,7 +128794,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128814,8 +128814,8 @@
     auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128848,7 +128848,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128857,7 +128857,7 @@
                 nonNullValue_0 = value.unsignedIntValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128878,9 +128878,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -128905,7 +128905,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -128925,8 +128925,8 @@
     auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128959,7 +128959,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -128968,7 +128968,7 @@
                 nonNullValue_0 = value.unsignedIntValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -128989,9 +128989,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129016,7 +129016,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129036,8 +129036,8 @@
     auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129070,7 +129070,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129079,7 +129079,7 @@
                 nonNullValue_0 = value.unsignedLongLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129100,9 +129100,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129127,7 +129127,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129147,8 +129147,8 @@
     auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129181,7 +129181,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129190,7 +129190,7 @@
                 nonNullValue_0 = value.unsignedLongLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129211,9 +129211,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129238,7 +129238,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129258,8 +129258,8 @@
     auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129292,7 +129292,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129301,7 +129301,7 @@
                 nonNullValue_0 = value.unsignedLongLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129322,9 +129322,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129349,7 +129349,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129369,8 +129369,8 @@
     auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129403,7 +129403,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129412,7 +129412,7 @@
                 nonNullValue_0 = value.unsignedLongLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129433,9 +129433,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129460,7 +129460,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129480,8 +129480,8 @@
     auto * bridge = new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129514,7 +129514,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129523,7 +129523,7 @@
                 nonNullValue_0 = value.charValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129544,9 +129544,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129571,7 +129571,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt8sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129591,8 +129591,8 @@
     auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129625,7 +129625,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129634,7 +129634,7 @@
                 nonNullValue_0 = value.shortValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129655,9 +129655,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129682,7 +129682,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129702,8 +129702,8 @@
     auto * bridge = new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129736,7 +129736,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129745,7 +129745,7 @@
                 nonNullValue_0 = value.intValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129766,9 +129766,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129793,7 +129793,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt32sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129813,8 +129813,8 @@
     auto * bridge = new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129847,7 +129847,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129856,7 +129856,7 @@
                 nonNullValue_0 = value.intValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129877,9 +129877,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -129904,7 +129904,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt32sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -129924,8 +129924,8 @@
     auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129958,7 +129958,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -129967,7 +129967,7 @@
                 nonNullValue_0 = value.longLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -129988,9 +129988,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130015,7 +130015,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130035,8 +130035,8 @@
     auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130069,7 +130069,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130078,7 +130078,7 @@
                 nonNullValue_0 = value.longLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130099,9 +130099,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130126,7 +130126,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130146,8 +130146,8 @@
     auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130180,7 +130180,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130189,7 +130189,7 @@
                 nonNullValue_0 = value.longLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130210,9 +130210,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130237,7 +130237,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130257,8 +130257,8 @@
     auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130291,7 +130291,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130300,7 +130300,7 @@
                 nonNullValue_0 = value.longLongValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130321,9 +130321,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130348,7 +130348,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt64sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130368,8 +130368,8 @@
     auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130402,7 +130402,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130411,7 +130411,7 @@
                 nonNullValue_0 = value.unsignedCharValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130432,9 +130432,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130459,7 +130459,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130479,8 +130479,8 @@
     auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130513,7 +130513,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130522,7 +130522,7 @@
                 nonNullValue_0 = value.unsignedShortValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130543,9 +130543,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130570,7 +130570,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130590,8 +130590,8 @@
     auto * bridge = new MTRNullableFloatAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableFloatAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130624,7 +130624,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130633,7 +130633,7 @@
                 nonNullValue_0 = value.floatValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130655,9 +130655,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130683,7 +130683,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130703,8 +130703,8 @@
     auto * bridge = new MTRNullableDoubleAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableDoubleAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130737,7 +130737,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130746,7 +130746,7 @@
                 nonNullValue_0 = value.doubleValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130768,9 +130768,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130796,7 +130796,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableDoubleAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130816,8 +130816,8 @@
     auto * bridge = new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130850,7 +130850,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130859,7 +130859,7 @@
                 nonNullValue_0 = [self asByteSpan:value];
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130880,9 +130880,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -130907,7 +130907,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableOctetStringAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -130927,8 +130927,8 @@
     auto * bridge = new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableCharStringAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130961,7 +130961,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -130970,7 +130970,7 @@
                 nonNullValue_0 = [self asCharSpan:value];
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -130992,9 +130992,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -131020,7 +131020,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableCharStringAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131037,12 +131037,12 @@
 
 - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            NullableTestClusterClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb,
+            NullableUnitTestingClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131075,7 +131075,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -131084,7 +131084,7 @@
                 nonNullValue_0 = static_cast<std::remove_reference_t<decltype(nonNullValue_0)>>(value.unsignedCharValue);
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131096,22 +131096,22 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            NullableTestClusterClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb,
+            NullableUnitTestingClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -131130,12 +131130,12 @@
                                                   queue:(dispatch_queue_t)queue
                                              completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(NullableTestClusterClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(NullableUnitTestingClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131150,28 +131150,28 @@
         });
 }
 
-- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                       NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableStructStructAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingNullableStructStructAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
 }
 
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                                    completion:(MTRStatusCompletion)completion
 {
-    [self writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable) value
+    [self writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable) value
                                          params:nil
                                      completion:completion];
 }
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                                        params:(MTRWriteParams * _Nullable)params
                                    completion:(MTRStatusCompletion)completion
 {
@@ -131194,7 +131194,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -131210,7 +131210,7 @@
                 nonNullValue_0.h = value.h.doubleValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131218,27 +131218,27 @@
 
 - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnull)params
                            subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
-                                     reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                     reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                        NSError * _Nullable error))reportHandler
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -131255,15 +131255,15 @@
 + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                              endpoint:(NSNumber *)endpoint
                                                 queue:(dispatch_queue_t)queue
-                                           completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                           completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                           NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingNullableStructStructAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131284,8 +131284,8 @@
     auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131318,7 +131318,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -131327,7 +131327,7 @@
                 nonNullValue_0 = value.unsignedCharValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131350,9 +131350,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -131378,7 +131378,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131399,8 +131399,8 @@
     auto * bridge = new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131433,7 +131433,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -131442,7 +131442,7 @@
                 nonNullValue_0 = value.charValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131465,9 +131465,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -131493,7 +131493,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt8sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131514,8 +131514,8 @@
     auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131548,7 +131548,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -131557,7 +131557,7 @@
                 nonNullValue_0 = value.unsignedShortValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131580,9 +131580,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -131608,7 +131608,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131629,8 +131629,8 @@
     auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131663,7 +131663,7 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
             TypeInfo::Type cppValue;
             if (value == nil) {
                 cppValue.SetNull();
@@ -131672,7 +131672,7 @@
                 nonNullValue_0 = value.shortValue;
             }
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131695,9 +131695,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -131723,7 +131723,7 @@
     std::move(*bridge).DispatchLocalAction(^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131743,8 +131743,8 @@
     auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131777,11 +131777,11 @@
             }
 
             ListFreer listFreer;
-            using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo;
             TypeInfo::Type cppValue;
             cppValue = value.unsignedCharValue;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.WriteAttribute<TypeInfo>(cppValue, bridge, successCb, failureCb, timedWriteTimeout);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131802,9 +131802,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -131829,7 +131829,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131846,12 +131846,12 @@
 
 - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131864,22 +131864,22 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -131899,12 +131899,12 @@
                                                  completion:
                                                      (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131921,12 +131921,12 @@
 
 - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion,
+    auto * bridge = new MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -131939,22 +131939,22 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-            TestClusterAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
+            UnitTestingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb,
             MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -131974,12 +131974,12 @@
                                                 completion:
                                                     (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, completion);
+    auto * bridge = new MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(queue, completion);
     std::move(*bridge).DispatchLocalAction(
-        ^(TestClusterAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) {
+        ^(UnitTestingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) {
             if (attributeCacheContainer.cppAttributeCache) {
                 chip::app::ConcreteAttributePath path;
-                using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo;
+                using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo;
                 path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
                 path.mClusterId = TypeInfo::GetClusterId();
                 path.mAttributeId = TypeInfo::GetAttributeId();
@@ -131996,11 +131996,11 @@
 
 - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, completion,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterAttributeListListAttributeCallback successCb,
+    auto * bridge = new MTRUnitTestingAttributeListListAttributeCallbackBridge(self.callbackQueue, completion,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingAttributeListListAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -132012,21 +132012,21 @@
 {
     // Make a copy of params before we go async.
     params = [params copy];
-    auto * bridge = new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(
+    auto * bridge = new MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge(
         self.callbackQueue, reportHandler,
-        ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterAttributeListListAttributeCallback successCb,
+        ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingAttributeListListAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            auto * typedBridge = static_cast<MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge *>(bridge);
+            auto * typedBridge = static_cast<MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge *>(bridge);
             if (!params.resubscribeIfLost) {
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
-                MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+                MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
                 params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional,
                 [typedBridge](void) { typedBridge->OnDone(); });
             if (err == CHIP_NO_ERROR) {
@@ -132045,11 +132045,11 @@
                                                queue:(dispatch_queue_t)queue
                                           completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
 {
-    auto * bridge = new MTRTestClusterAttributeListListAttributeCallbackBridge(queue, completion);
-    std::move(*bridge).DispatchLocalAction(^(TestClusterAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) {
+    auto * bridge = new MTRUnitTestingAttributeListListAttributeCallbackBridge(queue, completion);
+    std::move(*bridge).DispatchLocalAction(^(UnitTestingAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -132069,8 +132069,8 @@
     auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -132091,9 +132091,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -132118,7 +132118,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -132138,8 +132138,8 @@
     auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion,
         ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb,
             MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
-            using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo;
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo;
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             return cppCluster.ReadAttribute<TypeInfo>(bridge, successCb, failureCb);
         });
     std::move(*bridge).DispatchAction(self.device);
@@ -132160,9 +132160,9 @@
                 // We don't support disabling auto-resubscribe.
                 return CHIP_ERROR_INVALID_ARGUMENT;
             }
-            using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo;
 
-            chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+            chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
             CHIP_ERROR err = cppCluster.SubscribeAttribute<TypeInfo>(bridge, successCb, failureCb,
                 [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue],
                 MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric,
@@ -132187,7 +132187,7 @@
     std::move(*bridge).DispatchLocalAction(^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) {
         if (attributeCacheContainer.cppAttributeCache) {
             chip::app::ConcreteAttributePath path;
-            using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo;
+            using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo;
             path.mEndpointId = static_cast<chip::EndpointId>([endpoint unsignedShortValue]);
             path.mClusterId = TypeInfo::GetClusterId();
             path.mAttributeId = TypeInfo::GetAttributeId();
@@ -132204,9 +132204,9 @@
 
 @end
 
-@implementation MTRBaseClusterTestCluster (Deprecated)
+@implementation MTRBaseClusterUnitTesting (Deprecated)
 
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self testWithParams:params completion:completionHandler];
 }
@@ -132214,7 +132214,7 @@
 {
     [self testWithParams:nil completion:completionHandler];
 }
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self testNotHandledWithParams:params completion:completionHandler];
@@ -132223,18 +132223,18 @@
 {
     [self testNotHandledWithParams:nil completion:completionHandler];
 }
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
-             completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
+             completionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completionHandler
 {
     [self testSpecificWithParams:params completion:completionHandler];
 }
-- (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+- (void)testSpecificWithCompletionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                               NSError * _Nullable error))completionHandler
 {
     [self testSpecificWithParams:nil completion:completionHandler];
 }
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                    completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self testUnknownCommandWithParams:params completion:completionHandler];
@@ -132243,94 +132243,94 @@
 {
     [self testUnknownCommandWithParams:nil completion:completionHandler];
 }
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
-                 completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
 {
     [self testAddArgumentsWithParams:params completion:completionHandler];
 }
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
-                          completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
+                          completionHandler:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
 {
     [self testSimpleArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                completionHandler:
-                                   (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                   (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
 {
     [self testStructArrayArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
-                          completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
+                          completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
 {
     [self testStructArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
-                                completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
+                                completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completionHandler
 {
     [self testNestedStructArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
-                              completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
+                              completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completionHandler
 {
     [self testListStructArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
-                             completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
+                             completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completionHandler
 {
     [self testListInt8UArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
-                                    completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
+                                    completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completionHandler
 {
     [self testNestedStructListArgumentRequestWithParams:params completion:completionHandler];
 }
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
-                                        completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
+                                        completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completionHandler
 {
     [self testListNestedStructListArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
-                            completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
 {
     [self testListInt8UReverseRequestWithParams:params completion:completionHandler];
 }
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
-                 completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
 {
     [self testEnumsRequestWithParams:params completion:completionHandler];
 }
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
-                            completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
 {
     [self testNullableOptionalRequestWithParams:params completion:completionHandler];
 }
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                    completionHandler:
-                                       (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                       (void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                            NSError * _Nullable error))completionHandler
 {
     [self testComplexNullableOptionalRequestWithParams:params completion:completionHandler];
 }
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
-                        completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
+                        completionHandler:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completionHandler
 {
     [self simpleStructEchoRequestWithParams:params completion:completionHandler];
 }
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                    completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self timedInvokeRequestWithParams:params completion:completionHandler];
@@ -132339,21 +132339,21 @@
 {
     [self timedInvokeRequestWithParams:nil completion:completionHandler];
 }
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                   completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self testSimpleOptionalArgumentRequestWithParams:params completion:completionHandler];
 }
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
-                         completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
+                         completionHandler:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completionHandler
 {
     [self testEmitTestEventRequestWithParams:params completion:completionHandler];
 }
-- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                      completionHandler:
                                          (void (^)(
-                                             MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                             MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                              NSError * _Nullable error))completionHandler
 {
     [self testEmitTestFabricScopedEventRequestWithParams:params completion:completionHandler];
@@ -133887,17 +133887,17 @@
                                        completion:completionHandler];
 }
 
-- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                          NSError * _Nullable error))completionHandler
 {
     [self readAttributeStructAttrWithCompletion:completionHandler];
 }
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                         completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self writeAttributeStructAttrWithValue:value params:nil completion:completionHandler];
 }
-- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value
+- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value
                                    params:(MTRWriteParams * _Nullable)params
                         completionHandler:(MTRStatusCompletion)completionHandler
 {
@@ -133907,7 +133907,7 @@
                                         maxInterval:(NSNumber * _Nonnull)maxInterval
                                              params:(MTRSubscribeParams * _Nullable)params
                             subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
-                                      reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                      reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                         NSError * _Nullable error))reportHandler
 {
     MTRSubscribeParams * _Nullable subscribeParams = [params copy];
@@ -133924,7 +133924,7 @@
 + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                          endpoint:(NSNumber *)endpoint
                                             queue:(dispatch_queue_t)queue
-                                completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                completionHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                       NSError * _Nullable error))completionHandler
 {
     [self readAttributeStructAttrWithAttributeCache:attributeCacheContainer
@@ -135665,17 +135665,17 @@
                                                completion:completionHandler];
 }
 
-- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                              NSError * _Nullable error))completionHandler
 {
     [self readAttributeNullableStructWithCompletion:completionHandler];
 }
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                             completionHandler:(MTRStatusCompletion)completionHandler
 {
     [self writeAttributeNullableStructWithValue:value params:nil completion:completionHandler];
 }
-- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value
+- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value
                                        params:(MTRWriteParams * _Nullable)params
                             completionHandler:(MTRStatusCompletion)completionHandler
 {
@@ -135685,7 +135685,7 @@
                                             maxInterval:(NSNumber * _Nonnull)maxInterval
                                                  params:(MTRSubscribeParams * _Nullable)params
                                 subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
-                                          reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                          reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                             NSError * _Nullable error))reportHandler
 {
     MTRSubscribeParams * _Nullable subscribeParams = [params copy];
@@ -135702,7 +135702,7 @@
 + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer
                                              endpoint:(NSNumber *)endpoint
                                                 queue:(dispatch_queue_t)queue
-                                    completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value,
+                                    completionHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value,
                                                           NSError * _Nullable error))completionHandler
 {
     [self readAttributeNullableStructWithAttributeCache:attributeCacheContainer
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h
index 00a28a0..56dc085 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h
@@ -342,7 +342,7 @@
 @property (nonatomic, assign, readonly) chip::EndpointId endpoint;
 @end
 
-@interface MTRBaseClusterTestCluster ()
+@interface MTRBaseClusterUnitTesting ()
 @property (nonatomic, strong, readonly) MTRBaseDevice * device;
 @property (nonatomic, assign, readonly) chip::EndpointId endpoint;
 @end
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm
index e6a5ca8..3fb5690 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm
@@ -10700,17 +10700,17 @@
     }
 }
 
-void MTRTestClusterBitmap8AttributeCallbackBridge::OnSuccessFn(
-    void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value)
+void MTRUnitTestingBitmap8AttributeCallbackBridge::OnSuccessFn(
+    void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value)
 {
     NSNumber * _Nonnull objCValue;
     objCValue = [NSNumber numberWithUnsignedChar:value.Raw()];
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10724,17 +10724,17 @@
     }
 }
 
-void MTRTestClusterBitmap16AttributeCallbackBridge::OnSuccessFn(
-    void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value)
+void MTRUnitTestingBitmap16AttributeCallbackBridge::OnSuccessFn(
+    void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value)
 {
     NSNumber * _Nonnull objCValue;
     objCValue = [NSNumber numberWithUnsignedShort:value.Raw()];
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10748,17 +10748,17 @@
     }
 }
 
-void MTRTestClusterBitmap32AttributeCallbackBridge::OnSuccessFn(
-    void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value)
+void MTRUnitTestingBitmap32AttributeCallbackBridge::OnSuccessFn(
+    void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value)
 {
     NSNumber * _Nonnull objCValue;
     objCValue = [NSNumber numberWithUnsignedInt:value.Raw()];
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10772,17 +10772,17 @@
     }
 }
 
-void MTRTestClusterBitmap64AttributeCallbackBridge::OnSuccessFn(
-    void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value)
+void MTRUnitTestingBitmap64AttributeCallbackBridge::OnSuccessFn(
+    void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value)
 {
     NSNumber * _Nonnull objCValue;
     objCValue = [NSNumber numberWithUnsignedLongLong:value.Raw()];
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10796,7 +10796,7 @@
     }
 }
 
-void MTRTestClusterListInt8uListAttributeCallbackBridge::OnSuccessFn(
+void MTRUnitTestingListInt8uListAttributeCallbackBridge::OnSuccessFn(
     void * context, const chip::app::DataModel::DecodableList<uint8_t> & value)
 {
     NSArray * _Nonnull objCValue;
@@ -10819,9 +10819,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10835,7 +10835,7 @@
     }
 }
 
-void MTRTestClusterListOctetStringListAttributeCallbackBridge::OnSuccessFn(
+void MTRUnitTestingListOctetStringListAttributeCallbackBridge::OnSuccessFn(
     void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & value)
 {
     NSArray * _Nonnull objCValue;
@@ -10858,9 +10858,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10874,8 +10874,8 @@
     }
 }
 
-void MTRTestClusterListStructOctetStringListAttributeCallbackBridge::OnSuccessFn(void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> &
+void MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::OnSuccessFn(void * context,
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> &
         value)
 {
     NSArray * _Nonnull objCValue;
@@ -10884,8 +10884,8 @@
         auto iter_0 = value.begin();
         while (iter_0.Next()) {
             auto & entry_0 = iter_0.GetValue();
-            MTRTestClusterClusterTestListStructOctet * newElement_0;
-            newElement_0 = [MTRTestClusterClusterTestListStructOctet new];
+            MTRUnitTestingClusterTestListStructOctet * newElement_0;
+            newElement_0 = [MTRUnitTestingClusterTestListStructOctet new];
             newElement_0.member1 = [NSNumber numberWithUnsignedLongLong:entry_0.member1];
             newElement_0.member2 = [NSData dataWithBytes:entry_0.member2.data() length:entry_0.member2.size()];
             [array_0 addObject:newElement_0];
@@ -10900,9 +10900,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -10916,9 +10916,9 @@
     }
 }
 
-void MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::OnSuccessFn(void * context,
+void MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnSuccessFn(void * context,
     const chip::app::DataModel::DecodableList<
-        chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & value)
+        chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & value)
 {
     NSArray * _Nonnull objCValue;
     { // Scope for our temporary variables
@@ -10926,8 +10926,8 @@
         auto iter_0 = value.begin();
         while (iter_0.Next()) {
             auto & entry_0 = iter_0.GetValue();
-            MTRTestClusterClusterNullablesAndOptionalsStruct * newElement_0;
-            newElement_0 = [MTRTestClusterClusterNullablesAndOptionalsStruct new];
+            MTRUnitTestingClusterNullablesAndOptionalsStruct * newElement_0;
+            newElement_0 = [MTRUnitTestingClusterNullablesAndOptionalsStruct new];
             if (entry_0.nullableInt.IsNull()) {
                 newElement_0.nullableInt = nil;
             } else {
@@ -10977,7 +10977,7 @@
             if (entry_0.nullableStruct.IsNull()) {
                 newElement_0.nullableStruct = nil;
             } else {
-                newElement_0.nullableStruct = [MTRTestClusterClusterSimpleStruct new];
+                newElement_0.nullableStruct = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a];
                 newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b];
                 newElement_0.nullableStruct.c =
@@ -10992,7 +10992,7 @@
                 newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h];
             }
             if (entry_0.optionalStruct.HasValue()) {
-                newElement_0.optionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                newElement_0.optionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a];
                 newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b];
                 newElement_0.optionalStruct.c =
@@ -11012,7 +11012,7 @@
                 if (entry_0.nullableOptionalStruct.Value().IsNull()) {
                     newElement_0.nullableOptionalStruct = nil;
                 } else {
-                    newElement_0.nullableOptionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                    newElement_0.nullableOptionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                     newElement_0.nullableOptionalStruct.a =
                         [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a];
                     newElement_0.nullableOptionalStruct.b =
@@ -11112,9 +11112,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11128,11 +11128,11 @@
     }
 }
 
-void MTRTestClusterStructAttrStructAttributeCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & value)
+void MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value)
 {
-    MTRTestClusterClusterSimpleStruct * _Nonnull objCValue;
-    objCValue = [MTRTestClusterClusterSimpleStruct new];
+    MTRUnitTestingClusterSimpleStruct * _Nonnull objCValue;
+    objCValue = [MTRUnitTestingClusterSimpleStruct new];
     objCValue.a = [NSNumber numberWithUnsignedChar:value.a];
     objCValue.b = [NSNumber numberWithBool:value.b];
     objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.c)];
@@ -11144,9 +11144,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11160,7 +11160,7 @@
     }
 }
 
-void MTRTestClusterListLongOctetStringListAttributeCallbackBridge::OnSuccessFn(
+void MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::OnSuccessFn(
     void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & value)
 {
     NSArray * _Nonnull objCValue;
@@ -11183,9 +11183,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11199,8 +11199,8 @@
     }
 }
 
-void MTRTestClusterListFabricScopedListAttributeCallbackBridge::OnSuccessFn(void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> & value)
+void MTRUnitTestingListFabricScopedListAttributeCallbackBridge::OnSuccessFn(void * context,
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> & value)
 {
     NSArray * _Nonnull objCValue;
     { // Scope for our temporary variables
@@ -11208,8 +11208,8 @@
         auto iter_0 = value.begin();
         while (iter_0.Next()) {
             auto & entry_0 = iter_0.GetValue();
-            MTRTestClusterClusterTestFabricScoped * newElement_0;
-            newElement_0 = [MTRTestClusterClusterTestFabricScoped new];
+            MTRUnitTestingClusterTestFabricScoped * newElement_0;
+            newElement_0 = [MTRUnitTestingClusterTestFabricScoped new];
             newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u];
             if (entry_0.optionalFabricSensitiveInt8u.HasValue()) {
                 newElement_0.optionalFabricSensitiveInt8u =
@@ -11236,7 +11236,7 @@
             newElement_0.fabricSensitiveCharString = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data()
                                                                               length:entry_0.fabricSensitiveCharString.size()
                                                                             encoding:NSUTF8StringEncoding];
-            newElement_0.fabricSensitiveStruct = [MTRTestClusterClusterSimpleStruct new];
+            newElement_0.fabricSensitiveStruct = [MTRUnitTestingClusterSimpleStruct new];
             newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a];
             newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b];
             newElement_0.fabricSensitiveStruct.c =
@@ -11278,9 +11278,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11294,8 +11294,8 @@
     }
 }
 
-void MTRTestClusterNullableBitmap8AttributeCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value)
+void MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value)
 {
     NSNumber * _Nullable objCValue;
     if (value.IsNull()) {
@@ -11306,9 +11306,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11322,8 +11322,8 @@
     }
 }
 
-void MTRTestClusterNullableBitmap16AttributeCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value)
+void MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value)
 {
     NSNumber * _Nullable objCValue;
     if (value.IsNull()) {
@@ -11334,9 +11334,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11350,8 +11350,8 @@
     }
 }
 
-void MTRTestClusterNullableBitmap32AttributeCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value)
+void MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value)
 {
     NSNumber * _Nullable objCValue;
     if (value.IsNull()) {
@@ -11362,9 +11362,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11378,8 +11378,8 @@
     }
 }
 
-void MTRTestClusterNullableBitmap64AttributeCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value)
+void MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value)
 {
     NSNumber * _Nullable objCValue;
     if (value.IsNull()) {
@@ -11390,9 +11390,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11406,14 +11406,14 @@
     }
 }
 
-void MTRTestClusterNullableStructStructAttributeCallbackBridge::OnSuccessFn(void * context,
-    const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> & value)
+void MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnSuccessFn(void * context,
+    const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> & value)
 {
-    MTRTestClusterClusterSimpleStruct * _Nullable objCValue;
+    MTRUnitTestingClusterSimpleStruct * _Nullable objCValue;
     if (value.IsNull()) {
         objCValue = nil;
     } else {
-        objCValue = [MTRTestClusterClusterSimpleStruct new];
+        objCValue = [MTRUnitTestingClusterSimpleStruct new];
         objCValue.a = [NSNumber numberWithUnsignedChar:value.Value().a];
         objCValue.b = [NSNumber numberWithBool:value.Value().b];
         objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().c)];
@@ -11428,9 +11428,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11444,7 +11444,7 @@
     }
 }
 
-void MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn(
+void MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value)
 {
     NSArray * _Nonnull objCValue;
@@ -11467,9 +11467,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11483,7 +11483,7 @@
     }
 }
 
-void MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn(
+void MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value)
 {
     NSArray * _Nonnull objCValue;
@@ -11506,9 +11506,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -11522,7 +11522,7 @@
     }
 }
 
-void MTRTestClusterAttributeListListAttributeCallbackBridge::OnSuccessFn(
+void MTRUnitTestingAttributeListListAttributeCallbackBridge::OnSuccessFn(
     void * context, const chip::app::DataModel::DecodableList<chip::AttributeId> & value)
 {
     NSArray * _Nonnull objCValue;
@@ -11545,9 +11545,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -12789,50 +12789,50 @@
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestSpecificResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data)
+void MTRUnitTestingClusterTestSpecificResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestSpecificResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestSpecificResponseParams new];
     {
         response.returnValue = [NSNumber numberWithUnsignedChar:data.returnValue];
     }
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data)
+void MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestAddArgumentsResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestAddArgumentsResponseParams new];
     {
         response.returnValue = [NSNumber numberWithUnsignedChar:data.returnValue];
     }
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & data)
+void MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestSimpleArgumentResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestSimpleArgumentResponseParams new];
     {
         response.returnValue = [NSNumber numberWithBool:data.returnValue];
     }
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & data)
+void MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestStructArrayArgumentResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestStructArrayArgumentResponseParams new];
     { { // Scope for our temporary variables
         auto * array_0 = [NSMutableArray new];
     auto iter_0 = data.arg1.begin();
     while (iter_0.Next()) {
         auto & entry_0 = iter_0.GetValue();
-        MTRTestClusterClusterNestedStructList * newElement_0;
-        newElement_0 = [MTRTestClusterClusterNestedStructList new];
+        MTRUnitTestingClusterNestedStructList * newElement_0;
+        newElement_0 = [MTRUnitTestingClusterNestedStructList new];
         newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
         newElement_0.b = [NSNumber numberWithBool:entry_0.b];
-        newElement_0.c = [MTRTestClusterClusterSimpleStruct new];
+        newElement_0.c = [MTRUnitTestingClusterSimpleStruct new];
         newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a];
         newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b];
         newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)];
@@ -12848,8 +12848,8 @@
             auto iter_2 = entry_0.d.begin();
             while (iter_2.Next()) {
                 auto & entry_2 = iter_2.GetValue();
-                MTRTestClusterClusterSimpleStruct * newElement_2;
-                newElement_2 = [MTRTestClusterClusterSimpleStruct new];
+                MTRUnitTestingClusterSimpleStruct * newElement_2;
+                newElement_2 = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a];
                 newElement_2.b = [NSNumber numberWithBool:entry_2.b];
                 newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)];
@@ -12932,8 +12932,8 @@
 auto iter_0 = data.arg2.begin();
 while (iter_0.Next()) {
     auto & entry_0 = iter_0.GetValue();
-    MTRTestClusterClusterSimpleStruct * newElement_0;
-    newElement_0 = [MTRTestClusterClusterSimpleStruct new];
+    MTRUnitTestingClusterSimpleStruct * newElement_0;
+    newElement_0 = [MTRUnitTestingClusterSimpleStruct new];
     newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
     newElement_0.b = [NSNumber numberWithBool:entry_0.b];
     newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)];
@@ -12996,10 +12996,10 @@
 }
 ;
 
-void MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data)
+void MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestListInt8UReverseResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestListInt8UReverseResponseParams new];
     {
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
@@ -13021,10 +13021,10 @@
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestEnumsResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data)
+void MTRUnitTestingClusterTestEnumsResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestEnumsResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestEnumsResponseParams new];
     {
         response.arg1 = [NSNumber numberWithUnsignedShort:chip::to_underlying(data.arg1)];
     }
@@ -13034,10 +13034,10 @@
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data)
+void MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestNullableOptionalResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestNullableOptionalResponseParams new];
     {
         response.wasPresent = [NSNumber numberWithBool:data.wasPresent];
     }
@@ -13069,10 +13069,10 @@
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType & data)
+void MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestComplexNullableOptionalResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestComplexNullableOptionalResponseParams new];
     {
         response.nullableIntWasNull = [NSNumber numberWithBool:data.nullableIntWasNull];
     }
@@ -13158,7 +13158,7 @@
     }
     {
         if (data.nullableStructValue.HasValue()) {
-            response.nullableStructValue = [MTRTestClusterClusterSimpleStruct new];
+            response.nullableStructValue = [MTRUnitTestingClusterSimpleStruct new];
             response.nullableStructValue.a = [NSNumber numberWithUnsignedChar:data.nullableStructValue.Value().a];
             response.nullableStructValue.b = [NSNumber numberWithBool:data.nullableStructValue.Value().b];
             response.nullableStructValue.c =
@@ -13180,7 +13180,7 @@
     }
     {
         if (data.optionalStructValue.HasValue()) {
-            response.optionalStructValue = [MTRTestClusterClusterSimpleStruct new];
+            response.optionalStructValue = [MTRUnitTestingClusterSimpleStruct new];
             response.optionalStructValue.a = [NSNumber numberWithUnsignedChar:data.optionalStructValue.Value().a];
             response.optionalStructValue.b = [NSNumber numberWithBool:data.optionalStructValue.Value().b];
             response.optionalStructValue.c =
@@ -13209,7 +13209,7 @@
     }
     {
         if (data.nullableOptionalStructValue.HasValue()) {
-            response.nullableOptionalStructValue = [MTRTestClusterClusterSimpleStruct new];
+            response.nullableOptionalStructValue = [MTRUnitTestingClusterSimpleStruct new];
             response.nullableOptionalStructValue.a = [NSNumber numberWithUnsignedChar:data.nullableOptionalStructValue.Value().a];
             response.nullableOptionalStructValue.b = [NSNumber numberWithBool:data.nullableOptionalStructValue.Value().b];
             response.nullableOptionalStructValue.c =
@@ -13313,22 +13313,22 @@
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterBooleanResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data)
+void MTRUnitTestingClusterBooleanResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterBooleanResponseParams new];
+    auto * response = [MTRUnitTestingClusterBooleanResponseParams new];
     {
         response.value = [NSNumber numberWithBool:data.value];
     }
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterSimpleStructResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data)
+void MTRUnitTestingClusterSimpleStructResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterSimpleStructResponseParams new];
+    auto * response = [MTRUnitTestingClusterSimpleStructResponseParams new];
     {
-        response.arg1 = [MTRTestClusterClusterSimpleStruct new];
+        response.arg1 = [MTRUnitTestingClusterSimpleStruct new];
         response.arg1.a = [NSNumber numberWithUnsignedChar:data.arg1.a];
         response.arg1.b = [NSNumber numberWithBool:data.arg1.b];
         response.arg1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg1.c)];
@@ -13343,20 +13343,20 @@
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data)
+void MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestEmitTestEventResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestEmitTestEventResponseParams new];
     {
         response.value = [NSNumber numberWithUnsignedLongLong:data.value];
     }
     DispatchSuccess(context, response);
 };
 
-void MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data)
+void MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data)
 {
-    auto * response = [MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams new];
+    auto * response = [MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams new];
     {
         response.value = [NSNumber numberWithUnsignedLongLong:data.value];
     }
@@ -19286,17 +19286,17 @@
     }
 }
 
-void MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::OnSuccessFn(
-    void * context, chip::app::Clusters::TestCluster::SimpleEnum value)
+void MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge::OnSuccessFn(
+    void * context, chip::app::Clusters::UnitTesting::SimpleEnum value)
 {
     NSNumber * _Nonnull objCValue;
     objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)];
     DispatchSuccess(context, objCValue);
 };
 
-void MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
@@ -19310,8 +19310,8 @@
     }
 }
 
-void MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::OnSuccessFn(
-    void * context, const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value)
+void MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge::OnSuccessFn(
+    void * context, const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value)
 {
     NSNumber * _Nullable objCValue;
     if (value.IsNull()) {
@@ -19322,9 +19322,9 @@
     DispatchSuccess(context, objCValue);
 };
 
-void MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+void MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
 {
-    auto * self = static_cast<MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(context);
+    auto * self = static_cast<MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge *>(context);
     if (!self->mQueue) {
         return;
     }
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h
index 528d5d9..6d4b97a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h
@@ -113,30 +113,30 @@
     void *, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType &);
 typedef void (*AccountLoginClusterGetSetupPINResponseCallbackType)(
     void *, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &);
-typedef void (*TestClusterClusterTestSpecificResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType &);
-typedef void (*TestClusterClusterTestAddArgumentsResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &);
-typedef void (*TestClusterClusterTestSimpleArgumentResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType &);
-typedef void (*TestClusterClusterTestStructArrayArgumentResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType &);
-typedef void (*TestClusterClusterTestListInt8UReverseResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType &);
-typedef void (*TestClusterClusterTestEnumsResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &);
-typedef void (*TestClusterClusterTestNullableOptionalResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType &);
-typedef void (*TestClusterClusterTestComplexNullableOptionalResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType &);
-typedef void (*TestClusterClusterBooleanResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType &);
-typedef void (*TestClusterClusterSimpleStructResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &);
-typedef void (*TestClusterClusterTestEmitTestEventResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &);
-typedef void (*TestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType)(
-    void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestSpecificResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestAddArgumentsResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestSimpleArgumentResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestStructArrayArgumentResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestListInt8UReverseResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestEnumsResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestNullableOptionalResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestComplexNullableOptionalResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType &);
+typedef void (*UnitTestingClusterBooleanResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType &);
+typedef void (*UnitTestingClusterSimpleStructResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestEmitTestEventResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType &);
+typedef void (*UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType)(
+    void *, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType &);
 
 typedef void (*IdentifyClusterIdentifyEffectIdentifierAttributeCallback)(void *,
                                                                          chip::app::Clusters::Identify::IdentifyEffectIdentifier);
@@ -527,9 +527,9 @@
     void *, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum);
 typedef void (*NullableApplicationBasicClusterApplicationStatusEnumAttributeCallback)(
     void *, const chip::app::DataModel::Nullable<chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum> &);
-typedef void (*TestClusterClusterSimpleEnumAttributeCallback)(void *, chip::app::Clusters::TestCluster::SimpleEnum);
-typedef void (*NullableTestClusterClusterSimpleEnumAttributeCallback)(
-    void *, const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> &);
+typedef void (*UnitTestingClusterSimpleEnumAttributeCallback)(void *, chip::app::Clusters::UnitTesting::SimpleEnum);
+typedef void (*NullableUnitTestingClusterSimpleEnumAttributeCallback)(
+    void *, const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> &);
 typedef void (*FaultInjectionClusterFaultTypeAttributeCallback)(void *, chip::app::Clusters::FaultInjection::FaultType);
 typedef void (*NullableFaultInjectionClusterFaultTypeAttributeCallback)(
     void *, const chip::app::DataModel::Nullable<chip::app::Clusters::FaultInjection::FaultType> &);
@@ -1071,44 +1071,44 @@
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & data);
 typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::AttributeId> & data);
-typedef void (*TestClusterBitmap8AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>);
-typedef void (*TestClusterBitmap16AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>);
-typedef void (*TestClusterBitmap32AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>);
-typedef void (*TestClusterBitmap64AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>);
-typedef void (*TestClusterListInt8uListAttributeCallback)(void * context,
+typedef void (*UnitTestingBitmap8AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>);
+typedef void (*UnitTestingBitmap16AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>);
+typedef void (*UnitTestingBitmap32AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>);
+typedef void (*UnitTestingBitmap64AttributeCallback)(void *, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>);
+typedef void (*UnitTestingListInt8uListAttributeCallback)(void * context,
                                                           const chip::app::DataModel::DecodableList<uint8_t> & data);
-typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context,
+typedef void (*UnitTestingListOctetStringListAttributeCallback)(void * context,
                                                                 const chip::app::DataModel::DecodableList<chip::ByteSpan> & data);
-typedef void (*TestClusterListStructOctetStringListAttributeCallback)(
+typedef void (*UnitTestingListStructOctetStringListAttributeCallback)(
     void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> &
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> &
         data);
-typedef void (*TestClusterListNullablesAndOptionalsStructListAttributeCallback)(
+typedef void (*UnitTestingListNullablesAndOptionalsStructListAttributeCallback)(
     void * context,
     const chip::app::DataModel::DecodableList<
-        chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & data);
-typedef void (*TestClusterStructAttrStructAttributeCallback)(
-    void *, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType &);
-typedef void (*TestClusterListLongOctetStringListAttributeCallback)(
+        chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & data);
+typedef void (*UnitTestingStructAttrStructAttributeCallback)(
+    void *, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType &);
+typedef void (*UnitTestingListLongOctetStringListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & data);
-typedef void (*TestClusterListFabricScopedListAttributeCallback)(
+typedef void (*UnitTestingListFabricScopedListAttributeCallback)(
     void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> & data);
-typedef void (*TestClusterNullableBitmap8AttributeCallback)(
-    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> &);
-typedef void (*TestClusterNullableBitmap16AttributeCallback)(
-    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> &);
-typedef void (*TestClusterNullableBitmap32AttributeCallback)(
-    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> &);
-typedef void (*TestClusterNullableBitmap64AttributeCallback)(
-    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> &);
-typedef void (*TestClusterNullableStructStructAttributeCallback)(
-    void *, const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> &);
-typedef void (*TestClusterGeneratedCommandListListAttributeCallback)(
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> & data);
+typedef void (*UnitTestingNullableBitmap8AttributeCallback)(
+    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> &);
+typedef void (*UnitTestingNullableBitmap16AttributeCallback)(
+    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> &);
+typedef void (*UnitTestingNullableBitmap32AttributeCallback)(
+    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> &);
+typedef void (*UnitTestingNullableBitmap64AttributeCallback)(
+    void *, const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> &);
+typedef void (*UnitTestingNullableStructStructAttributeCallback)(
+    void *, const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> &);
+typedef void (*UnitTestingGeneratedCommandListListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & data);
-typedef void (*TestClusterAcceptedCommandListListAttributeCallback)(
+typedef void (*UnitTestingAcceptedCommandListListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & data);
-typedef void (*TestClusterAttributeListListAttributeCallback)(void * context,
+typedef void (*UnitTestingAttributeListListAttributeCallback)(void * context,
                                                               const chip::app::DataModel::DecodableList<chip::AttributeId> & data);
 
 class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge<DefaultSuccessCallback>
@@ -10193,618 +10193,618 @@
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterBitmap8AttributeCallbackBridge : public MTRCallbackBridge<TestClusterBitmap8AttributeCallback>
+class MTRUnitTestingBitmap8AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingBitmap8AttributeCallback>
 {
 public:
-    MTRTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterBitmap8AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingBitmap8AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterBitmap8AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingBitmap8AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
-    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value);
+    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value);
 };
 
-class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestClusterBitmap8AttributeCallbackBridge
+class MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap8AttributeCallbackBridge
 {
 public:
-    MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action,
+    MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action,
                                                              MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterBitmap8AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingBitmap8AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterBitmap8AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterBitmap8AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingBitmap8AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingBitmap8AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterBitmap16AttributeCallbackBridge : public MTRCallbackBridge<TestClusterBitmap16AttributeCallback>
+class MTRUnitTestingBitmap16AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingBitmap16AttributeCallback>
 {
 public:
-    MTRTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterBitmap16AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingBitmap16AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterBitmap16AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingBitmap16AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
-    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value);
+    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value);
 };
 
-class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTestClusterBitmap16AttributeCallbackBridge
+class MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap16AttributeCallbackBridge
 {
 public:
-    MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                               MTRActionBlock action,
                                                               MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterBitmap16AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingBitmap16AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterBitmap16AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterBitmap16AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingBitmap16AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingBitmap16AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterBitmap32AttributeCallbackBridge : public MTRCallbackBridge<TestClusterBitmap32AttributeCallback>
+class MTRUnitTestingBitmap32AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingBitmap32AttributeCallback>
 {
 public:
-    MTRTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterBitmap32AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingBitmap32AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterBitmap32AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingBitmap32AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
-    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value);
+    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value);
 };
 
-class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTestClusterBitmap32AttributeCallbackBridge
+class MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap32AttributeCallbackBridge
 {
 public:
-    MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                               MTRActionBlock action,
                                                               MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterBitmap32AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingBitmap32AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterBitmap32AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterBitmap32AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingBitmap32AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingBitmap32AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterBitmap64AttributeCallbackBridge : public MTRCallbackBridge<TestClusterBitmap64AttributeCallback>
+class MTRUnitTestingBitmap64AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingBitmap64AttributeCallback>
 {
 public:
-    MTRTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterBitmap64AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingBitmap64AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterBitmap64AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingBitmap64AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
-    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value);
+    static void OnSuccessFn(void * context, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value);
 };
 
-class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTestClusterBitmap64AttributeCallbackBridge
+class MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap64AttributeCallbackBridge
 {
 public:
-    MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                               MTRActionBlock action,
                                                               MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterBitmap64AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingBitmap64AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterBitmap64AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterBitmap64AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingBitmap64AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingBitmap64AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterListInt8uListAttributeCallbackBridge : public MTRCallbackBridge<TestClusterListInt8uListAttributeCallback>
+class MTRUnitTestingListInt8uListAttributeCallbackBridge : public MTRCallbackBridge<UnitTestingListInt8uListAttributeCallback>
 {
 public:
-    MTRTestClusterListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterListInt8uListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingListInt8uListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterListInt8uListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingListInt8uListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList<uint8_t> & value);
 };
 
-class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MTRTestClusterListInt8uListAttributeCallbackBridge
+class MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge : public MTRUnitTestingListInt8uListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                    MTRActionBlock action,
                                                                    MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterListInt8uListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingListInt8uListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterListInt8uListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterListInt8uListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingListInt8uListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingListInt8uListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterListOctetStringListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterListOctetStringListAttributeCallback>
+class MTRUnitTestingListOctetStringListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingListOctetStringListAttributeCallback>
 {
 public:
-    MTRTestClusterListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterListOctetStringListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingListOctetStringListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                              MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterListOctetStringListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingListOctetStringListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & value);
 };
 
-class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterListOctetStringListAttributeCallbackBridge
+class MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingListOctetStringListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                          MTRActionBlock action,
                                                                          MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingListOctetStringListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterListOctetStringListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingListOctetStringListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterListStructOctetStringListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterListStructOctetStringListAttributeCallback>
+class MTRUnitTestingListStructOctetStringListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingListStructOctetStringListAttributeCallback>
 {
 public:
-    MTRTestClusterListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterListStructOctetStringListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingListStructOctetStringListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                    MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterListStructOctetStringListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingListStructOctetStringListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(
         void * context,
-        const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> &
+        const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> &
             value);
 };
 
-class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterListStructOctetStringListAttributeCallbackBridge
+class MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingListStructOctetStringListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge(
+    MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge(
         dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action,
         MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterListStructOctetStringListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterListNullablesAndOptionalsStructListAttributeCallback>
+class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingListNullablesAndOptionalsStructListAttributeCallback>
 {
 public:
-    MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterListNullablesAndOptionalsStructListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingListNullablesAndOptionalsStructListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                              MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterListNullablesAndOptionalsStructListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingListNullablesAndOptionalsStructListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
                             const chip::app::DataModel::DecodableList<
-                                chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & value);
+                                chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & value);
 };
 
-class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge
+class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge(
+    MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge(
         dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action,
         MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge<TestClusterStructAttrStructAttributeCallback>
+class MTRUnitTestingStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge<UnitTestingStructAttrStructAttributeCallback>
 {
 public:
-    MTRTestClusterStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterStructAttrStructAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingStructAttrStructAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterStructAttrStructAttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingStructAttrStructAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
-    static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & value);
+    static void OnSuccessFn(void * context, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value);
 };
 
-class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterStructAttrStructAttributeCallbackBridge
+class MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingStructAttrStructAttributeCallbackBridge
 {
 public:
-    MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                       MTRActionBlock action,
                                                                       MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingStructAttrStructAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterStructAttrStructAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterListLongOctetStringListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterListLongOctetStringListAttributeCallback>
+class MTRUnitTestingListLongOctetStringListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingListLongOctetStringListAttributeCallback>
 {
 public:
-    MTRTestClusterListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterListLongOctetStringListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingListLongOctetStringListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                  MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterListLongOctetStringListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingListLongOctetStringListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & value);
 };
 
-class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterListLongOctetStringListAttributeCallbackBridge
+class MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingListLongOctetStringListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                              MTRActionBlock action,
                                                                              MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterListLongOctetStringListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterListFabricScopedListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterListFabricScopedListAttributeCallback>
+class MTRUnitTestingListFabricScopedListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingListFabricScopedListAttributeCallback>
 {
 public:
-    MTRTestClusterListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterListFabricScopedListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingListFabricScopedListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                               MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterListFabricScopedListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingListFabricScopedListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(
         void * context,
-        const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> &
+        const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> &
             value);
 };
 
-class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterListFabricScopedListAttributeCallbackBridge
+class MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingListFabricScopedListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                           MTRActionBlock action,
                                                                           MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingListFabricScopedListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterListFabricScopedListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge<TestClusterNullableBitmap8AttributeCallback>
+class MTRUnitTestingNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingNullableBitmap8AttributeCallback>
 {
 public:
-    MTRTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterNullableBitmap8AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingNullableBitmap8AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterNullableBitmap8AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingNullableBitmap8AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value);
+                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value);
 };
 
-class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRTestClusterNullableBitmap8AttributeCallbackBridge
+class MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitTestingNullableBitmap8AttributeCallbackBridge
 {
 public:
-    MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                      MTRActionBlock action,
                                                                      MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingNullableBitmap8AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterNullableBitmap8AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge<TestClusterNullableBitmap16AttributeCallback>
+class MTRUnitTestingNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingNullableBitmap16AttributeCallback>
 {
 public:
-    MTRTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterNullableBitmap16AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingNullableBitmap16AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterNullableBitmap16AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingNullableBitmap16AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value);
+                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value);
 };
 
-class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge
-    : public MTRTestClusterNullableBitmap16AttributeCallbackBridge
+class MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingNullableBitmap16AttributeCallbackBridge
 {
 public:
-    MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                       MTRActionBlock action,
                                                                       MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingNullableBitmap16AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterNullableBitmap16AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge<TestClusterNullableBitmap32AttributeCallback>
+class MTRUnitTestingNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingNullableBitmap32AttributeCallback>
 {
 public:
-    MTRTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterNullableBitmap32AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingNullableBitmap32AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterNullableBitmap32AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingNullableBitmap32AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value);
+                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value);
 };
 
-class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge
-    : public MTRTestClusterNullableBitmap32AttributeCallbackBridge
+class MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingNullableBitmap32AttributeCallbackBridge
 {
 public:
-    MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                       MTRActionBlock action,
                                                                       MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingNullableBitmap32AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterNullableBitmap32AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge<TestClusterNullableBitmap64AttributeCallback>
+class MTRUnitTestingNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge<UnitTestingNullableBitmap64AttributeCallback>
 {
 public:
-    MTRTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterNullableBitmap64AttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingNullableBitmap64AttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterNullableBitmap64AttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingNullableBitmap64AttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value);
+                const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value);
 };
 
-class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge
-    : public MTRTestClusterNullableBitmap64AttributeCallbackBridge
+class MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingNullableBitmap64AttributeCallbackBridge
 {
 public:
-    MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                       MTRActionBlock action,
                                                                       MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingNullableBitmap64AttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterNullableBitmap64AttributeCallbackBridge::OnDone;
+    using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterNullableStructStructAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterNullableStructStructAttributeCallback>
+class MTRUnitTestingNullableStructStructAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingNullableStructStructAttributeCallback>
 {
 public:
-    MTRTestClusterNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterNullableStructStructAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingNullableStructStructAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                               MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterNullableStructStructAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingNullableStructStructAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(
         void * context,
-        const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> & value);
+        const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> & value);
 };
 
-class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterNullableStructStructAttributeCallbackBridge
+class MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingNullableStructStructAttributeCallbackBridge
 {
 public:
-    MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                           MTRActionBlock action,
                                                                           MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingNullableStructStructAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterNullableStructStructAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterGeneratedCommandListListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterGeneratedCommandListListAttributeCallback>
+class MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingGeneratedCommandListListAttributeCallback>
 {
 public:
-    MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterGeneratedCommandListListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingGeneratedCommandListListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                   MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterGeneratedCommandListListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingGeneratedCommandListListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value);
 };
 
-class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterGeneratedCommandListListAttributeCallbackBridge
+class MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge(
+    MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge(
         dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action,
         MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterAcceptedCommandListListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterAcceptedCommandListListAttributeCallback>
+class MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingAcceptedCommandListListAttributeCallback>
 {
 public:
-    MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterAcceptedCommandListListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingAcceptedCommandListListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                  MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterAcceptedCommandListListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingAcceptedCommandListListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value);
 };
 
-class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterAcceptedCommandListListAttributeCallbackBridge
+class MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                              MTRActionBlock action,
                                                                              MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterAttributeListListAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterAttributeListListAttributeCallback>
+class MTRUnitTestingAttributeListListAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingAttributeListListAttributeCallback>
 {
 public:
-    MTRTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterAttributeListListAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingAttributeListListAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterAttributeListListAttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingAttributeListListAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList<chip::AttributeId> & value);
 };
 
-class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterAttributeListListAttributeCallbackBridge
+class MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingAttributeListListAttributeCallbackBridge
 {
 public:
-    MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                        MTRActionBlock action,
                                                                        MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterAttributeListListAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingAttributeListListAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterAttributeListListAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterAttributeListListAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingAttributeListListAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
@@ -11414,185 +11414,185 @@
                             const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestSpecificResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestSpecificResponseCallbackType>
+class MTRUnitTestingClusterTestSpecificResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestSpecificResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestSpecificResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestSpecificResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                             MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestSpecificResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestSpecificResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestAddArgumentsResponseCallbackType>
+class MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestAddArgumentsResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestAddArgumentsResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestAddArgumentsResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                 MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestAddArgumentsResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestAddArgumentsResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestSimpleArgumentResponseCallbackType>
+class MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestSimpleArgumentResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestSimpleArgumentResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestSimpleArgumentResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                   MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestSimpleArgumentResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestSimpleArgumentResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestStructArrayArgumentResponseCallbackType>
+class MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestStructArrayArgumentResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestStructArrayArgumentResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestStructArrayArgumentResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                        MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestStructArrayArgumentResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestStructArrayArgumentResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & data);
+                const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestListInt8UReverseResponseCallbackType>
+class MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestListInt8UReverseResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestListInt8UReverseResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestListInt8UReverseResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                     MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestListInt8UReverseResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestListInt8UReverseResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestEnumsResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestEnumsResponseCallbackType>
+class MTRUnitTestingClusterTestEnumsResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestEnumsResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestEnumsResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestEnumsResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestEnumsResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingClusterTestEnumsResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestNullableOptionalResponseCallbackType>
+class MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestNullableOptionalResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestNullableOptionalResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestNullableOptionalResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                     MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestNullableOptionalResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestNullableOptionalResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestComplexNullableOptionalResponseCallbackType>
+class MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestComplexNullableOptionalResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestComplexNullableOptionalResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestComplexNullableOptionalResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                            MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestComplexNullableOptionalResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestComplexNullableOptionalResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType & data);
+                const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterBooleanResponseCallbackBridge : public MTRCallbackBridge<TestClusterClusterBooleanResponseCallbackType>
+class MTRUnitTestingClusterBooleanResponseCallbackBridge : public MTRCallbackBridge<UnitTestingClusterBooleanResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterBooleanResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterBooleanResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterBooleanResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingClusterBooleanResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterSimpleStructResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterSimpleStructResponseCallbackType>
+class MTRUnitTestingClusterSimpleStructResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterSimpleStructResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterSimpleStructResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterSimpleStructResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                             MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterSimpleStructResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterSimpleStructResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestEmitTestEventResponseCallbackType>
+class MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestEmitTestEventResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestEmitTestEventResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestEmitTestEventResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                  MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestEmitTestEventResponseCallbackType>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<UnitTestingClusterTestEmitTestEventResponseCallbackType>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data);
+                            const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data);
 };
 
-class MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType>
+class MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType>
 {
 public:
-    MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                              MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType>(queue, handler, action,
+        MTRCallbackBridge<UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType>(queue, handler, action,
                                                                                                OnSuccessFn){};
 
     static void
     OnSuccessFn(void * context,
-                const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data);
+                const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data);
 };
 
 class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge
@@ -19222,67 +19222,67 @@
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRTestClusterClusterSimpleEnumAttributeCallbackBridge
-    : public MTRCallbackBridge<TestClusterClusterSimpleEnumAttributeCallback>
+class MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge
+    : public MTRCallbackBridge<UnitTestingClusterSimpleEnumAttributeCallback>
 {
 public:
-    MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<TestClusterClusterSimpleEnumAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<UnitTestingClusterSimpleEnumAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
-        MTRCallbackBridge<TestClusterClusterSimpleEnumAttributeCallback>(queue, handler, action, OnSuccessFn){};
+    MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) :
+        MTRCallbackBridge<UnitTestingClusterSimpleEnumAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
-    static void OnSuccessFn(void * context, chip::app::Clusters::TestCluster::SimpleEnum value);
+    static void OnSuccessFn(void * context, chip::app::Clusters::UnitTesting::SimpleEnum value);
 };
 
-class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge
-    : public MTRTestClusterClusterSimpleEnumAttributeCallbackBridge
+class MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge
+    : public MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge
 {
 public:
-    MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                        MTRActionBlock action,
                                                                        MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, handler, action),
+        MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::OnDone;
+    using MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
 };
 
-class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge
-    : public MTRCallbackBridge<NullableTestClusterClusterSimpleEnumAttributeCallback>
+class MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge
+    : public MTRCallbackBridge<NullableUnitTestingClusterSimpleEnumAttributeCallback>
 {
 public:
-    MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
-        MTRCallbackBridge<NullableTestClusterClusterSimpleEnumAttributeCallback>(queue, handler, OnSuccessFn){};
+    MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) :
+        MTRCallbackBridge<NullableUnitTestingClusterSimpleEnumAttributeCallback>(queue, handler, OnSuccessFn){};
 
-    MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+    MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
                                                                    MTRActionBlock action) :
-        MTRCallbackBridge<NullableTestClusterClusterSimpleEnumAttributeCallback>(queue, handler, action, OnSuccessFn){};
+        MTRCallbackBridge<NullableUnitTestingClusterSimpleEnumAttributeCallback>(queue, handler, action, OnSuccessFn){};
 
     static void OnSuccessFn(void * context,
-                            const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value);
+                            const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value);
 };
 
-class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge
-    : public MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge
+class MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge
+    : public MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge
 {
 public:
-    MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(
+    MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge(
         dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action,
         MTRSubscriptionEstablishedHandler establishedHandler) :
-        MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, handler, action),
+        MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge(queue, handler, action),
         mEstablishedHandler(establishedHandler)
     {}
 
     static void OnSubscriptionEstablished(void * context);
-    using MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback;
-    using MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::OnDone;
+    using MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback;
+    using MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge::OnDone;
 
 private:
     MTRSubscriptionEstablishedHandler mEstablishedHandler;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index 7fd7b4d..8b74552 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -90,7 +90,7 @@
     MTRClusterApplicationBasicID = 0x0000050D,
     MTRClusterAccountLoginID = 0x0000050E,
     MTRClusterElectricalMeasurementID = 0x00000B04,
-    MTRClusterTestClusterID = 0xFFF1FC05,
+    MTRClusterUnitTestingID = 0xFFF1FC05,
     MTRClusterFaultInjectionID = 0xFFF1FC06,
 };
 
@@ -1278,94 +1278,94 @@
     MTRClusterElectricalMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID,
     MTRClusterElectricalMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID,
 
-    // Cluster TestCluster attributes
-    MTRClusterTestClusterAttributeBooleanID = 0x00000000,
-    MTRClusterTestClusterAttributeBitmap8ID = 0x00000001,
-    MTRClusterTestClusterAttributeBitmap16ID = 0x00000002,
-    MTRClusterTestClusterAttributeBitmap32ID = 0x00000003,
-    MTRClusterTestClusterAttributeBitmap64ID = 0x00000004,
-    MTRClusterTestClusterAttributeInt8uID = 0x00000005,
-    MTRClusterTestClusterAttributeInt16uID = 0x00000006,
-    MTRClusterTestClusterAttributeInt24uID = 0x00000007,
-    MTRClusterTestClusterAttributeInt32uID = 0x00000008,
-    MTRClusterTestClusterAttributeInt40uID = 0x00000009,
-    MTRClusterTestClusterAttributeInt48uID = 0x0000000A,
-    MTRClusterTestClusterAttributeInt56uID = 0x0000000B,
-    MTRClusterTestClusterAttributeInt64uID = 0x0000000C,
-    MTRClusterTestClusterAttributeInt8sID = 0x0000000D,
-    MTRClusterTestClusterAttributeInt16sID = 0x0000000E,
-    MTRClusterTestClusterAttributeInt24sID = 0x0000000F,
-    MTRClusterTestClusterAttributeInt32sID = 0x00000010,
-    MTRClusterTestClusterAttributeInt40sID = 0x00000011,
-    MTRClusterTestClusterAttributeInt48sID = 0x00000012,
-    MTRClusterTestClusterAttributeInt56sID = 0x00000013,
-    MTRClusterTestClusterAttributeInt64sID = 0x00000014,
-    MTRClusterTestClusterAttributeEnum8ID = 0x00000015,
-    MTRClusterTestClusterAttributeEnum16ID = 0x00000016,
-    MTRClusterTestClusterAttributeFloatSingleID = 0x00000017,
-    MTRClusterTestClusterAttributeFloatDoubleID = 0x00000018,
-    MTRClusterTestClusterAttributeOctetStringID = 0x00000019,
-    MTRClusterTestClusterAttributeListInt8uID = 0x0000001A,
-    MTRClusterTestClusterAttributeListOctetStringID = 0x0000001B,
-    MTRClusterTestClusterAttributeListStructOctetStringID = 0x0000001C,
-    MTRClusterTestClusterAttributeLongOctetStringID = 0x0000001D,
-    MTRClusterTestClusterAttributeCharStringID = 0x0000001E,
-    MTRClusterTestClusterAttributeLongCharStringID = 0x0000001F,
-    MTRClusterTestClusterAttributeEpochUsID = 0x00000020,
-    MTRClusterTestClusterAttributeEpochSID = 0x00000021,
-    MTRClusterTestClusterAttributeVendorIdID = 0x00000022,
-    MTRClusterTestClusterAttributeListNullablesAndOptionalsStructID = 0x00000023,
-    MTRClusterTestClusterAttributeEnumAttrID = 0x00000024,
-    MTRClusterTestClusterAttributeStructAttrID = 0x00000025,
-    MTRClusterTestClusterAttributeRangeRestrictedInt8uID = 0x00000026,
-    MTRClusterTestClusterAttributeRangeRestrictedInt8sID = 0x00000027,
-    MTRClusterTestClusterAttributeRangeRestrictedInt16uID = 0x00000028,
-    MTRClusterTestClusterAttributeRangeRestrictedInt16sID = 0x00000029,
-    MTRClusterTestClusterAttributeListLongOctetStringID = 0x0000002A,
-    MTRClusterTestClusterAttributeListFabricScopedID = 0x0000002B,
-    MTRClusterTestClusterAttributeTimedWriteBooleanID = 0x00000030,
-    MTRClusterTestClusterAttributeGeneralErrorBooleanID = 0x00000031,
-    MTRClusterTestClusterAttributeClusterErrorBooleanID = 0x00000032,
-    MTRClusterTestClusterAttributeUnsupportedID = 0x000000FF,
-    MTRClusterTestClusterAttributeNullableBooleanID = 0x00004000,
-    MTRClusterTestClusterAttributeNullableBitmap8ID = 0x00004001,
-    MTRClusterTestClusterAttributeNullableBitmap16ID = 0x00004002,
-    MTRClusterTestClusterAttributeNullableBitmap32ID = 0x00004003,
-    MTRClusterTestClusterAttributeNullableBitmap64ID = 0x00004004,
-    MTRClusterTestClusterAttributeNullableInt8uID = 0x00004005,
-    MTRClusterTestClusterAttributeNullableInt16uID = 0x00004006,
-    MTRClusterTestClusterAttributeNullableInt24uID = 0x00004007,
-    MTRClusterTestClusterAttributeNullableInt32uID = 0x00004008,
-    MTRClusterTestClusterAttributeNullableInt40uID = 0x00004009,
-    MTRClusterTestClusterAttributeNullableInt48uID = 0x0000400A,
-    MTRClusterTestClusterAttributeNullableInt56uID = 0x0000400B,
-    MTRClusterTestClusterAttributeNullableInt64uID = 0x0000400C,
-    MTRClusterTestClusterAttributeNullableInt8sID = 0x0000400D,
-    MTRClusterTestClusterAttributeNullableInt16sID = 0x0000400E,
-    MTRClusterTestClusterAttributeNullableInt24sID = 0x0000400F,
-    MTRClusterTestClusterAttributeNullableInt32sID = 0x00004010,
-    MTRClusterTestClusterAttributeNullableInt40sID = 0x00004011,
-    MTRClusterTestClusterAttributeNullableInt48sID = 0x00004012,
-    MTRClusterTestClusterAttributeNullableInt56sID = 0x00004013,
-    MTRClusterTestClusterAttributeNullableInt64sID = 0x00004014,
-    MTRClusterTestClusterAttributeNullableEnum8ID = 0x00004015,
-    MTRClusterTestClusterAttributeNullableEnum16ID = 0x00004016,
-    MTRClusterTestClusterAttributeNullableFloatSingleID = 0x00004017,
-    MTRClusterTestClusterAttributeNullableFloatDoubleID = 0x00004018,
-    MTRClusterTestClusterAttributeNullableOctetStringID = 0x00004019,
-    MTRClusterTestClusterAttributeNullableCharStringID = 0x0000401E,
-    MTRClusterTestClusterAttributeNullableEnumAttrID = 0x00004024,
-    MTRClusterTestClusterAttributeNullableStructID = 0x00004025,
-    MTRClusterTestClusterAttributeNullableRangeRestrictedInt8uID = 0x00004026,
-    MTRClusterTestClusterAttributeNullableRangeRestrictedInt8sID = 0x00004027,
-    MTRClusterTestClusterAttributeNullableRangeRestrictedInt16uID = 0x00004028,
-    MTRClusterTestClusterAttributeNullableRangeRestrictedInt16sID = 0x00004029,
-    MTRClusterTestClusterAttributeWriteOnlyInt8uID = 0x0000402A,
-    MTRClusterTestClusterAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID,
-    MTRClusterTestClusterAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID,
-    MTRClusterTestClusterAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID,
-    MTRClusterTestClusterAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID,
-    MTRClusterTestClusterAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID,
+    // Cluster UnitTesting attributes
+    MTRClusterUnitTestingAttributeBooleanID = 0x00000000,
+    MTRClusterUnitTestingAttributeBitmap8ID = 0x00000001,
+    MTRClusterUnitTestingAttributeBitmap16ID = 0x00000002,
+    MTRClusterUnitTestingAttributeBitmap32ID = 0x00000003,
+    MTRClusterUnitTestingAttributeBitmap64ID = 0x00000004,
+    MTRClusterUnitTestingAttributeInt8uID = 0x00000005,
+    MTRClusterUnitTestingAttributeInt16uID = 0x00000006,
+    MTRClusterUnitTestingAttributeInt24uID = 0x00000007,
+    MTRClusterUnitTestingAttributeInt32uID = 0x00000008,
+    MTRClusterUnitTestingAttributeInt40uID = 0x00000009,
+    MTRClusterUnitTestingAttributeInt48uID = 0x0000000A,
+    MTRClusterUnitTestingAttributeInt56uID = 0x0000000B,
+    MTRClusterUnitTestingAttributeInt64uID = 0x0000000C,
+    MTRClusterUnitTestingAttributeInt8sID = 0x0000000D,
+    MTRClusterUnitTestingAttributeInt16sID = 0x0000000E,
+    MTRClusterUnitTestingAttributeInt24sID = 0x0000000F,
+    MTRClusterUnitTestingAttributeInt32sID = 0x00000010,
+    MTRClusterUnitTestingAttributeInt40sID = 0x00000011,
+    MTRClusterUnitTestingAttributeInt48sID = 0x00000012,
+    MTRClusterUnitTestingAttributeInt56sID = 0x00000013,
+    MTRClusterUnitTestingAttributeInt64sID = 0x00000014,
+    MTRClusterUnitTestingAttributeEnum8ID = 0x00000015,
+    MTRClusterUnitTestingAttributeEnum16ID = 0x00000016,
+    MTRClusterUnitTestingAttributeFloatSingleID = 0x00000017,
+    MTRClusterUnitTestingAttributeFloatDoubleID = 0x00000018,
+    MTRClusterUnitTestingAttributeOctetStringID = 0x00000019,
+    MTRClusterUnitTestingAttributeListInt8uID = 0x0000001A,
+    MTRClusterUnitTestingAttributeListOctetStringID = 0x0000001B,
+    MTRClusterUnitTestingAttributeListStructOctetStringID = 0x0000001C,
+    MTRClusterUnitTestingAttributeLongOctetStringID = 0x0000001D,
+    MTRClusterUnitTestingAttributeCharStringID = 0x0000001E,
+    MTRClusterUnitTestingAttributeLongCharStringID = 0x0000001F,
+    MTRClusterUnitTestingAttributeEpochUsID = 0x00000020,
+    MTRClusterUnitTestingAttributeEpochSID = 0x00000021,
+    MTRClusterUnitTestingAttributeVendorIdID = 0x00000022,
+    MTRClusterUnitTestingAttributeListNullablesAndOptionalsStructID = 0x00000023,
+    MTRClusterUnitTestingAttributeEnumAttrID = 0x00000024,
+    MTRClusterUnitTestingAttributeStructAttrID = 0x00000025,
+    MTRClusterUnitTestingAttributeRangeRestrictedInt8uID = 0x00000026,
+    MTRClusterUnitTestingAttributeRangeRestrictedInt8sID = 0x00000027,
+    MTRClusterUnitTestingAttributeRangeRestrictedInt16uID = 0x00000028,
+    MTRClusterUnitTestingAttributeRangeRestrictedInt16sID = 0x00000029,
+    MTRClusterUnitTestingAttributeListLongOctetStringID = 0x0000002A,
+    MTRClusterUnitTestingAttributeListFabricScopedID = 0x0000002B,
+    MTRClusterUnitTestingAttributeTimedWriteBooleanID = 0x00000030,
+    MTRClusterUnitTestingAttributeGeneralErrorBooleanID = 0x00000031,
+    MTRClusterUnitTestingAttributeClusterErrorBooleanID = 0x00000032,
+    MTRClusterUnitTestingAttributeUnsupportedID = 0x000000FF,
+    MTRClusterUnitTestingAttributeNullableBooleanID = 0x00004000,
+    MTRClusterUnitTestingAttributeNullableBitmap8ID = 0x00004001,
+    MTRClusterUnitTestingAttributeNullableBitmap16ID = 0x00004002,
+    MTRClusterUnitTestingAttributeNullableBitmap32ID = 0x00004003,
+    MTRClusterUnitTestingAttributeNullableBitmap64ID = 0x00004004,
+    MTRClusterUnitTestingAttributeNullableInt8uID = 0x00004005,
+    MTRClusterUnitTestingAttributeNullableInt16uID = 0x00004006,
+    MTRClusterUnitTestingAttributeNullableInt24uID = 0x00004007,
+    MTRClusterUnitTestingAttributeNullableInt32uID = 0x00004008,
+    MTRClusterUnitTestingAttributeNullableInt40uID = 0x00004009,
+    MTRClusterUnitTestingAttributeNullableInt48uID = 0x0000400A,
+    MTRClusterUnitTestingAttributeNullableInt56uID = 0x0000400B,
+    MTRClusterUnitTestingAttributeNullableInt64uID = 0x0000400C,
+    MTRClusterUnitTestingAttributeNullableInt8sID = 0x0000400D,
+    MTRClusterUnitTestingAttributeNullableInt16sID = 0x0000400E,
+    MTRClusterUnitTestingAttributeNullableInt24sID = 0x0000400F,
+    MTRClusterUnitTestingAttributeNullableInt32sID = 0x00004010,
+    MTRClusterUnitTestingAttributeNullableInt40sID = 0x00004011,
+    MTRClusterUnitTestingAttributeNullableInt48sID = 0x00004012,
+    MTRClusterUnitTestingAttributeNullableInt56sID = 0x00004013,
+    MTRClusterUnitTestingAttributeNullableInt64sID = 0x00004014,
+    MTRClusterUnitTestingAttributeNullableEnum8ID = 0x00004015,
+    MTRClusterUnitTestingAttributeNullableEnum16ID = 0x00004016,
+    MTRClusterUnitTestingAttributeNullableFloatSingleID = 0x00004017,
+    MTRClusterUnitTestingAttributeNullableFloatDoubleID = 0x00004018,
+    MTRClusterUnitTestingAttributeNullableOctetStringID = 0x00004019,
+    MTRClusterUnitTestingAttributeNullableCharStringID = 0x0000401E,
+    MTRClusterUnitTestingAttributeNullableEnumAttrID = 0x00004024,
+    MTRClusterUnitTestingAttributeNullableStructID = 0x00004025,
+    MTRClusterUnitTestingAttributeNullableRangeRestrictedInt8uID = 0x00004026,
+    MTRClusterUnitTestingAttributeNullableRangeRestrictedInt8sID = 0x00004027,
+    MTRClusterUnitTestingAttributeNullableRangeRestrictedInt16uID = 0x00004028,
+    MTRClusterUnitTestingAttributeNullableRangeRestrictedInt16sID = 0x00004029,
+    MTRClusterUnitTestingAttributeWriteOnlyInt8uID = 0x0000402A,
+    MTRClusterUnitTestingAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID,
+    MTRClusterUnitTestingAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID,
+    MTRClusterUnitTestingAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID,
+    MTRClusterUnitTestingAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID,
+    MTRClusterUnitTestingAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID,
 
     // Cluster FaultInjection attributes
     MTRClusterFaultInjectionAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID,
@@ -1664,41 +1664,41 @@
     MTRClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID = 0x00000001,
     MTRClusterElectricalMeasurementCommandGetMeasurementProfileCommandID = 0x00000001,
 
-    // Cluster TestCluster commands
-    MTRClusterTestClusterCommandTestID = 0x00000000,
-    MTRClusterTestClusterCommandTestSpecificResponseID = 0x00000000,
-    MTRClusterTestClusterCommandTestNotHandledID = 0x00000001,
-    MTRClusterTestClusterCommandTestAddArgumentsResponseID = 0x00000001,
-    MTRClusterTestClusterCommandTestSpecificID = 0x00000002,
-    MTRClusterTestClusterCommandTestSimpleArgumentResponseID = 0x00000002,
-    MTRClusterTestClusterCommandTestUnknownCommandID = 0x00000003,
-    MTRClusterTestClusterCommandTestStructArrayArgumentResponseID = 0x00000003,
-    MTRClusterTestClusterCommandTestAddArgumentsID = 0x00000004,
-    MTRClusterTestClusterCommandTestListInt8UReverseResponseID = 0x00000004,
-    MTRClusterTestClusterCommandTestSimpleArgumentRequestID = 0x00000005,
-    MTRClusterTestClusterCommandTestEnumsResponseID = 0x00000005,
-    MTRClusterTestClusterCommandTestStructArrayArgumentRequestID = 0x00000006,
-    MTRClusterTestClusterCommandTestNullableOptionalResponseID = 0x00000006,
-    MTRClusterTestClusterCommandTestStructArgumentRequestID = 0x00000007,
-    MTRClusterTestClusterCommandTestComplexNullableOptionalResponseID = 0x00000007,
-    MTRClusterTestClusterCommandTestNestedStructArgumentRequestID = 0x00000008,
-    MTRClusterTestClusterCommandBooleanResponseID = 0x00000008,
-    MTRClusterTestClusterCommandTestListStructArgumentRequestID = 0x00000009,
-    MTRClusterTestClusterCommandSimpleStructResponseID = 0x00000009,
-    MTRClusterTestClusterCommandTestListInt8UArgumentRequestID = 0x0000000A,
-    MTRClusterTestClusterCommandTestEmitTestEventResponseID = 0x0000000A,
-    MTRClusterTestClusterCommandTestNestedStructListArgumentRequestID = 0x0000000B,
-    MTRClusterTestClusterCommandTestEmitTestFabricScopedEventResponseID = 0x0000000B,
-    MTRClusterTestClusterCommandTestListNestedStructListArgumentRequestID = 0x0000000C,
-    MTRClusterTestClusterCommandTestListInt8UReverseRequestID = 0x0000000D,
-    MTRClusterTestClusterCommandTestEnumsRequestID = 0x0000000E,
-    MTRClusterTestClusterCommandTestNullableOptionalRequestID = 0x0000000F,
-    MTRClusterTestClusterCommandTestComplexNullableOptionalRequestID = 0x00000010,
-    MTRClusterTestClusterCommandSimpleStructEchoRequestID = 0x00000011,
-    MTRClusterTestClusterCommandTimedInvokeRequestID = 0x00000012,
-    MTRClusterTestClusterCommandTestSimpleOptionalArgumentRequestID = 0x00000013,
-    MTRClusterTestClusterCommandTestEmitTestEventRequestID = 0x00000014,
-    MTRClusterTestClusterCommandTestEmitTestFabricScopedEventRequestID = 0x00000015,
+    // Cluster UnitTesting commands
+    MTRClusterUnitTestingCommandTestID = 0x00000000,
+    MTRClusterUnitTestingCommandTestSpecificResponseID = 0x00000000,
+    MTRClusterUnitTestingCommandTestNotHandledID = 0x00000001,
+    MTRClusterUnitTestingCommandTestAddArgumentsResponseID = 0x00000001,
+    MTRClusterUnitTestingCommandTestSpecificID = 0x00000002,
+    MTRClusterUnitTestingCommandTestSimpleArgumentResponseID = 0x00000002,
+    MTRClusterUnitTestingCommandTestUnknownCommandID = 0x00000003,
+    MTRClusterUnitTestingCommandTestStructArrayArgumentResponseID = 0x00000003,
+    MTRClusterUnitTestingCommandTestAddArgumentsID = 0x00000004,
+    MTRClusterUnitTestingCommandTestListInt8UReverseResponseID = 0x00000004,
+    MTRClusterUnitTestingCommandTestSimpleArgumentRequestID = 0x00000005,
+    MTRClusterUnitTestingCommandTestEnumsResponseID = 0x00000005,
+    MTRClusterUnitTestingCommandTestStructArrayArgumentRequestID = 0x00000006,
+    MTRClusterUnitTestingCommandTestNullableOptionalResponseID = 0x00000006,
+    MTRClusterUnitTestingCommandTestStructArgumentRequestID = 0x00000007,
+    MTRClusterUnitTestingCommandTestComplexNullableOptionalResponseID = 0x00000007,
+    MTRClusterUnitTestingCommandTestNestedStructArgumentRequestID = 0x00000008,
+    MTRClusterUnitTestingCommandBooleanResponseID = 0x00000008,
+    MTRClusterUnitTestingCommandTestListStructArgumentRequestID = 0x00000009,
+    MTRClusterUnitTestingCommandSimpleStructResponseID = 0x00000009,
+    MTRClusterUnitTestingCommandTestListInt8UArgumentRequestID = 0x0000000A,
+    MTRClusterUnitTestingCommandTestEmitTestEventResponseID = 0x0000000A,
+    MTRClusterUnitTestingCommandTestNestedStructListArgumentRequestID = 0x0000000B,
+    MTRClusterUnitTestingCommandTestEmitTestFabricScopedEventResponseID = 0x0000000B,
+    MTRClusterUnitTestingCommandTestListNestedStructListArgumentRequestID = 0x0000000C,
+    MTRClusterUnitTestingCommandTestListInt8UReverseRequestID = 0x0000000D,
+    MTRClusterUnitTestingCommandTestEnumsRequestID = 0x0000000E,
+    MTRClusterUnitTestingCommandTestNullableOptionalRequestID = 0x0000000F,
+    MTRClusterUnitTestingCommandTestComplexNullableOptionalRequestID = 0x00000010,
+    MTRClusterUnitTestingCommandSimpleStructEchoRequestID = 0x00000011,
+    MTRClusterUnitTestingCommandTimedInvokeRequestID = 0x00000012,
+    MTRClusterUnitTestingCommandTestSimpleOptionalArgumentRequestID = 0x00000013,
+    MTRClusterUnitTestingCommandTestEmitTestEventRequestID = 0x00000014,
+    MTRClusterUnitTestingCommandTestEmitTestFabricScopedEventRequestID = 0x00000015,
 
     // Cluster FaultInjection commands
     MTRClusterFaultInjectionCommandFailAtFaultID = 0x00000000,
@@ -1790,8 +1790,8 @@
     MTRClusterPumpConfigurationAndControlEventAirDetectionID = 0x0000000F,
     MTRClusterPumpConfigurationAndControlEventTurbineOperationID = 0x00000010,
 
-    // Cluster TestCluster events
-    MTRClusterTestClusterEventTestEventID = 0x00000001,
-    MTRClusterTestClusterEventTestFabricScopedEventID = 0x00000002,
+    // Cluster UnitTesting events
+    MTRClusterUnitTestingEventTestEventID = 0x00000001,
+    MTRClusterUnitTestingEventTestFabricScopedEventID = 0x00000002,
 
 };
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 0d60afe..9dbe711 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -4595,146 +4595,146 @@
 @end
 
 /**
- * Cluster Test Cluster
+ * Cluster Unit Testing
  *    The Test Cluster is meant to validate the generated code
  */
-@interface MTRClusterTestCluster : MTRCluster
+@interface MTRClusterUnitTesting : MTRCluster
 
 - (instancetype _Nullable)initWithDevice:(MTRDevice *)device
                               endpointID:(NSNumber *)endpointID
                                    queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE;
 
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params
            expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)testWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
          expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                     completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                       completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)testNotHandledWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                    expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                               completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
          expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                    completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+                    completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 - (void)testSpecificWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                  expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                            completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+                            completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                            NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                           completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)testUnknownCommandWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                   completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                        completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+                        completion:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                       expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                 completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+                                 completion:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                       completion:
-                                          (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                          (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                       expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                 completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                 completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
                                    expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                             expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                       completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                       completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
                                  expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                           expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                     completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                     completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
                                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                          expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                    completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                    completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
                                        expectedValues:
                                            (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                 expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                           completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                           completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
                                            expectedValues:
                                                (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                               completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                               completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                         expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                   completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+                                   completion:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                        completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+                        completion:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                         expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                   completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+                                   completion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 - (void)
-    testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+    testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                       completion:
-                                          (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                          (void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
                            expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                               completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+                               completion:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                           completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
 - (void)timedInvokeRequestWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                   completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                      expectedValues:
                                          (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                               expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                          completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE;
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
                             expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                      expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+                                completion:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 - (void)
-    testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+    testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                     expectedValues:
                                         (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                         completion:
                                             (void (^)(
-                                                MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                                MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
 
 - (NSDictionary<NSString *, id> *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params;
@@ -5304,15 +5304,12 @@
                                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                                       params:(MTRWriteParams * _Nullable)params;
 
-- (NSDictionary<NSString *, id> *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2));
+- (NSDictionary<NSString *, id> *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params;
+- (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary<NSString *, id> *)dataValueDictionary
+                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs;
 - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary<NSString *, id> *)dataValueDictionary
                         expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2));
-- (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary<NSString *, id> *)dataValueDictionary
-                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                       params:(MTRWriteParams * _Nullable)params
-    API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2));
+                                       params:(MTRWriteParams * _Nullable)params;
 
 - (NSDictionary<NSString *, id> *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params;
 
@@ -6853,13 +6850,13 @@
     MTR_NEWLY_DEPRECATED("Please use getMeasurementProfileCommandWithParams:expectedValues:expectedValueIntervalMs:completion:");
 @end
 
-@interface MTRClusterTestCluster (Deprecated)
+@interface MTRClusterUnitTesting (Deprecated)
 
 - (nullable instancetype)initWithDevice:(MTRDevice *)device
                                endpoint:(uint16_t)endpoint
                                   queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:");
 
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params
            expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
         completionHandler:(MTRStatusCompletion)completionHandler
@@ -6868,7 +6865,7 @@
          expectedValueInterval:(NSNumber *)expectedValueIntervalMs
              completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testWithExpectedValues:expectedValueIntervalMs:completion:");
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                completionHandler:(MTRStatusCompletion)completionHandler
@@ -6877,18 +6874,18 @@
                    expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                        completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNotHandledWithExpectedValues:expectedValueIntervalMs:completion:");
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
          expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-             completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+             completionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSpecificWithParams:expectedValues:expectedValueIntervalMs:completion:");
 - (void)testSpecificWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                  expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                     completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+                     completionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                            NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSpecificWithExpectedValues:expectedValueIntervalMs:completion:");
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                    completionHandler:(MTRStatusCompletion)completionHandler
@@ -6897,100 +6894,100 @@
                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                            completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithExpectedValues:expectedValueIntervalMs:completion:");
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                 completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testAddArgumentsWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                       expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                          completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+                          completionHandler:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testSimpleArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                completionHandler:
-                                   (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                   (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testStructArrayArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                       expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                          completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                          completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testStructArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
                                    expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                             expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNestedStructArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
                                  expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                           expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                              completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                              completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListStructArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
                                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                          expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                             completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                             completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListInt8UArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
                                        expectedValues:
                                            (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                 expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                    completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                    completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED(
         "Please use testNestedStructListArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
                                            expectedValues:
                                                (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                        completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                        completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED(
         "Please use testListNestedStructListArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                         expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                            completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testListInt8UReverseRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                 completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testEnumsRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                         expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                            completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testNullableOptionalRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                       expectedValues:
                                           (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                    completionHandler:
-                                       (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                       (void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                            NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED(
         "Please use testComplexNullableOptionalRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
                            expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                        completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+                        completionHandler:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use simpleStructEchoRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                    completionHandler:(MTRStatusCompletion)completionHandler
@@ -6999,26 +6996,26 @@
                        expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                            completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithExpectedValues:expectedValueIntervalMs:completion:");
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                      expectedValues:
                                          (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                               expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                   completionHandler:(MTRStatusCompletion)completionHandler
     MTR_NEWLY_DEPRECATED(
         "Please use testSimpleOptionalArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
                             expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                      expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                         completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+                         completionHandler:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED("Please use testEmitTestEventRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
-- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                         expectedValues:
                                             (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                  expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                      completionHandler:
                                          (void (^)(
-                                             MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                             MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                              NSError * _Nullable error))completionHandler
     MTR_NEWLY_DEPRECATED(
         "Please use testEmitTestFabricScopedEventRequestWithParams:expectedValues:expectedValueIntervalMs:completion:");
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index 5055f41..9216de3 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -23418,7 +23418,7 @@
 }
 @end
 
-@implementation MTRClusterTestCluster
+@implementation MTRClusterUnitTesting
 
 - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue
 {
@@ -23439,7 +23439,7 @@
 {
     [self testWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion];
 }
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params
            expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
     expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                completion:(MTRStatusCompletion)completion
@@ -23464,12 +23464,12 @@
                 MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::Test::Type request;
+                UnitTesting::Commands::Test::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -23496,7 +23496,7 @@
              expectedValueInterval:expectedValueIntervalMs
                         completion:completion];
 }
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
            expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                       completion:(MTRStatusCompletion)completion
@@ -23521,12 +23521,12 @@
                 MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestNotHandled::Type request;
+                UnitTesting::Commands::TestNotHandled::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -23546,7 +23546,7 @@
 
 - (void)testSpecificWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                  expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                            completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+                            completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                            NSError * _Nullable error))completion
 {
     [self testSpecificWithParams:nil
@@ -23554,10 +23554,10 @@
            expectedValueInterval:expectedValueIntervalMs
                       completion:completion];
 }
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
          expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                    completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+                    completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -23570,18 +23570,18 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestSpecificResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestSpecific::Type request;
+                UnitTesting::Commands::TestSpecific::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -23608,7 +23608,7 @@
                  expectedValueInterval:expectedValueIntervalMs
                             completion:completion];
 }
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                           completion:(MTRStatusCompletion)completion
@@ -23633,12 +23633,12 @@
                 MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestUnknownCommand::Type request;
+                UnitTesting::Commands::TestUnknownCommand::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -23656,10 +23656,10 @@
     }
 }
 
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
              expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                        completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+                        completion:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -23672,20 +23672,20 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestAddArguments::Type request;
+                UnitTesting::Commands::TestAddArguments::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
                 request.arg1 = params.arg1.unsignedCharValue;
                 request.arg2 = params.arg2.unsignedCharValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -23703,10 +23703,10 @@
     }
 }
 
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                       expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                 completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+                                 completion:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -23719,19 +23719,19 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestSimpleArgumentRequest::Type request;
+                UnitTesting::Commands::TestSimpleArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
                 request.arg1 = params.arg1.boolValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -23749,11 +23749,11 @@
     }
 }
 
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                            expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                       completion:
-                                          (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                          (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -23766,13 +23766,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestStructArrayArgumentRequest::Type request;
+                UnitTesting::Commands::TestStructArrayArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -23786,11 +23786,11 @@
                         }
                         listFreer.add(listHolder_0);
                         for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) {
-                            if (![params.arg1[i_0] isKindOfClass:[MTRTestClusterClusterNestedStructList class]]) {
+                            if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) {
                                 // Wrong kind of value.
                                 return CHIP_ERROR_INVALID_ARGUMENT;
                             }
-                            auto element_0 = (MTRTestClusterClusterNestedStructList *) params.arg1[i_0];
+                            auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0];
                             listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                             listHolder_0->mList[i_0].b = element_0.b.boolValue;
                             listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue;
@@ -23815,11 +23815,11 @@
                                     }
                                     listFreer.add(listHolder_2);
                                     for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) {
-                                        if (![element_0.d[i_2] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                                        if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                             // Wrong kind of value.
                                             return CHIP_ERROR_INVALID_ARGUMENT;
                                         }
-                                        auto element_2 = (MTRTestClusterClusterSimpleStruct *) element_0.d[i_2];
+                                        auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2];
                                         listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue;
                                         listHolder_2->mList[i_2].b = element_2.b.boolValue;
                                         listHolder_2->mList[i_2].c
@@ -23920,11 +23920,11 @@
                         }
                         listFreer.add(listHolder_0);
                         for (size_t i_0 = 0; i_0 < params.arg2.count; ++i_0) {
-                            if (![params.arg2[i_0] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                            if (![params.arg2[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                 // Wrong kind of value.
                                 return CHIP_ERROR_INVALID_ARGUMENT;
                             }
-                            auto element_0 = (MTRTestClusterClusterSimpleStruct *) params.arg2[i_0];
+                            auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg2[i_0];
                             listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                             listHolder_0->mList[i_0].b = element_0.b.boolValue;
                             listHolder_0->mList[i_0].c = static_cast<std::remove_reference_t<decltype(listHolder_0->mList[i_0].c)>>(
@@ -23989,7 +23989,7 @@
                 request.arg5 = static_cast<std::remove_reference_t<decltype(request.arg5)>>(params.arg5.unsignedCharValue);
                 request.arg6 = params.arg6.boolValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24007,10 +24007,10 @@
     }
 }
 
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                       expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                 completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                 completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24023,13 +24023,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestStructArgumentRequest::Type request;
+                UnitTesting::Commands::TestStructArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24042,7 +24042,7 @@
                 request.arg1.g = params.arg1.g.floatValue;
                 request.arg1.h = params.arg1.h.doubleValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24060,10 +24060,10 @@
     }
 }
 
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
                                    expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                             expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                       completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                       completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24076,13 +24076,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestNestedStructArgumentRequest::Type request;
+                UnitTesting::Commands::TestNestedStructArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24099,7 +24099,7 @@
                 request.arg1.c.g = params.arg1.c.g.floatValue;
                 request.arg1.c.h = params.arg1.c.h.doubleValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24117,10 +24117,10 @@
     }
 }
 
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
                                  expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                           expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                     completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                     completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24133,13 +24133,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestListStructArgumentRequest::Type request;
+                UnitTesting::Commands::TestListStructArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24153,11 +24153,11 @@
                         }
                         listFreer.add(listHolder_0);
                         for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) {
-                            if (![params.arg1[i_0] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                            if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                 // Wrong kind of value.
                                 return CHIP_ERROR_INVALID_ARGUMENT;
                             }
-                            auto element_0 = (MTRTestClusterClusterSimpleStruct *) params.arg1[i_0];
+                            auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg1[i_0];
                             listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                             listHolder_0->mList[i_0].b = element_0.b.boolValue;
                             listHolder_0->mList[i_0].c = static_cast<std::remove_reference_t<decltype(listHolder_0->mList[i_0].c)>>(
@@ -24175,7 +24175,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24193,10 +24193,10 @@
     }
 }
 
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
                                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                          expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                    completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                    completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24209,13 +24209,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestListInt8UArgumentRequest::Type request;
+                UnitTesting::Commands::TestListInt8UArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24242,7 +24242,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24260,10 +24260,10 @@
     }
 }
 
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
                                        expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                                 expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                           completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                           completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24276,13 +24276,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestNestedStructListArgumentRequest::Type request;
+                UnitTesting::Commands::TestNestedStructListArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24308,11 +24308,11 @@
                         }
                         listFreer.add(listHolder_1);
                         for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) {
-                            if (![params.arg1.d[i_1] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                            if (![params.arg1.d[i_1] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                 // Wrong kind of value.
                                 return CHIP_ERROR_INVALID_ARGUMENT;
                             }
-                            auto element_1 = (MTRTestClusterClusterSimpleStruct *) params.arg1.d[i_1];
+                            auto element_1 = (MTRUnitTestingClusterSimpleStruct *) params.arg1.d[i_1];
                             listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue;
                             listHolder_1->mList[i_1].b = element_1.b.boolValue;
                             listHolder_1->mList[i_1].c = static_cast<std::remove_reference_t<decltype(listHolder_1->mList[i_1].c)>>(
@@ -24396,7 +24396,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24415,10 +24415,10 @@
 }
 
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
                                            expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                                     expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                               completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                               completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24431,13 +24431,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request;
+                UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24451,11 +24451,11 @@
                         }
                         listFreer.add(listHolder_0);
                         for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) {
-                            if (![params.arg1[i_0] isKindOfClass:[MTRTestClusterClusterNestedStructList class]]) {
+                            if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) {
                                 // Wrong kind of value.
                                 return CHIP_ERROR_INVALID_ARGUMENT;
                             }
-                            auto element_0 = (MTRTestClusterClusterNestedStructList *) params.arg1[i_0];
+                            auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0];
                             listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue;
                             listHolder_0->mList[i_0].b = element_0.b.boolValue;
                             listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue;
@@ -24480,11 +24480,11 @@
                                     }
                                     listFreer.add(listHolder_2);
                                     for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) {
-                                        if (![element_0.d[i_2] isKindOfClass:[MTRTestClusterClusterSimpleStruct class]]) {
+                                        if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) {
                                             // Wrong kind of value.
                                             return CHIP_ERROR_INVALID_ARGUMENT;
                                         }
-                                        auto element_2 = (MTRTestClusterClusterSimpleStruct *) element_0.d[i_2];
+                                        auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2];
                                         listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue;
                                         listHolder_2->mList[i_2].b = element_2.b.boolValue;
                                         listHolder_2->mList[i_2].c
@@ -24576,7 +24576,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24594,10 +24594,10 @@
     }
 }
 
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                         expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                   completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+                                   completion:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24610,13 +24610,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestListInt8UReverseRequest::Type request;
+                UnitTesting::Commands::TestListInt8UReverseRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24643,7 +24643,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24661,10 +24661,10 @@
     }
 }
 
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
              expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                        completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+                        completion:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24677,20 +24677,20 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestEnumsResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestEnumsRequest::Type request;
+                UnitTesting::Commands::TestEnumsRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
                 request.arg1 = static_cast<std::remove_reference_t<decltype(request.arg1)>>(params.arg1.unsignedShortValue);
                 request.arg2 = static_cast<std::remove_reference_t<decltype(request.arg2)>>(params.arg2.unsignedCharValue);
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24708,10 +24708,10 @@
     }
 }
 
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                         expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                   completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+                                   completion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24724,13 +24724,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestNullableOptionalRequest::Type request;
+                UnitTesting::Commands::TestNullableOptionalRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24746,7 +24746,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24764,12 +24764,12 @@
     }
 }
 
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                                expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                           completion:
                                               (void (^)(
-                                                  MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                                  MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24782,13 +24782,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestComplexNullableOptionalRequest::Type request;
+                UnitTesting::Commands::TestComplexNullableOptionalRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -24963,7 +24963,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -24981,10 +24981,10 @@
     }
 }
 
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
                            expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                     expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                               completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+                               completion:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -24997,13 +24997,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterSimpleStructResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::SimpleStructEchoRequest::Type request;
+                UnitTesting::Commands::SimpleStructEchoRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -25016,7 +25016,7 @@
                 request.arg1.g = params.arg1.g.floatValue;
                 request.arg1.h = params.arg1.h.doubleValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -25043,7 +25043,7 @@
                  expectedValueInterval:expectedValueIntervalMs
                             completion:completion];
 }
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                           completion:(MTRStatusCompletion)completion
@@ -25068,7 +25068,7 @@
                 MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TimedInvokeRequest::Type request;
+                UnitTesting::Commands::TimedInvokeRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -25076,7 +25076,7 @@
                     timedInvokeTimeoutMs.SetValue(10000);
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -25094,7 +25094,7 @@
     }
 }
 
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                      expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                               expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                          completion:(MTRStatusCompletion)completion
@@ -25119,7 +25119,7 @@
                 MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request;
+                UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -25130,7 +25130,7 @@
                     }
                 }
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -25148,10 +25148,10 @@
     }
 }
 
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
                             expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                      expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                                completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+                                completion:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -25164,13 +25164,13 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestEmitTestEventRequest::Type request;
+                UnitTesting::Commands::TestEmitTestEventRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
@@ -25178,7 +25178,7 @@
                 request.arg2 = static_cast<std::remove_reference_t<decltype(request.arg2)>>(params.arg2.unsignedCharValue);
                 request.arg3 = params.arg3.boolValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -25197,12 +25197,12 @@
 }
 
 - (void)
-    testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+    testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                              expectedValueInterval:(NSNumber *)expectedValueIntervalMs
                                         completion:
                                             (void (^)(
-                                                MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                                MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completion
 {
     // Make a copy of params before we go async.
@@ -25215,19 +25215,19 @@
     MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) {
         MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID
                                                                 controller:self.device.deviceController];
-        auto * bridge = new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, completion,
+        auto * bridge = new MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, completion,
             ^(ExchangeManager & exchangeManager, const SessionHandle & session,
-                TestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb,
+                UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb,
                 MTRCallbackBridgeBase * bridge) {
                 chip::Optional<uint16_t> timedInvokeTimeoutMs;
                 ListFreer listFreer;
-                TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type request;
+                UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type request;
                 if (timedInvokeTimeoutMsParam != nil) {
                     timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue);
                 }
                 request.arg1 = params.arg1.unsignedCharValue;
 
-                chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint);
+                chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint);
                 return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs);
             });
         std::move(*bridge).DispatchAction(baseDevice);
@@ -25248,8 +25248,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeBooleanID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeBooleanID)
                                              params:params];
 }
 
@@ -25265,8 +25265,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeBooleanID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeBooleanID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25275,8 +25275,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeBitmap8WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeBitmap8ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeBitmap8ID)
                                              params:params];
 }
 
@@ -25292,8 +25292,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeBitmap8ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeBitmap8ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25302,8 +25302,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeBitmap16WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeBitmap16ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeBitmap16ID)
                                              params:params];
 }
 
@@ -25319,8 +25319,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeBitmap16ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeBitmap16ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25329,8 +25329,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeBitmap32WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeBitmap32ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeBitmap32ID)
                                              params:params];
 }
 
@@ -25346,8 +25346,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeBitmap32ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeBitmap32ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25356,8 +25356,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeBitmap64WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeBitmap64ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeBitmap64ID)
                                              params:params];
 }
 
@@ -25373,8 +25373,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeBitmap64ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeBitmap64ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25383,8 +25383,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt8uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt8uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt8uID)
                                              params:params];
 }
 
@@ -25400,8 +25400,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt8uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt8uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25410,8 +25410,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt16uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt16uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt16uID)
                                              params:params];
 }
 
@@ -25427,8 +25427,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt16uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt16uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25437,8 +25437,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt24uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt24uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt24uID)
                                              params:params];
 }
 
@@ -25454,8 +25454,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt24uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt24uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25464,8 +25464,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt32uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt32uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt32uID)
                                              params:params];
 }
 
@@ -25481,8 +25481,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt32uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt32uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25491,8 +25491,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt40uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt40uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt40uID)
                                              params:params];
 }
 
@@ -25508,8 +25508,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt40uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt40uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25518,8 +25518,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt48uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt48uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt48uID)
                                              params:params];
 }
 
@@ -25535,8 +25535,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt48uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt48uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25545,8 +25545,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt56uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt56uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt56uID)
                                              params:params];
 }
 
@@ -25562,8 +25562,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt56uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt56uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25572,8 +25572,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt64uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt64uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt64uID)
                                              params:params];
 }
 
@@ -25589,8 +25589,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt64uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt64uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25599,8 +25599,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt8sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt8sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt8sID)
                                              params:params];
 }
 
@@ -25616,8 +25616,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt8sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt8sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25626,8 +25626,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt16sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt16sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt16sID)
                                              params:params];
 }
 
@@ -25643,8 +25643,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt16sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt16sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25653,8 +25653,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt24sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt24sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt24sID)
                                              params:params];
 }
 
@@ -25670,8 +25670,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt24sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt24sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25680,8 +25680,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt32sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt32sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt32sID)
                                              params:params];
 }
 
@@ -25697,8 +25697,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt32sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt32sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25707,8 +25707,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt40sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt40sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt40sID)
                                              params:params];
 }
 
@@ -25724,8 +25724,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt40sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt40sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25734,8 +25734,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt48sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt48sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt48sID)
                                              params:params];
 }
 
@@ -25751,8 +25751,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt48sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt48sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25761,8 +25761,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt56sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt56sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt56sID)
                                              params:params];
 }
 
@@ -25778,8 +25778,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt56sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt56sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25788,8 +25788,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeInt64sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeInt64sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeInt64sID)
                                              params:params];
 }
 
@@ -25805,8 +25805,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeInt64sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeInt64sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25815,8 +25815,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeEnum8WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeEnum8ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeEnum8ID)
                                              params:params];
 }
 
@@ -25832,8 +25832,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeEnum8ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeEnum8ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25842,8 +25842,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeEnum16WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeEnum16ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeEnum16ID)
                                              params:params];
 }
 
@@ -25859,8 +25859,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeEnum16ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeEnum16ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25869,8 +25869,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeFloatSingleWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeFloatSingleID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeFloatSingleID)
                                              params:params];
 }
 
@@ -25886,8 +25886,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeFloatSingleID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeFloatSingleID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25896,8 +25896,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeFloatDoubleWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeFloatDoubleID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeFloatDoubleID)
                                              params:params];
 }
 
@@ -25913,8 +25913,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeFloatDoubleID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeFloatDoubleID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25923,8 +25923,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeOctetStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeOctetStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeOctetStringID)
                                              params:params];
 }
 
@@ -25940,8 +25940,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeOctetStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeOctetStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25950,8 +25950,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeListInt8uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeListInt8uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeListInt8uID)
                                              params:params];
 }
 
@@ -25967,8 +25967,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeListInt8uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeListInt8uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -25977,8 +25977,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeListOctetStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeListOctetStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeListOctetStringID)
                                              params:params];
 }
 
@@ -25994,8 +25994,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeListOctetStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeListOctetStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26004,8 +26004,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeListStructOctetStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeListStructOctetStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeListStructOctetStringID)
                                              params:params];
 }
 
@@ -26023,8 +26023,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeListStructOctetStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeListStructOctetStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26033,8 +26033,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeLongOctetStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeLongOctetStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeLongOctetStringID)
                                              params:params];
 }
 
@@ -26050,8 +26050,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeLongOctetStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeLongOctetStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26060,8 +26060,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeCharStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeCharStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeCharStringID)
                                              params:params];
 }
 
@@ -26077,8 +26077,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeCharStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeCharStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26087,8 +26087,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeLongCharStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeLongCharStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeLongCharStringID)
                                              params:params];
 }
 
@@ -26104,8 +26104,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeLongCharStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeLongCharStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26114,8 +26114,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeEpochUsWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeEpochUsID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeEpochUsID)
                                              params:params];
 }
 
@@ -26131,8 +26131,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeEpochUsID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeEpochUsID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26141,8 +26141,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeEpochSWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeEpochSID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeEpochSID)
                                              params:params];
 }
 
@@ -26158,8 +26158,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeEpochSID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeEpochSID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26168,8 +26168,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeVendorIdWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeVendorIdID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeVendorIdID)
                                              params:params];
 }
 
@@ -26185,8 +26185,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeVendorIdID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeVendorIdID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26195,8 +26195,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeListNullablesAndOptionalsStructWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeListNullablesAndOptionalsStructID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeListNullablesAndOptionalsStructID)
                                              params:params];
 }
 
@@ -26214,8 +26214,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeListNullablesAndOptionalsStructID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeListNullablesAndOptionalsStructID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26224,8 +26224,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeEnumAttrWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeEnumAttrID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeEnumAttrID)
                                              params:params];
 }
 
@@ -26241,8 +26241,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeEnumAttrID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeEnumAttrID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26251,8 +26251,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeStructAttrWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeStructAttrID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeStructAttrID)
                                              params:params];
 }
 
@@ -26268,8 +26268,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeStructAttrID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeStructAttrID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26278,8 +26278,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt8uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt8uID)
                                              params:params];
 }
 
@@ -26295,8 +26295,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt8uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt8uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26305,8 +26305,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt8sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt8sID)
                                              params:params];
 }
 
@@ -26322,8 +26322,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt8sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt8sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26332,8 +26332,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt16uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt16uID)
                                              params:params];
 }
 
@@ -26351,8 +26351,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt16uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt16uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26361,8 +26361,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt16sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt16sID)
                                              params:params];
 }
 
@@ -26380,8 +26380,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt16sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeRangeRestrictedInt16sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26390,8 +26390,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeListLongOctetStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeListLongOctetStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeListLongOctetStringID)
                                              params:params];
 }
 
@@ -26407,8 +26407,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeListLongOctetStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeListLongOctetStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26417,8 +26417,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeListFabricScopedID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeListFabricScopedID)
                                              params:params];
 }
 
@@ -26434,8 +26434,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeListFabricScopedID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeListFabricScopedID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26444,8 +26444,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeTimedWriteBooleanWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeTimedWriteBooleanID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeTimedWriteBooleanID)
                                              params:params];
 }
 
@@ -26461,8 +26461,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeTimedWriteBooleanID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeTimedWriteBooleanID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26471,8 +26471,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeGeneralErrorBooleanWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeGeneralErrorBooleanID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeGeneralErrorBooleanID)
                                              params:params];
 }
 
@@ -26488,8 +26488,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeGeneralErrorBooleanID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeGeneralErrorBooleanID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26498,8 +26498,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeClusterErrorBooleanWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeClusterErrorBooleanID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeClusterErrorBooleanID)
                                              params:params];
 }
 
@@ -26515,8 +26515,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeClusterErrorBooleanID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeClusterErrorBooleanID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26525,8 +26525,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeUnsupportedWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeUnsupportedID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeUnsupportedID)
                                              params:params];
 }
 
@@ -26542,8 +26542,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeUnsupportedID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeUnsupportedID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26552,8 +26552,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableBooleanID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableBooleanID)
                                              params:params];
 }
 
@@ -26569,8 +26569,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableBooleanID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableBooleanID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26579,8 +26579,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableBitmap8WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableBitmap8ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap8ID)
                                              params:params];
 }
 
@@ -26596,8 +26596,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableBitmap8ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap8ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26606,8 +26606,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableBitmap16WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableBitmap16ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap16ID)
                                              params:params];
 }
 
@@ -26623,8 +26623,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableBitmap16ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap16ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26633,8 +26633,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableBitmap32WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableBitmap32ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap32ID)
                                              params:params];
 }
 
@@ -26650,8 +26650,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableBitmap32ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap32ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26660,8 +26660,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableBitmap64WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableBitmap64ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap64ID)
                                              params:params];
 }
 
@@ -26677,8 +26677,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableBitmap64ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableBitmap64ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26687,8 +26687,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt8uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt8uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt8uID)
                                              params:params];
 }
 
@@ -26704,8 +26704,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt8uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt8uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26714,8 +26714,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt16uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt16uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt16uID)
                                              params:params];
 }
 
@@ -26731,8 +26731,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt16uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt16uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26741,8 +26741,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt24uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt24uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt24uID)
                                              params:params];
 }
 
@@ -26758,8 +26758,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt24uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt24uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26768,8 +26768,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt32uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt32uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt32uID)
                                              params:params];
 }
 
@@ -26785,8 +26785,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt32uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt32uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26795,8 +26795,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt40uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt40uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt40uID)
                                              params:params];
 }
 
@@ -26812,8 +26812,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt40uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt40uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26822,8 +26822,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt48uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt48uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt48uID)
                                              params:params];
 }
 
@@ -26839,8 +26839,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt48uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt48uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26849,8 +26849,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt56uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt56uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt56uID)
                                              params:params];
 }
 
@@ -26866,8 +26866,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt56uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt56uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26876,8 +26876,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt64uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt64uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt64uID)
                                              params:params];
 }
 
@@ -26893,8 +26893,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt64uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt64uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26903,8 +26903,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt8sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt8sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt8sID)
                                              params:params];
 }
 
@@ -26920,8 +26920,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt8sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt8sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26930,8 +26930,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt16sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt16sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt16sID)
                                              params:params];
 }
 
@@ -26947,8 +26947,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt16sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt16sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26957,8 +26957,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt24sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt24sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt24sID)
                                              params:params];
 }
 
@@ -26974,8 +26974,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt24sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt24sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -26984,8 +26984,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt32sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt32sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt32sID)
                                              params:params];
 }
 
@@ -27001,8 +27001,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt32sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt32sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27011,8 +27011,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt40sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt40sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt40sID)
                                              params:params];
 }
 
@@ -27028,8 +27028,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt40sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt40sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27038,8 +27038,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt48sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt48sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt48sID)
                                              params:params];
 }
 
@@ -27055,8 +27055,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt48sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt48sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27065,8 +27065,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt56sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt56sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt56sID)
                                              params:params];
 }
 
@@ -27082,8 +27082,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt56sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt56sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27092,8 +27092,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableInt64sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableInt64sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableInt64sID)
                                              params:params];
 }
 
@@ -27109,8 +27109,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableInt64sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableInt64sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27119,8 +27119,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableEnum8WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableEnum8ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableEnum8ID)
                                              params:params];
 }
 
@@ -27136,8 +27136,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableEnum8ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableEnum8ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27146,8 +27146,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableEnum16WithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableEnum16ID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableEnum16ID)
                                              params:params];
 }
 
@@ -27163,8 +27163,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableEnum16ID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableEnum16ID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27173,8 +27173,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableFloatSingleWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableFloatSingleID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableFloatSingleID)
                                              params:params];
 }
 
@@ -27190,8 +27190,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableFloatSingleID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableFloatSingleID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27200,8 +27200,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableFloatDoubleWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableFloatDoubleID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableFloatDoubleID)
                                              params:params];
 }
 
@@ -27217,8 +27217,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableFloatDoubleID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableFloatDoubleID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27227,8 +27227,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableOctetStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableOctetStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableOctetStringID)
                                              params:params];
 }
 
@@ -27244,8 +27244,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableOctetStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableOctetStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27254,8 +27254,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableCharStringWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableCharStringID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableCharStringID)
                                              params:params];
 }
 
@@ -27271,8 +27271,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableCharStringID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableCharStringID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27281,8 +27281,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableEnumAttrWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableEnumAttrID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableEnumAttrID)
                                              params:params];
 }
 
@@ -27298,8 +27298,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableEnumAttrID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableEnumAttrID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27308,8 +27308,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableStructWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableStructID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableStructID)
                                              params:params];
 }
 
@@ -27325,8 +27325,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableStructID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableStructID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27335,8 +27335,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt8uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt8uID)
                                              params:params];
 }
 
@@ -27354,8 +27354,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt8uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt8uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27364,8 +27364,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt8sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt8sID)
                                              params:params];
 }
 
@@ -27383,8 +27383,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt8sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt8sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27393,8 +27393,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt16uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt16uID)
                                              params:params];
 }
 
@@ -27412,8 +27412,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt16uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt16uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27422,8 +27422,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeNullableRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt16sID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt16sID)
                                              params:params];
 }
 
@@ -27441,8 +27441,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt16sID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeNullableRangeRestrictedInt16sID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27451,8 +27451,8 @@
 - (NSDictionary<NSString *, id> *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeWriteOnlyInt8uID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeWriteOnlyInt8uID)
                                              params:params];
 }
 
@@ -27468,8 +27468,8 @@
     NSNumber * timedWriteTimeout = params.timedWriteTimeout;
 
     [self.device writeAttributeWithEndpointID:@(_endpoint)
-                                    clusterID:@(MTRClusterTestClusterID)
-                                  attributeID:@(MTRClusterTestClusterAttributeWriteOnlyInt8uID)
+                                    clusterID:@(MTRClusterUnitTestingID)
+                                  attributeID:@(MTRClusterUnitTestingAttributeWriteOnlyInt8uID)
                                         value:dataValueDictionary
                         expectedValueInterval:expectedValueIntervalMs
                             timedWriteTimeout:timedWriteTimeout];
@@ -27478,53 +27478,53 @@
 - (NSDictionary<NSString *, id> *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeGeneratedCommandListID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeGeneratedCommandListID)
                                              params:params];
 }
 
 - (NSDictionary<NSString *, id> *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeAcceptedCommandListID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeAcceptedCommandListID)
                                              params:params];
 }
 
 - (NSDictionary<NSString *, id> *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeAttributeListID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeAttributeListID)
                                              params:params];
 }
 
 - (NSDictionary<NSString *, id> *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeFeatureMapID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeFeatureMapID)
                                              params:params];
 }
 
 - (NSDictionary<NSString *, id> *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
 {
     return [self.device readAttributeWithEndpointID:@(_endpoint)
-                                          clusterID:@(MTRClusterTestClusterID)
-                                        attributeID:@(MTRClusterTestClusterAttributeClusterRevisionID)
+                                          clusterID:@(MTRClusterUnitTestingID)
+                                        attributeID:@(MTRClusterUnitTestingAttributeClusterRevisionID)
                                              params:params];
 }
 
 @end
 
-@implementation MTRClusterTestCluster (Deprecated)
+@implementation MTRClusterUnitTesting (Deprecated)
 
 - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue
 {
     return [self initWithDevice:device endpointID:@(endpoint) queue:queue];
 }
 
-- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params
+- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params
            expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
         completionHandler:(MTRStatusCompletion)completionHandler
@@ -27540,7 +27540,7 @@
 {
     [self testWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler];
 }
-- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params
+- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params
                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                completionHandler:(MTRStatusCompletion)completionHandler
@@ -27558,10 +27558,10 @@
                      expectedValueInterval:expectedValueIntervalMs
                                 completion:completionHandler];
 }
-- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params
+- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params
                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
          expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-             completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+             completionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                    NSError * _Nullable error))completionHandler
 {
     [self testSpecificWithParams:params
@@ -27571,12 +27571,12 @@
 }
 - (void)testSpecificWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues
                  expectedValueInterval:(NSNumber *)expectedValueIntervalMs
-                     completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data,
+                     completionHandler:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data,
                                            NSError * _Nullable error))completionHandler
 {
     [self testSpecificWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler];
 }
-- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params
+- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                    completionHandler:(MTRStatusCompletion)completionHandler
@@ -27594,10 +27594,10 @@
                          expectedValueInterval:expectedValueIntervalMs
                                     completion:completionHandler];
 }
-- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params
+- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                 completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data,
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
 {
     [self testAddArgumentsWithParams:params
@@ -27605,10 +27605,10 @@
                expectedValueInterval:expectedValueIntervalMs
                           completion:completionHandler];
 }
-- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params
+- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                       expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                          completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data,
+                          completionHandler:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
 {
     [self testSimpleArgumentRequestWithParams:params
@@ -27616,11 +27616,11 @@
                         expectedValueInterval:expectedValueIntervalMs
                                    completion:completionHandler];
 }
-- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params
+- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params
                                   expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                            expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                completionHandler:
-                                   (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data,
+                                   (void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
 {
     [self testStructArrayArgumentRequestWithParams:params
@@ -27628,10 +27628,10 @@
                              expectedValueInterval:expectedValueIntervalMs
                                         completion:completionHandler];
 }
-- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params
+- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params
                              expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                       expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                          completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                          completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                 NSError * _Nullable error))completionHandler
 {
     [self testStructArgumentRequestWithParams:params
@@ -27639,10 +27639,10 @@
                         expectedValueInterval:expectedValueIntervalMs
                                    completion:completionHandler];
 }
-- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params
+- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params
                                    expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                             expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                       NSError * _Nullable error))completionHandler
 {
     [self testNestedStructArgumentRequestWithParams:params
@@ -27650,10 +27650,10 @@
                               expectedValueInterval:expectedValueIntervalMs
                                          completion:completionHandler];
 }
-- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params
+- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params
                                  expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                           expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                              completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                              completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                     NSError * _Nullable error))completionHandler
 {
     [self testListStructArgumentRequestWithParams:params
@@ -27661,10 +27661,10 @@
                             expectedValueInterval:expectedValueIntervalMs
                                        completion:completionHandler];
 }
-- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params
+- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params
                                 expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                          expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                             completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                             completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                    NSError * _Nullable error))completionHandler
 {
     [self testListInt8UArgumentRequestWithParams:params
@@ -27672,11 +27672,11 @@
                            expectedValueInterval:expectedValueIntervalMs
                                       completion:completionHandler];
 }
-- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params
+- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params
                                        expectedValues:
                                            (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                 expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                    completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                    completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                           NSError * _Nullable error))completionHandler
 {
     [self testNestedStructListArgumentRequestWithParams:params
@@ -27685,11 +27685,11 @@
                                              completion:completionHandler];
 }
 - (void)testListNestedStructListArgumentRequestWithParams:
-            (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params
+            (MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params
                                            expectedValues:
                                                (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                                        completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data,
+                                        completionHandler:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data,
                                                               NSError * _Nullable error))completionHandler
 {
     [self testListNestedStructListArgumentRequestWithParams:params
@@ -27697,10 +27697,10 @@
                                       expectedValueInterval:expectedValueIntervalMs
                                                  completion:completionHandler];
 }
-- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params
+- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                         expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                            completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data,
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
 {
     [self testListInt8UReverseRequestWithParams:params
@@ -27708,10 +27708,10 @@
                           expectedValueInterval:expectedValueIntervalMs
                                      completion:completionHandler];
 }
-- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params
+- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params
                     expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
              expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                 completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data,
+                 completionHandler:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data,
                                        NSError * _Nullable error))completionHandler
 {
     [self testEnumsRequestWithParams:params
@@ -27719,10 +27719,10 @@
                expectedValueInterval:expectedValueIntervalMs
                           completion:completionHandler];
 }
-- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params
+- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params
                                expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                         expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                            completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data,
+                            completionHandler:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data,
                                                   NSError * _Nullable error))completionHandler
 {
     [self testNullableOptionalRequestWithParams:params
@@ -27730,12 +27730,12 @@
                           expectedValueInterval:expectedValueIntervalMs
                                      completion:completionHandler];
 }
-- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params
+- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params
                                       expectedValues:
                                           (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                    completionHandler:
-                                       (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data,
+                                       (void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data,
                                            NSError * _Nullable error))completionHandler
 {
     [self testComplexNullableOptionalRequestWithParams:params
@@ -27743,10 +27743,10 @@
                                  expectedValueInterval:expectedValueIntervalMs
                                             completion:completionHandler];
 }
-- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params
+- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params
                            expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                     expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                        completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data,
+                        completionHandler:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data,
                                               NSError * _Nullable error))completionHandler
 {
     [self simpleStructEchoRequestWithParams:params
@@ -27754,7 +27754,7 @@
                       expectedValueInterval:expectedValueIntervalMs
                                  completion:completionHandler];
 }
-- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params
+- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params
                       expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                    completionHandler:(MTRStatusCompletion)completionHandler
@@ -27772,7 +27772,7 @@
                          expectedValueInterval:expectedValueIntervalMs
                                     completion:completionHandler];
 }
-- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
+- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params
                                      expectedValues:
                                          (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                               expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
@@ -27783,10 +27783,10 @@
                                 expectedValueInterval:expectedValueIntervalMs
                                            completion:completionHandler];
 }
-- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params
+- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params
                             expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                      expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
-                         completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data,
+                         completionHandler:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data,
                                                NSError * _Nullable error))completionHandler
 {
     [self testEmitTestEventRequestWithParams:params
@@ -27794,13 +27794,13 @@
                        expectedValueInterval:expectedValueIntervalMs
                                   completion:completionHandler];
 }
-- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params
+- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params
                                         expectedValues:
                                             (NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries
                                  expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs
                                      completionHandler:
                                          (void (^)(
-                                             MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
+                                             MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data,
                                              NSError * _Nullable error))completionHandler
 {
     [self testEmitTestFabricScopedEventRequestWithParams:params
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h
index 4c514b9..b5d6cff 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h
@@ -343,7 +343,7 @@
 @property (nonatomic, readonly) MTRDevice * device;
 @end
 
-@interface MTRClusterTestCluster ()
+@interface MTRClusterUnitTesting ()
 @property (nonatomic, readonly) uint16_t endpoint;
 @property (nonatomic, readonly) MTRDevice * device;
 @end
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index a7c1fa9..f9194ac 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -5196,7 +5196,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestParams : NSObject <NSCopying>
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5216,7 +5216,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestSpecificResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestSpecificResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull returnValue;
 /**
@@ -5238,7 +5238,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestNotHandledParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestNotHandledParams : NSObject <NSCopying>
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5258,7 +5258,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestAddArgumentsResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull returnValue;
 /**
@@ -5280,7 +5280,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestSpecificParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestSpecificParams : NSObject <NSCopying>
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5300,7 +5300,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestSimpleArgumentResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull returnValue;
 /**
@@ -5322,7 +5322,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestUnknownCommandParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestUnknownCommandParams : NSObject <NSCopying>
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5342,7 +5342,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestStructArrayArgumentResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 
@@ -5374,7 +5374,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestAddArgumentsParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestAddArgumentsParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 
@@ -5398,7 +5398,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestListInt8UReverseResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 /**
@@ -5420,7 +5420,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestSimpleArgumentRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 /**
@@ -5442,7 +5442,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestEnumsResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEnumsResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 
@@ -5466,7 +5466,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestStructArrayArgumentRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 
@@ -5498,7 +5498,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestNullableOptionalResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull wasPresent;
 
@@ -5526,9 +5526,9 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestStructArgumentRequestParams : NSObject <NSCopying>
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull arg1;
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5548,7 +5548,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestComplexNullableOptionalResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull nullableIntWasNull;
 
@@ -5580,17 +5580,17 @@
 
 @property (nonatomic, copy) NSNumber * _Nonnull nullableStructWasNull;
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStructValue;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable nullableStructValue;
 
 @property (nonatomic, copy) NSNumber * _Nonnull optionalStructWasPresent;
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStructValue;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable optionalStructValue;
 
 @property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalStructWasPresent;
 
 @property (nonatomic, copy) NSNumber * _Nullable nullableOptionalStructWasNull;
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStructValue;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable nullableOptionalStructValue;
 
 @property (nonatomic, copy) NSNumber * _Nonnull nullableListWasNull;
 
@@ -5624,9 +5624,9 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestNestedStructArgumentRequestParams : NSObject <NSCopying>
 
-@property (nonatomic, copy) MTRTestClusterClusterNestedStruct * _Nonnull arg1;
+@property (nonatomic, copy) MTRUnitTestingClusterNestedStruct * _Nonnull arg1;
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5646,7 +5646,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterBooleanResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterBooleanResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull value;
 /**
@@ -5668,7 +5668,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestListStructArgumentRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 /**
@@ -5690,9 +5690,9 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterSimpleStructResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterSimpleStructResponseParams : NSObject <NSCopying>
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull arg1;
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5712,7 +5712,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestListInt8UArgumentRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 /**
@@ -5734,7 +5734,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEmitTestEventResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull value;
 /**
@@ -5756,9 +5756,9 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestNestedStructListArgumentRequestParams : NSObject <NSCopying>
 
-@property (nonatomic, copy) MTRTestClusterClusterNestedStructList * _Nonnull arg1;
+@property (nonatomic, copy) MTRUnitTestingClusterNestedStructList * _Nonnull arg1;
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5778,7 +5778,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull value;
 /**
@@ -5800,7 +5800,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 /**
@@ -5822,7 +5822,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestListInt8UReverseRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSArray * _Nonnull arg1;
 /**
@@ -5844,7 +5844,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestEnumsRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEnumsRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 
@@ -5868,7 +5868,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestNullableOptionalRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nullable arg1;
 /**
@@ -5890,7 +5890,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestComplexNullableOptionalRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nullable nullableInt;
 
@@ -5904,11 +5904,11 @@
 
 @property (nonatomic, copy) NSString * _Nullable nullableOptionalString;
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable nullableStruct;
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable optionalStruct;
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable nullableOptionalStruct;
 
 @property (nonatomic, copy) NSArray * _Nullable nullableList;
 
@@ -5934,9 +5934,9 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterSimpleStructEchoRequestParams : NSObject <NSCopying>
 
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull arg1;
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5956,7 +5956,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTimedInvokeRequestParams : NSObject <NSCopying>
 /**
  * Controls whether the command is a timed command (using Timed Invoke).
  *
@@ -5976,7 +5976,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nullable arg1;
 /**
@@ -5998,7 +5998,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEmitTestEventRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 
@@ -6024,7 +6024,7 @@
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
-@interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 /**
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index d6f6c8e..afd0732 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -6978,7 +6978,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestParams
+@implementation MTRUnitTestingClusterTestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -6989,7 +6989,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestParams alloc] init];
 
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
 
@@ -7003,7 +7003,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestSpecificResponseParams
+@implementation MTRUnitTestingClusterTestSpecificResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7016,7 +7016,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestSpecificResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestSpecificResponseParams alloc] init];
 
     other.returnValue = self.returnValue;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7032,7 +7032,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestNotHandledParams
+@implementation MTRUnitTestingClusterTestNotHandledParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7043,7 +7043,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestNotHandledParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestNotHandledParams alloc] init];
 
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
 
@@ -7057,7 +7057,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestAddArgumentsResponseParams
+@implementation MTRUnitTestingClusterTestAddArgumentsResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7070,7 +7070,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestAddArgumentsResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestAddArgumentsResponseParams alloc] init];
 
     other.returnValue = self.returnValue;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7086,7 +7086,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestSpecificParams
+@implementation MTRUnitTestingClusterTestSpecificParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7097,7 +7097,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestSpecificParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestSpecificParams alloc] init];
 
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
 
@@ -7111,7 +7111,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestSimpleArgumentResponseParams
+@implementation MTRUnitTestingClusterTestSimpleArgumentResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7124,7 +7124,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestSimpleArgumentResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestSimpleArgumentResponseParams alloc] init];
 
     other.returnValue = self.returnValue;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7140,7 +7140,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestUnknownCommandParams
+@implementation MTRUnitTestingClusterTestUnknownCommandParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7151,7 +7151,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestUnknownCommandParams alloc] init];
 
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
 
@@ -7165,7 +7165,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestStructArrayArgumentResponseParams
+@implementation MTRUnitTestingClusterTestStructArrayArgumentResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7188,7 +7188,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestStructArrayArgumentResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestStructArrayArgumentResponseParams alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -7209,7 +7209,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestAddArgumentsParams
+@implementation MTRUnitTestingClusterTestAddArgumentsParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7224,7 +7224,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -7241,7 +7241,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestListInt8UReverseResponseParams
+@implementation MTRUnitTestingClusterTestListInt8UReverseResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7254,7 +7254,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestListInt8UReverseResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestListInt8UReverseResponseParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7269,7 +7269,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestSimpleArgumentRequestParams
+@implementation MTRUnitTestingClusterTestSimpleArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7282,7 +7282,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestSimpleArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7297,7 +7297,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestEnumsResponseParams
+@implementation MTRUnitTestingClusterTestEnumsResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7312,7 +7312,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestEnumsResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEnumsResponseParams alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -7329,7 +7329,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestStructArrayArgumentRequestParams
+@implementation MTRUnitTestingClusterTestStructArrayArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7352,7 +7352,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestStructArrayArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -7373,7 +7373,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestNullableOptionalResponseParams
+@implementation MTRUnitTestingClusterTestNullableOptionalResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7392,7 +7392,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestNullableOptionalResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestNullableOptionalResponseParams alloc] init];
 
     other.wasPresent = self.wasPresent;
     other.wasNull = self.wasNull;
@@ -7411,12 +7411,12 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestStructArgumentRequestParams
+@implementation MTRUnitTestingClusterTestStructArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
 
-        _arg1 = [MTRTestClusterClusterSimpleStruct new];
+        _arg1 = [MTRUnitTestingClusterSimpleStruct new];
         _timedInvokeTimeoutMs = nil;
     }
     return self;
@@ -7424,7 +7424,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestStructArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7439,7 +7439,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestComplexNullableOptionalResponseParams
+@implementation MTRUnitTestingClusterTestComplexNullableOptionalResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7506,7 +7506,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestComplexNullableOptionalResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestComplexNullableOptionalResponseParams alloc] init];
 
     other.nullableIntWasNull = self.nullableIntWasNull;
     other.nullableIntValue = self.nullableIntValue;
@@ -7563,12 +7563,12 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestNestedStructArgumentRequestParams
+@implementation MTRUnitTestingClusterTestNestedStructArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
 
-        _arg1 = [MTRTestClusterClusterNestedStruct new];
+        _arg1 = [MTRUnitTestingClusterNestedStruct new];
         _timedInvokeTimeoutMs = nil;
     }
     return self;
@@ -7576,7 +7576,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestNestedStructArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7591,7 +7591,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterBooleanResponseParams
+@implementation MTRUnitTestingClusterBooleanResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7604,7 +7604,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterBooleanResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterBooleanResponseParams alloc] init];
 
     other.value = self.value;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7619,7 +7619,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestListStructArgumentRequestParams
+@implementation MTRUnitTestingClusterTestListStructArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7632,7 +7632,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestListStructArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7647,12 +7647,12 @@
 }
 
 @end
-@implementation MTRTestClusterClusterSimpleStructResponseParams
+@implementation MTRUnitTestingClusterSimpleStructResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
 
-        _arg1 = [MTRTestClusterClusterSimpleStruct new];
+        _arg1 = [MTRUnitTestingClusterSimpleStruct new];
         _timedInvokeTimeoutMs = nil;
     }
     return self;
@@ -7660,7 +7660,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterSimpleStructResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterSimpleStructResponseParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7675,7 +7675,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestListInt8UArgumentRequestParams
+@implementation MTRUnitTestingClusterTestListInt8UArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7688,7 +7688,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestListInt8UArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7703,7 +7703,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestEmitTestEventResponseParams
+@implementation MTRUnitTestingClusterTestEmitTestEventResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7716,7 +7716,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestEmitTestEventResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEmitTestEventResponseParams alloc] init];
 
     other.value = self.value;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7731,12 +7731,12 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestNestedStructListArgumentRequestParams
+@implementation MTRUnitTestingClusterTestNestedStructListArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
 
-        _arg1 = [MTRTestClusterClusterNestedStructList new];
+        _arg1 = [MTRUnitTestingClusterNestedStructList new];
         _timedInvokeTimeoutMs = nil;
     }
     return self;
@@ -7744,7 +7744,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestNestedStructListArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7759,7 +7759,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams
+@implementation MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7772,7 +7772,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams alloc] init];
 
     other.value = self.value;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7787,7 +7787,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestListNestedStructListArgumentRequestParams
+@implementation MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7800,7 +7800,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7815,7 +7815,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestListInt8UReverseRequestParams
+@implementation MTRUnitTestingClusterTestListInt8UReverseRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7828,7 +7828,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestListInt8UReverseRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7843,7 +7843,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestEnumsRequestParams
+@implementation MTRUnitTestingClusterTestEnumsRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7858,7 +7858,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEnumsRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -7875,7 +7875,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestNullableOptionalRequestParams
+@implementation MTRUnitTestingClusterTestNullableOptionalRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7888,7 +7888,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestNullableOptionalRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7903,7 +7903,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestComplexNullableOptionalRequestParams
+@implementation MTRUnitTestingClusterTestComplexNullableOptionalRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -7938,7 +7938,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestComplexNullableOptionalRequestParams alloc] init];
 
     other.nullableInt = self.nullableInt;
     other.optionalInt = self.optionalInt;
@@ -7970,12 +7970,12 @@
 }
 
 @end
-@implementation MTRTestClusterClusterSimpleStructEchoRequestParams
+@implementation MTRUnitTestingClusterSimpleStructEchoRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
 
-        _arg1 = [MTRTestClusterClusterSimpleStruct new];
+        _arg1 = [MTRUnitTestingClusterSimpleStruct new];
         _timedInvokeTimeoutMs = nil;
     }
     return self;
@@ -7983,7 +7983,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterSimpleStructEchoRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -7998,7 +7998,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTimedInvokeRequestParams
+@implementation MTRUnitTestingClusterTimedInvokeRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -8009,7 +8009,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTimedInvokeRequestParams alloc] init];
 
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
 
@@ -8023,7 +8023,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams
+@implementation MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -8036,7 +8036,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -8051,7 +8051,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestEmitTestEventRequestParams
+@implementation MTRUnitTestingClusterTestEmitTestEventRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -8068,7 +8068,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEmitTestEventRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -8086,7 +8086,7 @@
 }
 
 @end
-@implementation MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams
+@implementation MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -8099,7 +8099,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 {
-    auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams alloc] init];
 
     other.arg1 = self.arg1;
     other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
index ad351a8..52fe36a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
@@ -2123,8 +2123,8 @@
         }
         break;
     }
-    case Clusters::TestCluster::Id: {
-        using namespace Clusters::TestCluster;
+    case Clusters::UnitTesting::Id: {
+        using namespace Clusters::UnitTesting;
         switch (aPath.mEventId) {
 
         case Events::TestEvent::Id: {
@@ -2134,7 +2134,7 @@
                 return nil;
             }
 
-            MTRTestClusterClusterTestEventEvent * value = [MTRTestClusterClusterTestEventEvent new];
+            MTRUnitTestingClusterTestEventEvent * value = [MTRUnitTestingClusterTestEventEvent new];
 
             do {
                 NSNumber * _Nonnull memberValue;
@@ -2152,8 +2152,8 @@
                 value.arg3 = memberValue;
             } while (0);
             do {
-                MTRTestClusterClusterSimpleStruct * _Nonnull memberValue;
-                memberValue = [MTRTestClusterClusterSimpleStruct new];
+                MTRUnitTestingClusterSimpleStruct * _Nonnull memberValue;
+                memberValue = [MTRUnitTestingClusterSimpleStruct new];
                 memberValue.a = [NSNumber numberWithUnsignedChar:cppValue.arg4.a];
                 memberValue.b = [NSNumber numberWithBool:cppValue.arg4.b];
                 memberValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.arg4.c)];
@@ -2173,8 +2173,8 @@
                     auto iter_0 = cppValue.arg5.begin();
                     while (iter_0.Next()) {
                         auto & entry_0 = iter_0.GetValue();
-                        MTRTestClusterClusterSimpleStruct * newElement_0;
-                        newElement_0 = [MTRTestClusterClusterSimpleStruct new];
+                        MTRUnitTestingClusterSimpleStruct * newElement_0;
+                        newElement_0 = [MTRUnitTestingClusterSimpleStruct new];
                         newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
                         newElement_0.b = [NSNumber numberWithBool:entry_0.b];
                         newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)];
@@ -2227,7 +2227,7 @@
                 return nil;
             }
 
-            MTRTestClusterClusterTestFabricScopedEventEvent * value = [MTRTestClusterClusterTestFabricScopedEventEvent new];
+            MTRUnitTestingClusterTestFabricScopedEventEvent * value = [MTRUnitTestingClusterTestFabricScopedEventEvent new];
 
             do {
                 NSNumber * _Nonnull memberValue;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index fd17bda..cfcac95 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -950,7 +950,7 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterSimpleStruct : NSObject <NSCopying>
+@interface MTRUnitTestingClusterSimpleStruct : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull a;
 @property (nonatomic, copy) NSNumber * _Nonnull b;
 @property (nonatomic, copy) NSNumber * _Nonnull c;
@@ -964,13 +964,13 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterTestFabricScoped : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestFabricScoped : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull fabricSensitiveInt8u;
 @property (nonatomic, copy) NSNumber * _Nullable optionalFabricSensitiveInt8u;
 @property (nonatomic, copy) NSNumber * _Nullable nullableFabricSensitiveInt8u;
 @property (nonatomic, copy) NSNumber * _Nullable nullableOptionalFabricSensitiveInt8u;
 @property (nonatomic, copy) NSString * _Nonnull fabricSensitiveCharString;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull fabricSensitiveStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull fabricSensitiveStruct;
 @property (nonatomic, copy) NSArray * _Nonnull fabricSensitiveInt8uList;
 @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex;
 
@@ -978,16 +978,16 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject <NSCopying>
+@interface MTRUnitTestingClusterNullablesAndOptionalsStruct : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nullable nullableInt;
 @property (nonatomic, copy) NSNumber * _Nullable optionalInt;
 @property (nonatomic, copy) NSNumber * _Nullable nullableOptionalInt;
 @property (nonatomic, copy) NSString * _Nullable nullableString;
 @property (nonatomic, copy) NSString * _Nullable optionalString;
 @property (nonatomic, copy) NSString * _Nullable nullableOptionalString;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable nullableStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable optionalStruct;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nullable nullableOptionalStruct;
 @property (nonatomic, copy) NSArray * _Nullable nullableList;
 @property (nonatomic, copy) NSArray * _Nullable optionalList;
 @property (nonatomic, copy) NSArray * _Nullable nullableOptionalList;
@@ -996,19 +996,19 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterNestedStruct : NSObject <NSCopying>
+@interface MTRUnitTestingClusterNestedStruct : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull a;
 @property (nonatomic, copy) NSNumber * _Nonnull b;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull c;
 
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterNestedStructList : NSObject <NSCopying>
+@interface MTRUnitTestingClusterNestedStructList : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull a;
 @property (nonatomic, copy) NSNumber * _Nonnull b;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull c;
 @property (nonatomic, copy) NSArray * _Nonnull d;
 @property (nonatomic, copy) NSArray * _Nonnull e;
 @property (nonatomic, copy) NSArray * _Nonnull f;
@@ -1018,14 +1018,14 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterDoubleNestedStructList : NSObject <NSCopying>
+@interface MTRUnitTestingClusterDoubleNestedStructList : NSObject <NSCopying>
 @property (nonatomic, copy) NSArray * _Nonnull a;
 
 - (instancetype)init;
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterTestListStructOctet : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestListStructOctet : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull member1;
 @property (nonatomic, copy) NSData * _Nonnull member2;
 
@@ -1033,11 +1033,11 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterTestEventEvent : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestEventEvent : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull arg1;
 @property (nonatomic, copy) NSNumber * _Nonnull arg2;
 @property (nonatomic, copy) NSNumber * _Nonnull arg3;
-@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg4;
+@property (nonatomic, copy) MTRUnitTestingClusterSimpleStruct * _Nonnull arg4;
 @property (nonatomic, copy) NSArray * _Nonnull arg5;
 @property (nonatomic, copy) NSArray * _Nonnull arg6;
 
@@ -1045,7 +1045,7 @@
 - (id)copyWithZone:(NSZone * _Nullable)zone;
 @end
 
-@interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject <NSCopying>
+@interface MTRUnitTestingClusterTestFabricScopedEventEvent : NSObject <NSCopying>
 @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex;
 
 - (instancetype)init;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index faa495e..2ddfba8 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -3569,7 +3569,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterSimpleStruct
+@implementation MTRUnitTestingClusterSimpleStruct
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3595,7 +3595,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterSimpleStruct alloc] init];
+    auto other = [[MTRUnitTestingClusterSimpleStruct alloc] init];
 
     other.a = self.a;
     other.b = self.b;
@@ -3619,7 +3619,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterTestFabricScoped
+@implementation MTRUnitTestingClusterTestFabricScoped
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3634,7 +3634,7 @@
 
         _fabricSensitiveCharString = @"";
 
-        _fabricSensitiveStruct = [MTRTestClusterClusterSimpleStruct new];
+        _fabricSensitiveStruct = [MTRUnitTestingClusterSimpleStruct new];
 
         _fabricSensitiveInt8uList = [NSArray array];
 
@@ -3645,7 +3645,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterTestFabricScoped alloc] init];
+    auto other = [[MTRUnitTestingClusterTestFabricScoped alloc] init];
 
     other.fabricSensitiveInt8u = self.fabricSensitiveInt8u;
     other.optionalFabricSensitiveInt8u = self.optionalFabricSensitiveInt8u;
@@ -3673,7 +3673,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterNullablesAndOptionalsStruct
+@implementation MTRUnitTestingClusterNullablesAndOptionalsStruct
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3707,7 +3707,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterNullablesAndOptionalsStruct alloc] init];
+    auto other = [[MTRUnitTestingClusterNullablesAndOptionalsStruct alloc] init];
 
     other.nullableInt = self.nullableInt;
     other.optionalInt = self.optionalInt;
@@ -3739,7 +3739,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterNestedStruct
+@implementation MTRUnitTestingClusterNestedStruct
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3748,14 +3748,14 @@
 
         _b = @(0);
 
-        _c = [MTRTestClusterClusterSimpleStruct new];
+        _c = [MTRUnitTestingClusterSimpleStruct new];
     }
     return self;
 }
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterNestedStruct alloc] init];
+    auto other = [[MTRUnitTestingClusterNestedStruct alloc] init];
 
     other.a = self.a;
     other.b = self.b;
@@ -3773,7 +3773,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterNestedStructList
+@implementation MTRUnitTestingClusterNestedStructList
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3782,7 +3782,7 @@
 
         _b = @(0);
 
-        _c = [MTRTestClusterClusterSimpleStruct new];
+        _c = [MTRUnitTestingClusterSimpleStruct new];
 
         _d = [NSArray array];
 
@@ -3797,7 +3797,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterNestedStructList alloc] init];
+    auto other = [[MTRUnitTestingClusterNestedStructList alloc] init];
 
     other.a = self.a;
     other.b = self.b;
@@ -3819,7 +3819,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterDoubleNestedStructList
+@implementation MTRUnitTestingClusterDoubleNestedStructList
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3831,7 +3831,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterDoubleNestedStructList alloc] init];
+    auto other = [[MTRUnitTestingClusterDoubleNestedStructList alloc] init];
 
     other.a = self.a;
 
@@ -3846,7 +3846,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterTestListStructOctet
+@implementation MTRUnitTestingClusterTestListStructOctet
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3860,7 +3860,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterTestListStructOctet alloc] init];
+    auto other = [[MTRUnitTestingClusterTestListStructOctet alloc] init];
 
     other.member1 = self.member1;
     other.member2 = self.member2;
@@ -3877,7 +3877,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterTestEventEvent
+@implementation MTRUnitTestingClusterTestEventEvent
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3888,7 +3888,7 @@
 
         _arg3 = @(0);
 
-        _arg4 = [MTRTestClusterClusterSimpleStruct new];
+        _arg4 = [MTRUnitTestingClusterSimpleStruct new];
 
         _arg5 = [NSArray array];
 
@@ -3899,7 +3899,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterTestEventEvent alloc] init];
+    auto other = [[MTRUnitTestingClusterTestEventEvent alloc] init];
 
     other.arg1 = self.arg1;
     other.arg2 = self.arg2;
@@ -3920,7 +3920,7 @@
 
 @end
 
-@implementation MTRTestClusterClusterTestFabricScopedEventEvent
+@implementation MTRUnitTestingClusterTestFabricScopedEventEvent
 - (instancetype)init
 {
     if (self = [super init]) {
@@ -3932,7 +3932,7 @@
 
 - (id)copyWithZone:(NSZone * _Nullable)zone
 {
-    auto other = [[MTRTestClusterClusterTestFabricScopedEventEvent alloc] init];
+    auto other = [[MTRUnitTestingClusterTestFabricScopedEventEvent alloc] init];
 
     other.fabricIndex = self.fabricIndex;
 
diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m
index 78659c7..0c23ae5 100644
--- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m
+++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m
@@ -1126,7 +1126,7 @@
     XCTestExpectation * expectation = [self expectationWithDescription:@"ReuseMTRClusterObjectFirstCall"];
 
     dispatch_queue_t queue = dispatch_get_main_queue();
-    MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(1) queue:queue];
+    MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:queue];
     XCTAssertNotNil(cluster);
 
     [cluster testWithCompletion:^(NSError * err) {
diff --git a/src/lib/support/tests/TestTlvToJson.cpp b/src/lib/support/tests/TestTlvToJson.cpp
index 21e4113..881045f 100644
--- a/src/lib/support/tests/TestTlvToJson.cpp
+++ b/src/lib/support/tests/TestTlvToJson.cpp
@@ -156,7 +156,7 @@
                       "   \"value\" : null\n"
                       "}\n");
 
-    Clusters::TestCluster::Structs::SimpleStruct::Type structVal;
+    Clusters::UnitTesting::Structs::SimpleStruct::Type structVal;
     structVal.a = 20;
     structVal.b = true;
     structVal.d = byteBuf;
@@ -188,8 +188,8 @@
                       "   \"value\" : [ 1, 2, 3, 4 ]\n"
                       "}\n");
 
-    Clusters::TestCluster::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal };
-    DataModel::List<Clusters::TestCluster::Structs::SimpleStruct::Type> structList;
+    Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal };
+    DataModel::List<Clusters::UnitTesting::Structs::SimpleStruct::Type> structList;
 
     structList = structListData;
 
diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp
index 5d65d8f..38876e2 100644
--- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp
+++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp
@@ -1651,202 +1651,6 @@
 
 } // namespace TargetNavigator
 
-namespace TestCluster {
-
-void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
-{
-    CHIP_ERROR TLVError = CHIP_NO_ERROR;
-    bool wasHandled     = false;
-    {
-        switch (aCommandPath.mCommandId)
-        {
-        case Commands::Test::Id: {
-            Commands::Test::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNotHandled::Id: {
-            Commands::TestNotHandled::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestNotHandledCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestSpecific::Id: {
-            Commands::TestSpecific::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestSpecificCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestAddArguments::Id: {
-            Commands::TestAddArguments::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestAddArgumentsCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestStructArgumentRequest::Id: {
-            Commands::TestStructArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNestedStructArgumentRequest::Id: {
-            Commands::TestNestedStructArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestNestedStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestListStructArgumentRequest::Id: {
-            Commands::TestListStructArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestListStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestListInt8UArgumentRequest::Id: {
-            Commands::TestListInt8UArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestListInt8UArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNestedStructListArgumentRequest::Id: {
-            Commands::TestNestedStructListArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestListNestedStructListArgumentRequest::Id: {
-            Commands::TestListNestedStructListArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestListNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath,
-                                                                                                      commandData);
-            }
-            break;
-        }
-        case Commands::TestListInt8UReverseRequest::Id: {
-            Commands::TestListInt8UReverseRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestListInt8UReverseRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestEnumsRequest::Id: {
-            Commands::TestEnumsRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestEnumsRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNullableOptionalRequest::Id: {
-            Commands::TestNullableOptionalRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestNullableOptionalRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::SimpleStructEchoRequest::Id: {
-            Commands::SimpleStructEchoRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterSimpleStructEchoRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TimedInvokeRequest::Id: {
-            Commands::TimedInvokeRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTimedInvokeRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestSimpleOptionalArgumentRequest::Id: {
-            Commands::TestSimpleOptionalArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestSimpleOptionalArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestEmitTestEventRequest::Id: {
-            Commands::TestEmitTestEventRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestEmitTestEventRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestEmitTestFabricScopedEventRequest::Id: {
-            Commands::TestEmitTestFabricScopedEventRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        default: {
-            // Unrecognized command ID, error status will apply.
-            apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand);
-            ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI,
-                         ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId));
-            return;
-        }
-        }
-    }
-
-    if (CHIP_NO_ERROR != TLVError || !wasHandled)
-    {
-        apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand);
-        ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format());
-    }
-}
-
-} // namespace TestCluster
-
 namespace Thermostat {
 
 void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
@@ -1921,6 +1725,202 @@
 
 } // namespace ThreadNetworkDiagnostics
 
+namespace UnitTesting {
+
+void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
+{
+    CHIP_ERROR TLVError = CHIP_NO_ERROR;
+    bool wasHandled     = false;
+    {
+        switch (aCommandPath.mCommandId)
+        {
+        case Commands::Test::Id: {
+            Commands::Test::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNotHandled::Id: {
+            Commands::TestNotHandled::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestNotHandledCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestSpecific::Id: {
+            Commands::TestSpecific::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestSpecificCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestAddArguments::Id: {
+            Commands::TestAddArguments::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestAddArgumentsCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestStructArgumentRequest::Id: {
+            Commands::TestStructArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNestedStructArgumentRequest::Id: {
+            Commands::TestNestedStructArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestNestedStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestListStructArgumentRequest::Id: {
+            Commands::TestListStructArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestListStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestListInt8UArgumentRequest::Id: {
+            Commands::TestListInt8UArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestListInt8UArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNestedStructListArgumentRequest::Id: {
+            Commands::TestNestedStructListArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestListNestedStructListArgumentRequest::Id: {
+            Commands::TestListNestedStructListArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestListNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath,
+                                                                                                      commandData);
+            }
+            break;
+        }
+        case Commands::TestListInt8UReverseRequest::Id: {
+            Commands::TestListInt8UReverseRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestListInt8UReverseRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestEnumsRequest::Id: {
+            Commands::TestEnumsRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestEnumsRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNullableOptionalRequest::Id: {
+            Commands::TestNullableOptionalRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestNullableOptionalRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::SimpleStructEchoRequest::Id: {
+            Commands::SimpleStructEchoRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterSimpleStructEchoRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TimedInvokeRequest::Id: {
+            Commands::TimedInvokeRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTimedInvokeRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestSimpleOptionalArgumentRequest::Id: {
+            Commands::TestSimpleOptionalArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestSimpleOptionalArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestEmitTestEventRequest::Id: {
+            Commands::TestEmitTestEventRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestEmitTestEventRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestEmitTestFabricScopedEventRequest::Id: {
+            Commands::TestEmitTestFabricScopedEventRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestEmitTestFabricScopedEventRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        default: {
+            // Unrecognized command ID, error status will apply.
+            apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand);
+            ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI,
+                         ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId));
+            return;
+        }
+        }
+    }
+
+    if (CHIP_NO_ERROR != TLVError || !wasHandled)
+    {
+        apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand);
+        ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format());
+    }
+}
+
+} // namespace UnitTesting
+
 namespace WiFiNetworkDiagnostics {
 
 void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
@@ -2129,15 +2129,15 @@
     case Clusters::TargetNavigator::Id:
         Clusters::TargetNavigator::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
-    case Clusters::TestCluster::Id:
-        Clusters::TestCluster::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
-        break;
     case Clusters::Thermostat::Id:
         Clusters::Thermostat::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
     case Clusters::ThreadNetworkDiagnostics::Id:
         Clusters::ThreadNetworkDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
+    case Clusters::UnitTesting::Id:
+        Clusters::UnitTesting::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
+        break;
     case Clusters::WiFiNetworkDiagnostics::Id:
         Clusters::WiFiNetworkDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp
index 5ec8072..fa885d1 100644
--- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp
+++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp
@@ -191,9 +191,6 @@
     case ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID:
         emberAfTemperatureMeasurementClusterInitCallback(endpoint);
         break;
-    case ZCL_TEST_CLUSTER_ID:
-        emberAfTestClusterClusterInitCallback(endpoint);
-        break;
     case ZCL_THERMOSTAT_CLUSTER_ID:
         emberAfThermostatClusterInitCallback(endpoint);
         break;
@@ -209,6 +206,9 @@
     case ZCL_UNIT_LOCALIZATION_CLUSTER_ID:
         emberAfUnitLocalizationClusterInitCallback(endpoint);
         break;
+    case ZCL_UNIT_TESTING_CLUSTER_ID:
+        emberAfUnitTestingClusterInitCallback(endpoint);
+        break;
     case ZCL_USER_LABEL_CLUSTER_ID:
         emberAfUserLabelClusterInitCallback(endpoint);
         break;
@@ -497,11 +497,6 @@
     // To prevent warning
     (void) endpoint;
 }
-void __attribute__((weak)) emberAfTestClusterClusterInitCallback(EndpointId endpoint)
-{
-    // To prevent warning
-    (void) endpoint;
-}
 void __attribute__((weak)) emberAfThermostatClusterInitCallback(EndpointId endpoint)
 {
     // To prevent warning
@@ -527,6 +522,11 @@
     // To prevent warning
     (void) endpoint;
 }
+void __attribute__((weak)) emberAfUnitTestingClusterInitCallback(EndpointId endpoint)
+{
+    // To prevent warning
+    (void) endpoint;
+}
 void __attribute__((weak)) emberAfUserLabelClusterInitCallback(EndpointId endpoint)
 {
     // To prevent warning
diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
index f652b1f..7d5a507 100644
--- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
+++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
@@ -73,7 +73,7 @@
             /* 54 - SeekRangeStart, */                                                                                             \
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                        \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */                                                          \
+            /* Endpoint: 1, Cluster: Unit Testing (server), big-endian */                                                          \
                                                                                                                                    \
             /* 62 - bitmap64, */                                                                                                   \
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                        \
@@ -192,7 +192,7 @@
             /* 54 - SeekRangeStart, */                                                                                             \
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                        \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */                                                       \
+            /* Endpoint: 1, Cluster: Unit Testing (server), little-endian */                                                       \
                                                                                                                                    \
             /* 62 - bitmap64, */                                                                                                   \
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                        \
@@ -354,7 +354,7 @@
             { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */                                              \
             { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */                             \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server) */                                                                      \
+            /* Endpoint: 1, Cluster: Unit Testing (server) */                                                                      \
             { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 },   /* range_restricted_int8u */                                  \
             { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */                                  \
             { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 },  /* range_restricted_int16u */                                 \
@@ -1295,7 +1295,7 @@
             { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) },        /* FeatureMap */                               \
             { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) },          /* ClusterRevision */                          \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server) */                                                                      \
+            /* Endpoint: 1, Cluster: Unit Testing (server) */                                                                      \
             { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) },    /* boolean */        \
             { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) },        /* bitmap8 */        \
             { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) },       /* bitmap16 */       \
@@ -1832,7 +1832,7 @@
   /*   GeneratedCommandList (index=194)*/ \
   0x00000001 /* SendKeyResponse */, \
   chip::kInvalidCommandId /* end of list */, \
-  /* Endpoint: 1, Cluster: Test Cluster (server) */\
+  /* Endpoint: 1, Cluster: Unit Testing (server) */\
   /*   AcceptedCommandList (index=196) */ \
   0x00000000 /* Test */, \
   0x00000001 /* TestNotHandled */, \
@@ -2690,7 +2690,7 @@
       .generatedCommandList = nullptr ,\
     },\
   { \
-      /* Endpoint: 1, Cluster: Test Cluster (server) */ \
+      /* Endpoint: 1, Cluster: Unit Testing (server) */ \
       .clusterId = 0xFFF1FC05,  \
       .attributes = ZAP_ATTRIBUTE_INDEX(596), \
       .attributeCount = 83, \
diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h
index 947a9fa..dd4aa28 100644
--- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h
+++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h
@@ -91,7 +91,7 @@
 #define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 #define EMBER_AF_ELECTRICAL_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
-#define EMBER_AF_TEST_CLUSTER_SERVER_ENDPOINT_COUNT (1)
+#define EMBER_AF_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 #define EMBER_AF_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 
 /**** Cluster Plugins ****/
@@ -425,10 +425,10 @@
 #define EMBER_AF_PLUGIN_ELECTRICAL_MEASUREMENT_SERVER
 #define EMBER_AF_PLUGIN_ELECTRICAL_MEASUREMENT
 
-// Use this macro to check if the server side of the Test Cluster cluster is included
-#define ZCL_USING_TEST_CLUSTER_SERVER
-#define EMBER_AF_PLUGIN_TEST_CLUSTER_SERVER
-#define EMBER_AF_PLUGIN_TEST_CLUSTER
+// Use this macro to check if the server side of the Unit Testing cluster is included
+#define ZCL_USING_UNIT_TESTING_CLUSTER_SERVER
+#define EMBER_AF_PLUGIN_UNIT_TESTING_SERVER
+#define EMBER_AF_PLUGIN_UNIT_TESTING
 
 // Use this macro to check if the server side of the Fault Injection cluster is included
 #define ZCL_USING_FAULT_INJECTION_CLUSTER_SERVER
diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp
index 35d2c30..9e2c11a 100644
--- a/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp
+++ b/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp
@@ -1407,202 +1407,6 @@
 
 } // namespace TargetNavigator
 
-namespace TestCluster {
-
-void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
-{
-    CHIP_ERROR TLVError = CHIP_NO_ERROR;
-    bool wasHandled     = false;
-    {
-        switch (aCommandPath.mCommandId)
-        {
-        case Commands::Test::Id: {
-            Commands::Test::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNotHandled::Id: {
-            Commands::TestNotHandled::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestNotHandledCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestSpecific::Id: {
-            Commands::TestSpecific::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestSpecificCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestAddArguments::Id: {
-            Commands::TestAddArguments::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestAddArgumentsCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestStructArgumentRequest::Id: {
-            Commands::TestStructArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNestedStructArgumentRequest::Id: {
-            Commands::TestNestedStructArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestNestedStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestListStructArgumentRequest::Id: {
-            Commands::TestListStructArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestListStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestListInt8UArgumentRequest::Id: {
-            Commands::TestListInt8UArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestListInt8UArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNestedStructListArgumentRequest::Id: {
-            Commands::TestNestedStructListArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestListNestedStructListArgumentRequest::Id: {
-            Commands::TestListNestedStructListArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestListNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath,
-                                                                                                      commandData);
-            }
-            break;
-        }
-        case Commands::TestListInt8UReverseRequest::Id: {
-            Commands::TestListInt8UReverseRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestListInt8UReverseRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestEnumsRequest::Id: {
-            Commands::TestEnumsRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestEnumsRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestNullableOptionalRequest::Id: {
-            Commands::TestNullableOptionalRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestNullableOptionalRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::SimpleStructEchoRequest::Id: {
-            Commands::SimpleStructEchoRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterSimpleStructEchoRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TimedInvokeRequest::Id: {
-            Commands::TimedInvokeRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTimedInvokeRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestSimpleOptionalArgumentRequest::Id: {
-            Commands::TestSimpleOptionalArgumentRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestSimpleOptionalArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestEmitTestEventRequest::Id: {
-            Commands::TestEmitTestEventRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled = emberAfTestClusterClusterTestEmitTestEventRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        case Commands::TestEmitTestFabricScopedEventRequest::Id: {
-            Commands::TestEmitTestFabricScopedEventRequest::DecodableType commandData;
-            TLVError = DataModel::Decode(aDataTlv, commandData);
-            if (TLVError == CHIP_NO_ERROR)
-            {
-                wasHandled =
-                    emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback(apCommandObj, aCommandPath, commandData);
-            }
-            break;
-        }
-        default: {
-            // Unrecognized command ID, error status will apply.
-            apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand);
-            ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI,
-                         ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId));
-            return;
-        }
-        }
-    }
-
-    if (CHIP_NO_ERROR != TLVError || !wasHandled)
-    {
-        apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand);
-        ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format());
-    }
-}
-
-} // namespace TestCluster
-
 namespace Thermostat {
 
 void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
@@ -1640,6 +1444,202 @@
 
 } // namespace Thermostat
 
+namespace UnitTesting {
+
+void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
+{
+    CHIP_ERROR TLVError = CHIP_NO_ERROR;
+    bool wasHandled     = false;
+    {
+        switch (aCommandPath.mCommandId)
+        {
+        case Commands::Test::Id: {
+            Commands::Test::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNotHandled::Id: {
+            Commands::TestNotHandled::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestNotHandledCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestSpecific::Id: {
+            Commands::TestSpecific::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestSpecificCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestAddArguments::Id: {
+            Commands::TestAddArguments::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestAddArgumentsCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestStructArgumentRequest::Id: {
+            Commands::TestStructArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNestedStructArgumentRequest::Id: {
+            Commands::TestNestedStructArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestNestedStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestListStructArgumentRequest::Id: {
+            Commands::TestListStructArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestListStructArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestListInt8UArgumentRequest::Id: {
+            Commands::TestListInt8UArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestListInt8UArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNestedStructListArgumentRequest::Id: {
+            Commands::TestNestedStructListArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestListNestedStructListArgumentRequest::Id: {
+            Commands::TestListNestedStructListArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestListNestedStructListArgumentRequestCallback(apCommandObj, aCommandPath,
+                                                                                                      commandData);
+            }
+            break;
+        }
+        case Commands::TestListInt8UReverseRequest::Id: {
+            Commands::TestListInt8UReverseRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestListInt8UReverseRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestEnumsRequest::Id: {
+            Commands::TestEnumsRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestEnumsRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestNullableOptionalRequest::Id: {
+            Commands::TestNullableOptionalRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestNullableOptionalRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::SimpleStructEchoRequest::Id: {
+            Commands::SimpleStructEchoRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterSimpleStructEchoRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TimedInvokeRequest::Id: {
+            Commands::TimedInvokeRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTimedInvokeRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestSimpleOptionalArgumentRequest::Id: {
+            Commands::TestSimpleOptionalArgumentRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestSimpleOptionalArgumentRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestEmitTestEventRequest::Id: {
+            Commands::TestEmitTestEventRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled = emberAfUnitTestingClusterTestEmitTestEventRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        case Commands::TestEmitTestFabricScopedEventRequest::Id: {
+            Commands::TestEmitTestFabricScopedEventRequest::DecodableType commandData;
+            TLVError = DataModel::Decode(aDataTlv, commandData);
+            if (TLVError == CHIP_NO_ERROR)
+            {
+                wasHandled =
+                    emberAfUnitTestingClusterTestEmitTestFabricScopedEventRequestCallback(apCommandObj, aCommandPath, commandData);
+            }
+            break;
+        }
+        default: {
+            // Unrecognized command ID, error status will apply.
+            apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand);
+            ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI,
+                         ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId));
+            return;
+        }
+        }
+    }
+
+    if (CHIP_NO_ERROR != TLVError || !wasHandled)
+    {
+        apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand);
+        ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format());
+    }
+}
+
+} // namespace UnitTesting
+
 namespace WindowCovering {
 
 void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv)
@@ -1778,12 +1778,12 @@
     case Clusters::TargetNavigator::Id:
         Clusters::TargetNavigator::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
-    case Clusters::TestCluster::Id:
-        Clusters::TestCluster::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
-        break;
     case Clusters::Thermostat::Id:
         Clusters::Thermostat::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
+    case Clusters::UnitTesting::Id:
+        Clusters::UnitTesting::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
+        break;
     case Clusters::WindowCovering::Id:
         Clusters::WindowCovering::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
         break;
diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-minimal-app/zap-generated/callback-stub.cpp
index 344bbe4..c47f2d2 100644
--- a/zzz_generated/all-clusters-minimal-app/zap-generated/callback-stub.cpp
+++ b/zzz_generated/all-clusters-minimal-app/zap-generated/callback-stub.cpp
@@ -176,9 +176,6 @@
     case ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID:
         emberAfTemperatureMeasurementClusterInitCallback(endpoint);
         break;
-    case ZCL_TEST_CLUSTER_ID:
-        emberAfTestClusterClusterInitCallback(endpoint);
-        break;
     case ZCL_THERMOSTAT_CLUSTER_ID:
         emberAfThermostatClusterInitCallback(endpoint);
         break;
@@ -194,6 +191,9 @@
     case ZCL_UNIT_LOCALIZATION_CLUSTER_ID:
         emberAfUnitLocalizationClusterInitCallback(endpoint);
         break;
+    case ZCL_UNIT_TESTING_CLUSTER_ID:
+        emberAfUnitTestingClusterInitCallback(endpoint);
+        break;
     case ZCL_USER_LABEL_CLUSTER_ID:
         emberAfUserLabelClusterInitCallback(endpoint);
         break;
@@ -457,11 +457,6 @@
     // To prevent warning
     (void) endpoint;
 }
-void __attribute__((weak)) emberAfTestClusterClusterInitCallback(EndpointId endpoint)
-{
-    // To prevent warning
-    (void) endpoint;
-}
 void __attribute__((weak)) emberAfThermostatClusterInitCallback(EndpointId endpoint)
 {
     // To prevent warning
@@ -487,6 +482,11 @@
     // To prevent warning
     (void) endpoint;
 }
+void __attribute__((weak)) emberAfUnitTestingClusterInitCallback(EndpointId endpoint)
+{
+    // To prevent warning
+    (void) endpoint;
+}
 void __attribute__((weak)) emberAfUserLabelClusterInitCallback(EndpointId endpoint)
 {
     // To prevent warning
diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h
index aebb585..4f74637 100644
--- a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h
+++ b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h
@@ -54,7 +54,7 @@
             /* 20 - Description, */                                                                                                \
             6, 'C', 'o', 'f', 'f', 'e', 'e',                                                                                       \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */                                                          \
+            /* Endpoint: 1, Cluster: Unit Testing (server), big-endian */                                                          \
                                                                                                                                    \
             /* 27 - bitmap64, */                                                                                                   \
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                        \
@@ -154,7 +154,7 @@
             /* 20 - Description, */                                                                                                \
             6, 'C', 'o', 'f', 'f', 'e', 'e',                                                                                       \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */                                                       \
+            /* Endpoint: 1, Cluster: Unit Testing (server), little-endian */                                                       \
                                                                                                                                    \
             /* 27 - bitmap64, */                                                                                                   \
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                        \
@@ -281,7 +281,7 @@
             { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* temperature display mode */                                     \
             { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* keypad lockout */                                               \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server) */                                                                      \
+            /* Endpoint: 1, Cluster: Unit Testing (server) */                                                                      \
             { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 },   /* range_restricted_int8u */                                  \
             { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */                                  \
             { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 },  /* range_restricted_int16u */                                 \
@@ -831,7 +831,7 @@
             { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */                                      \
             { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) },   /* ClusterRevision */                                 \
                                                                                                                                    \
-            /* Endpoint: 1, Cluster: Test Cluster (server) */                                                                      \
+            /* Endpoint: 1, Cluster: Unit Testing (server) */                                                                      \
             { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) },    /* boolean */        \
             { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) },        /* bitmap8 */        \
             { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) },       /* bitmap16 */       \
@@ -1319,7 +1319,7 @@
   /*   GeneratedCommandList (index=156)*/ \
   0x00000001 /* GetSetupPINResponse */, \
   chip::kInvalidCommandId /* end of list */, \
-  /* Endpoint: 1, Cluster: Test Cluster (server) */\
+  /* Endpoint: 1, Cluster: Unit Testing (server) */\
   /*   AcceptedCommandList (index=158) */ \
   0x00000000 /* Test */, \
   0x00000001 /* TestNotHandled */, \
@@ -2122,7 +2122,7 @@
       .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ) ,\
     },\
   { \
-      /* Endpoint: 1, Cluster: Test Cluster (server) */ \
+      /* Endpoint: 1, Cluster: Unit Testing (server) */ \
       .clusterId = 0xFFF1FC05,  \
       .attributes = ZAP_ATTRIBUTE_INDEX(323), \
       .attributeCount = 82, \
diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/gen_config.h
index 1f7d89b..024f58e 100644
--- a/zzz_generated/all-clusters-minimal-app/zap-generated/gen_config.h
+++ b/zzz_generated/all-clusters-minimal-app/zap-generated/gen_config.h
@@ -87,7 +87,7 @@
 #define EMBER_AF_APPLICATION_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 #define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT (1)
-#define EMBER_AF_TEST_CLUSTER_SERVER_ENDPOINT_COUNT (1)
+#define EMBER_AF_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
 
 /**** Cluster Plugins ****/
 
@@ -400,7 +400,7 @@
 #define EMBER_AF_PLUGIN_ACCOUNT_LOGIN_SERVER
 #define EMBER_AF_PLUGIN_ACCOUNT_LOGIN
 
-// Use this macro to check if the server side of the Test Cluster cluster is included
-#define ZCL_USING_TEST_CLUSTER_SERVER
-#define EMBER_AF_PLUGIN_TEST_CLUSTER_SERVER
-#define EMBER_AF_PLUGIN_TEST_CLUSTER
+// Use this macro to check if the server side of the Unit Testing cluster is included
+#define ZCL_USING_UNIT_TESTING_CLUSTER_SERVER
+#define EMBER_AF_PLUGIN_UNIT_TESTING_SERVER
+#define EMBER_AF_PLUGIN_UNIT_TESTING
diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h
index 7a0ec24..ae5e84a 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h
@@ -1133,7 +1133,7 @@
 #define ZCL_RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID (0x0A16)
 #define ZCL_RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID (0x0A17)
 
-// Attribute ids for cluster: Test Cluster
+// Attribute ids for cluster: Unit Testing
 
 // Client attributes
 
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
index ec5fc6f..26b721b 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
@@ -27727,7 +27727,7 @@
 } // namespace Attributes
 } // namespace ElectricalMeasurement
 
-namespace TestCluster {
+namespace UnitTesting {
 namespace Attributes {
 
 namespace Boolean {
@@ -27737,7 +27737,7 @@
     using Traits = NumericAttributeTraits<bool>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27756,19 +27756,19 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 } // namespace Boolean
 
 namespace Bitmap8 {
 
-EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> * value)
+EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> * value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27777,9 +27777,9 @@
     *value = Traits::StorageToWorking(temp);
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -27787,19 +27787,19 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE);
 }
 
 } // namespace Bitmap8
 
 namespace Bitmap16 {
 
-EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> * value)
+EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> * value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27808,9 +27808,9 @@
     *value = Traits::StorageToWorking(temp);
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -27818,19 +27818,19 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE);
 }
 
 } // namespace Bitmap16
 
 namespace Bitmap32 {
 
-EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> * value)
+EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> * value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27839,9 +27839,9 @@
     *value = Traits::StorageToWorking(temp);
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -27849,19 +27849,19 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
 }
 
 } // namespace Bitmap32
 
 namespace Bitmap64 {
 
-EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> * value)
+EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> * value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27870,9 +27870,9 @@
     *value = Traits::StorageToWorking(temp);
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -27880,7 +27880,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE);
 }
 
 } // namespace Bitmap64
@@ -27892,7 +27892,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27911,7 +27911,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int8u
@@ -27923,7 +27923,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27942,7 +27942,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int16u
@@ -27954,7 +27954,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<3, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -27973,7 +27973,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int24u
@@ -27985,7 +27985,7 @@
     using Traits = NumericAttributeTraits<uint32_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28004,7 +28004,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int32u
@@ -28016,7 +28016,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<5, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28035,7 +28035,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int40u
@@ -28047,7 +28047,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<6, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28066,7 +28066,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int48u
@@ -28078,7 +28078,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<7, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28097,7 +28097,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int56u
@@ -28109,7 +28109,7 @@
     using Traits = NumericAttributeTraits<uint64_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28128,7 +28128,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int64u
@@ -28140,7 +28140,7 @@
     using Traits = NumericAttributeTraits<int8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28159,7 +28159,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int8s
@@ -28171,7 +28171,7 @@
     using Traits = NumericAttributeTraits<int16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28190,7 +28190,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int16s
@@ -28202,7 +28202,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<3, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28221,7 +28221,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int24s
@@ -28233,7 +28233,7 @@
     using Traits = NumericAttributeTraits<int32_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28252,7 +28252,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int32s
@@ -28264,7 +28264,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<5, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28283,7 +28283,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int40s
@@ -28295,7 +28295,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<6, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28314,7 +28314,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int48s
@@ -28326,7 +28326,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<7, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28345,7 +28345,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int56s
@@ -28357,7 +28357,7 @@
     using Traits = NumericAttributeTraits<int64_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28376,7 +28376,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE);
 }
 
 } // namespace Int64s
@@ -28388,7 +28388,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28407,7 +28407,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
 }
 
 } // namespace Enum8
@@ -28419,7 +28419,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28438,7 +28438,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
 }
 
 } // namespace Enum16
@@ -28450,7 +28450,7 @@
     using Traits = NumericAttributeTraits<float>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28469,7 +28469,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
 }
 
 } // namespace FloatSingle
@@ -28481,7 +28481,7 @@
     using Traits = NumericAttributeTraits<double>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28500,7 +28500,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE);
 }
 
 } // namespace FloatDouble
@@ -28510,7 +28510,7 @@
 EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value)
 {
     uint8_t zclString[10 + 1];
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     size_t length = emberAfStringLength(zclString);
     if (length == NumericAttributeTraits<uint8_t>::kNullValue)
@@ -28530,7 +28530,7 @@
     uint8_t zclString[10 + 1];
     emberAfCopyInt8u(zclString, 0, static_cast<uint8_t>(value.size()));
     memcpy(&zclString[1], value.data(), value.size());
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
 }
 
 } // namespace OctetString
@@ -28540,7 +28540,7 @@
 EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value)
 {
     uint8_t zclString[1000 + 2];
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     size_t length = emberAfLongStringLength(zclString);
     if (length == NumericAttributeTraits<uint16_t>::kNullValue)
@@ -28560,7 +28560,7 @@
     uint8_t zclString[1000 + 2];
     emberAfCopyInt16u(zclString, 0, static_cast<uint16_t>(value.size()));
     memcpy(&zclString[2], value.data(), value.size());
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE);
 }
 
 } // namespace LongOctetString
@@ -28570,7 +28570,7 @@
 EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value)
 {
     uint8_t zclString[10 + 1];
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     size_t length = emberAfStringLength(zclString);
     if (length == NumericAttributeTraits<uint8_t>::kNullValue)
@@ -28590,7 +28590,7 @@
     uint8_t zclString[10 + 1];
     emberAfCopyInt8u(zclString, 0, static_cast<uint8_t>(value.size()));
     memcpy(&zclString[1], value.data(), value.size());
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
 }
 
 } // namespace CharString
@@ -28600,7 +28600,7 @@
 EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value)
 {
     uint8_t zclString[1000 + 2];
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     size_t length = emberAfLongStringLength(zclString);
     if (length == NumericAttributeTraits<uint16_t>::kNullValue)
@@ -28620,7 +28620,7 @@
     uint8_t zclString[1000 + 2];
     emberAfCopyInt16u(zclString, 0, static_cast<uint16_t>(value.size()));
     memcpy(&zclString[2], value.data(), value.size());
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE);
 }
 
 } // namespace LongCharString
@@ -28632,7 +28632,7 @@
     using Traits = NumericAttributeTraits<uint64_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28651,7 +28651,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE);
 }
 
 } // namespace EpochUs
@@ -28663,7 +28663,7 @@
     using Traits = NumericAttributeTraits<uint32_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28682,7 +28682,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
 }
 
 } // namespace EpochS
@@ -28694,7 +28694,7 @@
     using Traits = NumericAttributeTraits<chip::VendorId>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28713,19 +28713,19 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE);
 }
 
 } // namespace VendorId
 
 namespace EnumAttr {
 
-EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum * value)
+EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum * value)
 {
-    using Traits = NumericAttributeTraits<chip::app::Clusters::TestCluster::SimpleEnum>;
+    using Traits = NumericAttributeTraits<chip::app::Clusters::UnitTesting::SimpleEnum>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28734,9 +28734,9 @@
     *value = Traits::StorageToWorking(temp);
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value)
 {
-    using Traits = NumericAttributeTraits<chip::app::Clusters::TestCluster::SimpleEnum>;
+    using Traits = NumericAttributeTraits<chip::app::Clusters::UnitTesting::SimpleEnum>;
     if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -28744,7 +28744,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
 }
 
 } // namespace EnumAttr
@@ -28756,7 +28756,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28775,7 +28775,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 } // namespace RangeRestrictedInt8u
@@ -28787,7 +28787,7 @@
     using Traits = NumericAttributeTraits<int8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28806,7 +28806,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
 }
 
 } // namespace RangeRestrictedInt8s
@@ -28818,7 +28818,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28837,7 +28837,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 } // namespace RangeRestrictedInt16u
@@ -28849,7 +28849,7 @@
     using Traits = NumericAttributeTraits<int16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28868,7 +28868,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
 }
 
 } // namespace RangeRestrictedInt16s
@@ -28880,7 +28880,7 @@
     using Traits = NumericAttributeTraits<bool>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28899,7 +28899,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 } // namespace TimedWriteBoolean
@@ -28911,7 +28911,7 @@
     using Traits = NumericAttributeTraits<bool>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28930,7 +28930,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 } // namespace GeneralErrorBoolean
@@ -28942,7 +28942,7 @@
     using Traits = NumericAttributeTraits<bool>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28961,7 +28961,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 } // namespace ClusterErrorBoolean
@@ -28973,7 +28973,7 @@
     using Traits = NumericAttributeTraits<bool>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -28992,7 +28992,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 } // namespace Unsupported
@@ -29004,7 +29004,7 @@
     using Traits = NumericAttributeTraits<bool>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29026,7 +29026,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29035,7 +29035,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<bool> & value)
@@ -29053,12 +29053,12 @@
 namespace NullableBitmap8 {
 
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value)
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29070,9 +29070,9 @@
     }
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -29080,20 +29080,20 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value)
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value)
 {
     if (value.IsNull())
     {
@@ -29108,12 +29108,12 @@
 namespace NullableBitmap16 {
 
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value)
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29125,9 +29125,9 @@
     }
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -29135,20 +29135,20 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value)
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value)
 {
     if (value.IsNull())
     {
@@ -29163,12 +29163,12 @@
 namespace NullableBitmap32 {
 
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value)
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29180,9 +29180,9 @@
     }
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -29190,20 +29190,20 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value)
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value)
 {
     if (value.IsNull())
     {
@@ -29218,12 +29218,12 @@
 namespace NullableBitmap64 {
 
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value)
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29235,9 +29235,9 @@
     }
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
     if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -29245,20 +29245,20 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
-    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
+    using Traits = NumericAttributeTraits<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value)
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value)
 {
     if (value.IsNull())
     {
@@ -29277,7 +29277,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29299,7 +29299,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29308,7 +29308,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint8_t> & value)
@@ -29330,7 +29330,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29352,7 +29352,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29361,7 +29361,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint16_t> & value)
@@ -29383,7 +29383,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<3, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29405,7 +29405,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29414,7 +29414,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value)
@@ -29436,7 +29436,7 @@
     using Traits = NumericAttributeTraits<uint32_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29458,7 +29458,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29467,7 +29467,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value)
@@ -29489,7 +29489,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<5, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29511,7 +29511,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29520,7 +29520,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint64_t> & value)
@@ -29542,7 +29542,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<6, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29564,7 +29564,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29573,7 +29573,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint64_t> & value)
@@ -29595,7 +29595,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<7, false>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29617,7 +29617,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29626,7 +29626,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint64_t> & value)
@@ -29648,7 +29648,7 @@
     using Traits = NumericAttributeTraits<uint64_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29670,7 +29670,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29679,7 +29679,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint64_t> & value)
@@ -29701,7 +29701,7 @@
     using Traits = NumericAttributeTraits<int8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29723,7 +29723,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29732,7 +29732,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int8_t> & value)
@@ -29754,7 +29754,7 @@
     using Traits = NumericAttributeTraits<int16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29776,7 +29776,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29785,7 +29785,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int16_t> & value)
@@ -29807,7 +29807,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<3, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29829,7 +29829,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29838,7 +29838,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int32_t> & value)
@@ -29860,7 +29860,7 @@
     using Traits = NumericAttributeTraits<int32_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29882,7 +29882,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29891,7 +29891,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int32_t> & value)
@@ -29913,7 +29913,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<5, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29935,7 +29935,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29944,7 +29944,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int64_t> & value)
@@ -29966,7 +29966,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<6, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -29988,7 +29988,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -29997,7 +29997,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int64_t> & value)
@@ -30019,7 +30019,7 @@
     using Traits = NumericAttributeTraits<OddSizedInteger<7, true>>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30041,7 +30041,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30050,7 +30050,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int64_t> & value)
@@ -30072,7 +30072,7 @@
     using Traits = NumericAttributeTraits<int64_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30094,7 +30094,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30103,7 +30103,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int64_t> & value)
@@ -30125,7 +30125,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30147,7 +30147,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30156,7 +30156,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint8_t> & value)
@@ -30178,7 +30178,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30200,7 +30200,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30209,7 +30209,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint16_t> & value)
@@ -30231,7 +30231,7 @@
     using Traits = NumericAttributeTraits<float>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30253,7 +30253,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30262,7 +30262,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<float> & value)
@@ -30284,7 +30284,7 @@
     using Traits = NumericAttributeTraits<double>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30306,7 +30306,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30315,7 +30315,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<double> & value)
@@ -30335,7 +30335,7 @@
 EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable<chip::MutableByteSpan> & value)
 {
     uint8_t zclString[10 + 1];
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     size_t length = emberAfStringLength(zclString);
     if (length == NumericAttributeTraits<uint8_t>::kNullValue)
@@ -30357,13 +30357,13 @@
     uint8_t zclString[10 + 1];
     emberAfCopyInt8u(zclString, 0, static_cast<uint8_t>(value.size()));
     memcpy(&zclString[1], value.data(), value.size());
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
     uint8_t zclString[1] = { 0xFF };
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<chip::ByteSpan> & value)
@@ -30383,7 +30383,7 @@
 EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value)
 {
     uint8_t zclString[10 + 1];
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     size_t length = emberAfStringLength(zclString);
     if (length == NumericAttributeTraits<uint8_t>::kNullValue)
@@ -30405,13 +30405,13 @@
     uint8_t zclString[10 + 1];
     emberAfCopyInt8u(zclString, 0, static_cast<uint8_t>(value.size()));
     memcpy(&zclString[1], value.data(), value.size());
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
     uint8_t zclString[1] = { 0xFF };
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value)
@@ -30428,12 +30428,12 @@
 
 namespace NullableEnumAttr {
 
-EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value)
+EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value)
 {
-    using Traits = NumericAttributeTraits<chip::app::Clusters::TestCluster::SimpleEnum>;
+    using Traits = NumericAttributeTraits<chip::app::Clusters::UnitTesting::SimpleEnum>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30445,9 +30445,9 @@
     }
     return status;
 }
-EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value)
+EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value)
 {
-    using Traits = NumericAttributeTraits<chip::app::Clusters::TestCluster::SimpleEnum>;
+    using Traits = NumericAttributeTraits<chip::app::Clusters::UnitTesting::SimpleEnum>;
     if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
     {
         return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
@@ -30455,20 +30455,20 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
 {
-    using Traits = NumericAttributeTraits<chip::app::Clusters::TestCluster::SimpleEnum>;
+    using Traits = NumericAttributeTraits<chip::app::Clusters::UnitTesting::SimpleEnum>;
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value)
+                  const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value)
 {
     if (value.IsNull())
     {
@@ -30487,7 +30487,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30509,7 +30509,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30518,7 +30518,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint8_t> & value)
@@ -30540,7 +30540,7 @@
     using Traits = NumericAttributeTraits<int8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30562,7 +30562,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30571,7 +30571,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int8_t> & value)
@@ -30593,7 +30593,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30615,7 +30615,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30624,7 +30624,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<uint16_t> & value)
@@ -30646,7 +30646,7 @@
     using Traits = NumericAttributeTraits<int16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (Traits::IsNullValue(temp))
     {
@@ -30668,7 +30668,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus SetNull(chip::EndpointId endpoint)
@@ -30677,7 +30677,7 @@
     Traits::StorageType value;
     Traits::SetNull(value);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
 }
 
 EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable<int16_t> & value)
@@ -30699,7 +30699,7 @@
     using Traits = NumericAttributeTraits<uint8_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -30718,7 +30718,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
 }
 
 } // namespace WriteOnlyInt8u
@@ -30730,7 +30730,7 @@
     using Traits = NumericAttributeTraits<uint32_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -30749,7 +30749,7 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
 }
 
 } // namespace FeatureMap
@@ -30761,7 +30761,7 @@
     using Traits = NumericAttributeTraits<uint16_t>;
     Traits::StorageType temp;
     uint8_t * readable   = Traits::ToAttributeStoreRepresentation(temp);
-    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp));
+    EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp));
     VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
     if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
     {
@@ -30780,13 +30780,13 @@
     Traits::StorageType storageValue;
     Traits::WorkingToStorage(value, storageValue);
     uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
-    return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+    return emberAfWriteServerAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
 }
 
 } // namespace ClusterRevision
 
 } // namespace Attributes
-} // namespace TestCluster
+} // namespace UnitTesting
 
 namespace FaultInjection {
 namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index c7543c2..9f533ae 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -4651,7 +4651,7 @@
 } // namespace Attributes
 } // namespace ElectricalMeasurement
 
-namespace TestCluster {
+namespace UnitTesting {
 namespace Attributes {
 
 namespace Boolean {
@@ -4661,26 +4661,26 @@
 
 namespace Bitmap8 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> * value); // Bitmap8MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value);
+                  chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> * value); // Bitmap8MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value);
 } // namespace Bitmap8
 
 namespace Bitmap16 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> * value); // Bitmap16MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value);
+                  chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> * value); // Bitmap16MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value);
 } // namespace Bitmap16
 
 namespace Bitmap32 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> * value); // Bitmap32MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value);
+                  chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> * value); // Bitmap32MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value);
 } // namespace Bitmap32
 
 namespace Bitmap64 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> * value); // Bitmap64MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value);
+                  chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> * value); // Bitmap64MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value);
 } // namespace Bitmap64
 
 namespace Int8u {
@@ -4819,8 +4819,8 @@
 } // namespace VendorId
 
 namespace EnumAttr {
-EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum * value); // SimpleEnum
-EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value);
+EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum * value); // SimpleEnum
+EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value);
 } // namespace EnumAttr
 
 namespace RangeRestrictedInt8u {
@@ -4872,38 +4872,38 @@
 
 namespace NullableBitmap8 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value); // Bitmap8MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value);
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value); // Bitmap8MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value);
 EmberAfStatus SetNull(chip::EndpointId endpoint);
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> & value);
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> & value);
 } // namespace NullableBitmap8
 
 namespace NullableBitmap16 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value); // Bitmap16MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value);
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value); // Bitmap16MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value);
 EmberAfStatus SetNull(chip::EndpointId endpoint);
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> & value);
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> & value);
 } // namespace NullableBitmap16
 
 namespace NullableBitmap32 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value); // Bitmap32MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value);
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value); // Bitmap32MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value);
 EmberAfStatus SetNull(chip::EndpointId endpoint);
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> & value);
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> & value);
 } // namespace NullableBitmap32
 
 namespace NullableBitmap64 {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value); // Bitmap64MaskMap
-EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value);
+                  DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value); // Bitmap64MaskMap
+EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value);
 EmberAfStatus SetNull(chip::EndpointId endpoint);
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> & value);
+                  const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> & value);
 } // namespace NullableBitmap64
 
 namespace NullableInt8u {
@@ -5062,11 +5062,11 @@
 
 namespace NullableEnumAttr {
 EmberAfStatus Get(chip::EndpointId endpoint,
-                  DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value); // SimpleEnum
-EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value);
+                  DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value); // SimpleEnum
+EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value);
 EmberAfStatus SetNull(chip::EndpointId endpoint);
 EmberAfStatus Set(chip::EndpointId endpoint,
-                  const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> & value);
+                  const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> & value);
 } // namespace NullableEnumAttr
 
 namespace NullableRangeRestrictedInt8u {
@@ -5113,7 +5113,7 @@
 } // namespace ClusterRevision
 
 } // namespace Attributes
-} // namespace TestCluster
+} // namespace UnitTesting
 
 namespace FaultInjection {
 namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h
index 88e3853..b10f7a4 100644
--- a/zzz_generated/app-common/app-common/zap-generated/callback.h
+++ b/zzz_generated/app-common/app-common/zap-generated/callback.h
@@ -597,13 +597,13 @@
  */
 void emberAfElectricalMeasurementClusterInitCallback(chip::EndpointId endpoint);
 
-/** @brief Test Cluster Cluster Init
+/** @brief Unit Testing Cluster Init
  *
  * Cluster Init
  *
  * @param endpoint    Endpoint that is being initialized
  */
-void emberAfTestClusterClusterInitCallback(chip::EndpointId endpoint);
+void emberAfUnitTestingClusterInitCallback(chip::EndpointId endpoint);
 
 /** @brief Fault Injection Cluster Init
  *
@@ -7267,34 +7267,34 @@
 void emberAfElectricalMeasurementClusterClientTickCallback(chip::EndpointId endpoint);
 
 //
-// Test Cluster Cluster
+// Unit Testing Cluster
 //
 
-/** @brief Test Cluster Cluster Server Init
+/** @brief Unit Testing Cluster Server Init
  *
  * Server Init
  *
  * @param endpoint    Endpoint that is being initialized
  */
-void emberAfTestClusterClusterServerInitCallback(chip::EndpointId endpoint);
+void emberAfUnitTestingClusterServerInitCallback(chip::EndpointId endpoint);
 
-/** @brief Test Cluster Cluster Client Init
+/** @brief Unit Testing Cluster Client Init
  *
  * Client Init
  *
  * @param endpoint    Endpoint that is being initialized
  */
-void emberAfTestClusterClusterClientInitCallback(chip::EndpointId endpoint);
+void emberAfUnitTestingClusterClientInitCallback(chip::EndpointId endpoint);
 
-/** @brief Test Cluster Cluster Server Attribute Changed
+/** @brief Unit Testing Cluster Server Attribute Changed
  *
  * Server Attribute Changed
  *
  * @param attributePath Concrete attribute path that changed
  */
-void MatterTestClusterClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
+void MatterUnitTestingClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
 
-/** @brief Test Cluster Cluster Server Message Sent
+/** @brief Unit Testing Cluster Server Message Sent
  *
  * Server Message Sent
  *
@@ -7304,10 +7304,10 @@
  * @param message            The message that was sent
  * @param status             The status of the sent message
  */
-void emberAfTestClusterClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame,
+void emberAfUnitTestingClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame,
                                                         uint16_t msgLen, uint8_t * message, EmberStatus status);
 
-/** @brief Test Cluster Cluster Client Message Sent
+/** @brief Unit Testing Cluster Client Message Sent
  *
  * Client Message Sent
  *
@@ -7317,10 +7317,10 @@
  * @param message            The message that was sent
  * @param status             The status of the sent message
  */
-void emberAfTestClusterClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame,
+void emberAfUnitTestingClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame,
                                                         uint16_t msgLen, uint8_t * message, EmberStatus status);
 
-/** @brief Test Cluster Cluster Server Pre Attribute Changed
+/** @brief Unit Testing Cluster Server Pre Attribute Changed
  *
  * Server Pre Attribute Changed
  *
@@ -7330,10 +7330,10 @@
  * @param value         Attribute value
  */
 chip::Protocols::InteractionModel::Status
-MatterTestClusterClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
+MatterUnitTestingClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
                                                           EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
 
-/** @brief Test Cluster Cluster Client Pre Attribute Changed
+/** @brief Unit Testing Cluster Client Pre Attribute Changed
  *
  * Client Pre Attribute Changed
  *
@@ -7343,24 +7343,24 @@
  * @param value         Attribute value
  */
 chip::Protocols::InteractionModel::Status
-MatterTestClusterClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
+MatterUnitTestingClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
                                                           EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
 
-/** @brief Test Cluster Cluster Server Tick
+/** @brief Unit Testing Cluster Server Tick
  *
  * Server Tick
  *
  * @param endpoint  Endpoint that is being served
  */
-void emberAfTestClusterClusterServerTickCallback(chip::EndpointId endpoint);
+void emberAfUnitTestingClusterServerTickCallback(chip::EndpointId endpoint);
 
-/** @brief Test Cluster Cluster Client Tick
+/** @brief Unit Testing Cluster Client Tick
  *
  * Client Tick
  *
  * @param endpoint  Endpoint that is being served
  */
-void emberAfTestClusterClusterClientTickCallback(chip::EndpointId endpoint);
+void emberAfUnitTestingClusterClientTickCallback(chip::EndpointId endpoint);
 
 //
 // Fault Injection Cluster
@@ -8707,212 +8707,212 @@
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
     const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster Test Command callback (from client)
+ * @brief Unit Testing Cluster Test Command callback (from client)
  */
-bool emberAfTestClusterClusterTestCallback(chip::app::CommandHandler * commandObj,
+bool emberAfUnitTestingClusterTestCallback(chip::app::CommandHandler * commandObj,
                                            const chip::app::ConcreteCommandPath & commandPath,
-                                           const chip::app::Clusters::TestCluster::Commands::Test::DecodableType & commandData);
+                                           const chip::app::Clusters::UnitTesting::Commands::Test::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestSpecificResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestSpecificResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestSpecificResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestSpecificResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                            uint8_t returnValue);
 /**
- * @brief Test Cluster Cluster TestNotHandled Command callback (from client)
+ * @brief Unit Testing Cluster TestNotHandled Command callback (from client)
  */
-bool emberAfTestClusterClusterTestNotHandledCallback(
+bool emberAfUnitTestingClusterTestNotHandledCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestNotHandled::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestNotHandled::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestAddArgumentsResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestAddArgumentsResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestAddArgumentsResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestAddArgumentsResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                                uint8_t returnValue);
 /**
- * @brief Test Cluster Cluster TestSpecific Command callback (from client)
+ * @brief Unit Testing Cluster TestSpecific Command callback (from client)
  */
-bool emberAfTestClusterClusterTestSpecificCallback(
+bool emberAfUnitTestingClusterTestSpecificCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestSpecific::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestSpecific::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestSimpleArgumentResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestSimpleArgumentResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestSimpleArgumentResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestSimpleArgumentResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                                  bool returnValue);
 /**
- * @brief Test Cluster Cluster TestUnknownCommand Command callback (from client)
+ * @brief Unit Testing Cluster TestUnknownCommand Command callback (from client)
  */
-bool emberAfTestClusterClusterTestUnknownCommandCallback(
+bool emberAfUnitTestingClusterTestUnknownCommandCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestStructArrayArgumentResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestStructArrayArgumentResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestStructArrayArgumentResponseCallback(
+bool emberAfUnitTestingClusterTestStructArrayArgumentResponseCallback(
     chip::EndpointId endpoint, chip::app::CommandSender * commandObj, /* TYPE WARNING: array array defaults to */ uint8_t * arg1,
     /* TYPE WARNING: array array defaults to */ uint8_t * arg2, /* TYPE WARNING: array array defaults to */ uint8_t * arg3,
     /* TYPE WARNING: array array defaults to */ uint8_t * arg4, uint8_t arg5, bool arg6);
 /**
- * @brief Test Cluster Cluster TestAddArguments Command callback (from client)
+ * @brief Unit Testing Cluster TestAddArguments Command callback (from client)
  */
-bool emberAfTestClusterClusterTestAddArgumentsCallback(
+bool emberAfUnitTestingClusterTestAddArgumentsCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestAddArguments::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestAddArguments::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestListInt8UReverseResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestListInt8UReverseResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestListInt8UReverseResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestListInt8UReverseResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                                    /* TYPE WARNING: array array defaults to */ uint8_t * arg1);
 /**
- * @brief Test Cluster Cluster TestSimpleArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestSimpleArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestSimpleArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestSimpleArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestEnumsResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestEnumsResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestEnumsResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestEnumsResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                         chip::VendorId arg1, uint8_t arg2);
 /**
- * @brief Test Cluster Cluster TestStructArrayArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestStructArrayArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestStructArrayArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestStructArrayArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestNullableOptionalResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestNullableOptionalResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestNullableOptionalResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestNullableOptionalResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                                    bool wasPresent, bool wasNull, uint8_t value,
                                                                    uint8_t originalValue);
 /**
- * @brief Test Cluster Cluster TestStructArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestStructArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestStructArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestStructArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestComplexNullableOptionalResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestComplexNullableOptionalResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestComplexNullableOptionalResponseCallback(
+bool emberAfUnitTestingClusterTestComplexNullableOptionalResponseCallback(
     chip::EndpointId endpoint, chip::app::CommandSender * commandObj, bool NullableIntWasNull, uint16_t NullableIntValue,
     bool OptionalIntWasPresent, uint16_t OptionalIntValue, bool NullableOptionalIntWasPresent, bool NullableOptionalIntWasNull,
     uint16_t NullableOptionalIntValue, bool NullableStringWasNull, chip::CharSpan NullableStringValue,
     bool OptionalStringWasPresent, chip::CharSpan OptionalStringValue, bool NullableOptionalStringWasPresent,
     bool NullableOptionalStringWasNull, chip::CharSpan NullableOptionalStringValue, bool NullableStructWasNull,
-    chip::Optional<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> NullableStructValue,
+    chip::Optional<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> NullableStructValue,
     bool OptionalStructWasPresent,
-    chip::Optional<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> OptionalStructValue,
+    chip::Optional<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> OptionalStructValue,
     bool NullableOptionalStructWasPresent, bool NullableOptionalStructWasNull,
-    chip::Optional<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> NullableOptionalStructValue,
+    chip::Optional<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> NullableOptionalStructValue,
     bool NullableListWasNull, /* TYPE WARNING: array array defaults to */ uint8_t * NullableListValue, bool OptionalListWasPresent,
     /* TYPE WARNING: array array defaults to */ uint8_t * OptionalListValue, bool NullableOptionalListWasPresent,
     bool NullableOptionalListWasNull, /* TYPE WARNING: array array defaults to */ uint8_t * NullableOptionalListValue);
 /**
- * @brief Test Cluster Cluster TestNestedStructArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestNestedStructArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestNestedStructArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestNestedStructArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster BooleanResponse Command callback (from server)
+ * @brief Unit Testing Cluster BooleanResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterBooleanResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, bool value);
+bool emberAfUnitTestingClusterBooleanResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, bool value);
 /**
- * @brief Test Cluster Cluster TestListStructArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestListStructArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestListStructArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestListStructArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster SimpleStructResponse Command callback (from server)
+ * @brief Unit Testing Cluster SimpleStructResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterSimpleStructResponseCallback(
+bool emberAfUnitTestingClusterSimpleStructResponseCallback(
     chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
-    chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType arg1);
+    chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType arg1);
 /**
- * @brief Test Cluster Cluster TestListInt8UArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestListInt8UArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestListInt8UArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestListInt8UArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestEmitTestEventResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestEmitTestEventResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestEmitTestEventResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+bool emberAfUnitTestingClusterTestEmitTestEventResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
                                                                 uint64_t value);
 /**
- * @brief Test Cluster Cluster TestNestedStructListArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestNestedStructListArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestNestedStructListArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestNestedStructListArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestEmitTestFabricScopedEventResponse Command callback (from server)
+ * @brief Unit Testing Cluster TestEmitTestFabricScopedEventResponse Command callback (from server)
  */
-bool emberAfTestClusterClusterTestEmitTestFabricScopedEventResponseCallback(chip::EndpointId endpoint,
+bool emberAfUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(chip::EndpointId endpoint,
                                                                             chip::app::CommandSender * commandObj, uint64_t value);
 /**
- * @brief Test Cluster Cluster TestListNestedStructListArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestListNestedStructListArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestListNestedStructListArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestListNestedStructListArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestListInt8UReverseRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestListInt8UReverseRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestListInt8UReverseRequestCallback(
+bool emberAfUnitTestingClusterTestListInt8UReverseRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestEnumsRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestEnumsRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestEnumsRequestCallback(
+bool emberAfUnitTestingClusterTestEnumsRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestNullableOptionalRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestNullableOptionalRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestNullableOptionalRequestCallback(
+bool emberAfUnitTestingClusterTestNullableOptionalRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestComplexNullableOptionalRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestComplexNullableOptionalRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestComplexNullableOptionalRequestCallback(
+bool emberAfUnitTestingClusterTestComplexNullableOptionalRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster SimpleStructEchoRequest Command callback (from client)
+ * @brief Unit Testing Cluster SimpleStructEchoRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterSimpleStructEchoRequestCallback(
+bool emberAfUnitTestingClusterSimpleStructEchoRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TimedInvokeRequest Command callback (from client)
+ * @brief Unit Testing Cluster TimedInvokeRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTimedInvokeRequestCallback(
+bool emberAfUnitTestingClusterTimedInvokeRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestSimpleOptionalArgumentRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestSimpleOptionalArgumentRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestSimpleOptionalArgumentRequestCallback(
+bool emberAfUnitTestingClusterTestSimpleOptionalArgumentRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestEmitTestEventRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestEmitTestEventRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestEmitTestEventRequestCallback(
+bool emberAfUnitTestingClusterTestEmitTestEventRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::DecodableType & commandData);
 /**
- * @brief Test Cluster Cluster TestEmitTestFabricScopedEventRequest Command callback (from client)
+ * @brief Unit Testing Cluster TestEmitTestFabricScopedEventRequest Command callback (from client)
  */
-bool emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback(
+bool emberAfUnitTestingClusterTestEmitTestFabricScopedEventRequestCallback(
     chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
-    const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::DecodableType & commandData);
+    const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::DecodableType & commandData);
 /**
  * @brief Fault Injection Cluster FailAtFault Command callback (from client)
  */
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h
index df67872..a56e91b 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h
@@ -2081,9 +2081,9 @@
     }
 }
 
-static auto __attribute__((unused)) EnsureKnownEnumValue(TestCluster::SimpleEnum val)
+static auto __attribute__((unused)) EnsureKnownEnumValue(UnitTesting::SimpleEnum val)
 {
-    using EnumType = TestCluster::SimpleEnum;
+    using EnumType = UnitTesting::SimpleEnum;
     switch (val)
     {
     case EnumType::kUnspecified:
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
index 52bf6e3..48eb466 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
@@ -2266,7 +2266,7 @@
 namespace ElectricalMeasurement {
 } // namespace ElectricalMeasurement
 
-namespace TestCluster {
+namespace UnitTesting {
 
 // Enum for SimpleEnum
 enum class SimpleEnum : uint8_t
@@ -2321,7 +2321,7 @@
     kValueB = 0x2,
     kValueC = 0x4,
 };
-} // namespace TestCluster
+} // namespace UnitTesting
 
 namespace FaultInjection {
 
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h
index 8a47a11..5833b9f 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h
@@ -229,8 +229,8 @@
 // Definitions for cluster: Electrical Measurement
 static constexpr chip::ClusterId ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04;
 
-// Definitions for cluster: Test Cluster
-static constexpr chip::ClusterId ZCL_TEST_CLUSTER_ID = 0xFFF1FC05;
+// Definitions for cluster: Unit Testing
+static constexpr chip::ClusterId ZCL_UNIT_TESTING_CLUSTER_ID = 0xFFF1FC05;
 
 // Definitions for cluster: Fault Injection
 static constexpr chip::ClusterId ZCL_FAULT_INJECTION_CLUSTER_ID = 0xFFF1FC06;
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
index c265db1..37fdb46 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
@@ -18554,7 +18554,7 @@
 } // namespace Events
 
 } // namespace ElectricalMeasurement
-namespace TestCluster {
+namespace UnitTesting {
 namespace Structs {
 namespace SimpleStruct {
 CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const
@@ -20885,7 +20885,7 @@
 } // namespace TestFabricScopedEvent.
 } // namespace Events
 
-} // namespace TestCluster
+} // namespace UnitTesting
 namespace FaultInjection {
 
 namespace Commands {
@@ -21067,10 +21067,10 @@
             return false;
         }
     }
-    case Clusters::TestCluster::Id: {
+    case Clusters::UnitTesting::Id: {
         switch (aCommand)
         {
-        case Clusters::TestCluster::Commands::TimedInvokeRequest::Id:
+        case Clusters::UnitTesting::Commands::TimedInvokeRequest::Id:
             return true;
         default:
             return false;
@@ -21401,7 +21401,7 @@
             return false;
         }
     }
-    case Clusters::TestCluster::Id: {
+    case Clusters::UnitTesting::Id: {
         switch (aCommand)
         {
         default:
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index 38aa019..29465ae 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -25184,7 +25184,7 @@
 };
 } // namespace Attributes
 } // namespace ElectricalMeasurement
-namespace TestCluster {
+namespace UnitTesting {
 namespace Structs {
 namespace SimpleStruct {
 enum class Fields
@@ -25649,7 +25649,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::Test::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
@@ -25662,7 +25662,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::Test::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Decode(TLV::TLVReader & reader);
 };
@@ -25678,7 +25678,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestSpecificResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t returnValue = static_cast<uint8_t>(0);
 
@@ -25693,7 +25693,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestSpecificResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t returnValue = static_cast<uint8_t>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -25709,7 +25709,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestNotHandled::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
@@ -25722,7 +25722,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestNotHandled::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Decode(TLV::TLVReader & reader);
 };
@@ -25738,7 +25738,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestAddArgumentsResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t returnValue = static_cast<uint8_t>(0);
 
@@ -25753,7 +25753,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestAddArgumentsResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t returnValue = static_cast<uint8_t>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -25769,11 +25769,11 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestSpecific::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -25782,7 +25782,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestSpecific::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Decode(TLV::TLVReader & reader);
 };
@@ -25798,7 +25798,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool returnValue = static_cast<bool>(0);
 
@@ -25813,7 +25813,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool returnValue = static_cast<bool>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -25829,7 +25829,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestUnknownCommand::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
@@ -25842,7 +25842,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestUnknownCommand::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Decode(TLV::TLVReader & reader);
 };
@@ -25863,7 +25863,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestStructArrayArgumentResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const Structs::NestedStructList::Type> arg1;
     DataModel::List<const Structs::SimpleStruct::Type> arg2;
@@ -25883,7 +25883,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestStructArrayArgumentResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<Structs::NestedStructList::DecodableType> arg1;
     DataModel::DecodableList<Structs::SimpleStruct::DecodableType> arg2;
@@ -25906,14 +25906,14 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestAddArguments::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1 = static_cast<uint8_t>(0);
     uint8_t arg2 = static_cast<uint8_t>(0);
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -25922,7 +25922,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestAddArguments::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1 = static_cast<uint8_t>(0);
     uint8_t arg2 = static_cast<uint8_t>(0);
@@ -25940,7 +25940,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestListInt8UReverseResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const uint8_t> arg1;
 
@@ -25955,7 +25955,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestListInt8UReverseResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<uint8_t> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -25972,13 +25972,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool arg1 = static_cast<bool>(0);
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -25987,7 +25987,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool arg1 = static_cast<bool>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26005,7 +26005,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestEnumsResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     chip::VendorId arg1 = static_cast<chip::VendorId>(0);
     SimpleEnum arg2     = static_cast<SimpleEnum>(0);
@@ -26021,7 +26021,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestEnumsResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     chip::VendorId arg1 = static_cast<chip::VendorId>(0);
     SimpleEnum arg2     = static_cast<SimpleEnum>(0);
@@ -26044,7 +26044,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestStructArrayArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const Structs::NestedStructList::Type> arg1;
     DataModel::List<const Structs::SimpleStruct::Type> arg2;
@@ -26055,7 +26055,7 @@
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26064,7 +26064,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestStructArrayArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<Structs::NestedStructList::DecodableType> arg1;
     DataModel::DecodableList<Structs::SimpleStruct::DecodableType> arg2;
@@ -26089,7 +26089,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestNullableOptionalResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool wasPresent = static_cast<bool>(0);
     Optional<bool> wasNull;
@@ -26107,7 +26107,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestNullableOptionalResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool wasPresent = static_cast<bool>(0);
     Optional<bool> wasNull;
@@ -26127,13 +26127,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestStructArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::SimpleStruct::Type arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26142,7 +26142,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestStructArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::SimpleStruct::DecodableType arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26186,7 +26186,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestComplexNullableOptionalResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool nullableIntWasNull = static_cast<bool>(0);
     Optional<uint16_t> nullableIntValue;
@@ -26228,7 +26228,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestComplexNullableOptionalResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool nullableIntWasNull = static_cast<bool>(0);
     Optional<uint16_t> nullableIntValue;
@@ -26272,13 +26272,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestNestedStructArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::NestedStruct::Type arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26287,7 +26287,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestNestedStructArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::NestedStruct::DecodableType arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26304,7 +26304,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::BooleanResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool value = static_cast<bool>(0);
 
@@ -26319,7 +26319,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::BooleanResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     bool value = static_cast<bool>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26336,13 +26336,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestListStructArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const Structs::SimpleStruct::Type> arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26351,7 +26351,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestListStructArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<Structs::SimpleStruct::DecodableType> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26368,7 +26368,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::SimpleStructResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::SimpleStruct::Type arg1;
 
@@ -26383,7 +26383,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::SimpleStructResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::SimpleStruct::DecodableType arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26400,13 +26400,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestListInt8UArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const uint8_t> arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26415,7 +26415,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestListInt8UArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<uint8_t> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26432,7 +26432,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint64_t value = static_cast<uint64_t>(0);
 
@@ -26447,7 +26447,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint64_t value = static_cast<uint64_t>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26464,13 +26464,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestNestedStructListArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::NestedStructList::Type arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26479,7 +26479,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestNestedStructListArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::NestedStructList::DecodableType arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26496,7 +26496,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestFabricScopedEventResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint64_t value = static_cast<uint64_t>(0);
 
@@ -26511,7 +26511,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestFabricScopedEventResponse::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint64_t value = static_cast<uint64_t>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26528,13 +26528,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestListNestedStructListArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const Structs::NestedStructList::Type> arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26543,7 +26543,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestListNestedStructListArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<Structs::NestedStructList::DecodableType> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26560,13 +26560,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestListInt8UReverseRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::List<const uint8_t> arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26575,7 +26575,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestListInt8UReverseRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::DecodableList<uint8_t> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26593,14 +26593,14 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestEnumsRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     chip::VendorId arg1 = static_cast<chip::VendorId>(0);
     SimpleEnum arg2     = static_cast<SimpleEnum>(0);
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26609,7 +26609,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestEnumsRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     chip::VendorId arg1 = static_cast<chip::VendorId>(0);
     SimpleEnum arg2     = static_cast<SimpleEnum>(0);
@@ -26627,13 +26627,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestNullableOptionalRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Optional<DataModel::Nullable<uint8_t>> arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26642,7 +26642,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestNullableOptionalRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Optional<DataModel::Nullable<uint8_t>> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26670,7 +26670,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestComplexNullableOptionalRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::Nullable<uint16_t> nullableInt;
     Optional<uint16_t> optionalInt;
@@ -26687,7 +26687,7 @@
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26696,7 +26696,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestComplexNullableOptionalRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     DataModel::Nullable<uint16_t> nullableInt;
     Optional<uint16_t> optionalInt;
@@ -26724,13 +26724,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::SimpleStructEchoRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::SimpleStruct::Type arg1;
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26739,7 +26739,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::SimpleStructEchoRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Structs::SimpleStruct::DecodableType arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26755,7 +26755,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TimedInvokeRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
@@ -26768,7 +26768,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TimedInvokeRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     CHIP_ERROR Decode(TLV::TLVReader & reader);
 };
@@ -26784,7 +26784,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestSimpleOptionalArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Optional<bool> arg1;
 
@@ -26799,7 +26799,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestSimpleOptionalArgumentRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     Optional<bool> arg1;
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26818,7 +26818,7 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1    = static_cast<uint8_t>(0);
     SimpleEnum arg2 = static_cast<SimpleEnum>(0);
@@ -26826,7 +26826,7 @@
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26835,7 +26835,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1    = static_cast<uint8_t>(0);
     SimpleEnum arg2 = static_cast<SimpleEnum>(0);
@@ -26854,13 +26854,13 @@
 public:
     // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestFabricScopedEventRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1 = static_cast<uint8_t>(0);
 
     CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
 
-    using ResponseType = Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType;
+    using ResponseType = Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType;
 
     static constexpr bool MustUseTimedInvoke() { return false; }
 };
@@ -26869,7 +26869,7 @@
 {
 public:
     static constexpr CommandId GetCommandId() { return Commands::TestEmitTestFabricScopedEventRequest::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1 = static_cast<uint8_t>(0);
     CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -26886,7 +26886,7 @@
     using DecodableType    = bool;
     using DecodableArgType = bool;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Boolean::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26894,11 +26894,11 @@
 namespace Bitmap8 {
 struct TypeInfo
 {
-    using Type             = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>;
-    using DecodableType    = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>;
-    using DecodableArgType = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>;
+    using Type             = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>;
+    using DecodableType    = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>;
+    using DecodableArgType = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap8::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26906,11 +26906,11 @@
 namespace Bitmap16 {
 struct TypeInfo
 {
-    using Type             = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>;
-    using DecodableType    = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>;
-    using DecodableArgType = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>;
+    using Type             = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>;
+    using DecodableType    = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>;
+    using DecodableArgType = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap16::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26918,11 +26918,11 @@
 namespace Bitmap32 {
 struct TypeInfo
 {
-    using Type             = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>;
-    using DecodableType    = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>;
-    using DecodableArgType = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>;
+    using Type             = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>;
+    using DecodableType    = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>;
+    using DecodableArgType = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap32::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26930,11 +26930,11 @@
 namespace Bitmap64 {
 struct TypeInfo
 {
-    using Type             = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>;
-    using DecodableType    = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>;
-    using DecodableArgType = chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>;
+    using Type             = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>;
+    using DecodableType    = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>;
+    using DecodableArgType = chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap64::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26946,7 +26946,7 @@
     using DecodableType    = uint8_t;
     using DecodableArgType = uint8_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int8u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26958,7 +26958,7 @@
     using DecodableType    = uint16_t;
     using DecodableArgType = uint16_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int16u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26970,7 +26970,7 @@
     using DecodableType    = uint32_t;
     using DecodableArgType = uint32_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int24u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26982,7 +26982,7 @@
     using DecodableType    = uint32_t;
     using DecodableArgType = uint32_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int32u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -26994,7 +26994,7 @@
     using DecodableType    = uint64_t;
     using DecodableArgType = uint64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int40u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27006,7 +27006,7 @@
     using DecodableType    = uint64_t;
     using DecodableArgType = uint64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int48u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27018,7 +27018,7 @@
     using DecodableType    = uint64_t;
     using DecodableArgType = uint64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int56u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27030,7 +27030,7 @@
     using DecodableType    = uint64_t;
     using DecodableArgType = uint64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int64u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27042,7 +27042,7 @@
     using DecodableType    = int8_t;
     using DecodableArgType = int8_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int8s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27054,7 +27054,7 @@
     using DecodableType    = int16_t;
     using DecodableArgType = int16_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int16s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27066,7 +27066,7 @@
     using DecodableType    = int32_t;
     using DecodableArgType = int32_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int24s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27078,7 +27078,7 @@
     using DecodableType    = int32_t;
     using DecodableArgType = int32_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int32s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27090,7 +27090,7 @@
     using DecodableType    = int64_t;
     using DecodableArgType = int64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int40s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27102,7 +27102,7 @@
     using DecodableType    = int64_t;
     using DecodableArgType = int64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int48s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27114,7 +27114,7 @@
     using DecodableType    = int64_t;
     using DecodableArgType = int64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int56s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27126,7 +27126,7 @@
     using DecodableType    = int64_t;
     using DecodableArgType = int64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Int64s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27138,7 +27138,7 @@
     using DecodableType    = uint8_t;
     using DecodableArgType = uint8_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Enum8::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27150,7 +27150,7 @@
     using DecodableType    = uint16_t;
     using DecodableArgType = uint16_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Enum16::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27162,7 +27162,7 @@
     using DecodableType    = float;
     using DecodableArgType = float;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::FloatSingle::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27174,7 +27174,7 @@
     using DecodableType    = double;
     using DecodableArgType = double;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::FloatDouble::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27186,7 +27186,7 @@
     using DecodableType    = chip::ByteSpan;
     using DecodableArgType = chip::ByteSpan;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::OctetString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
     static constexpr size_t MaxLength() { return 10; }
@@ -27199,7 +27199,7 @@
     using DecodableType    = chip::app::DataModel::DecodableList<uint8_t>;
     using DecodableArgType = const chip::app::DataModel::DecodableList<uint8_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ListInt8u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27211,7 +27211,7 @@
     using DecodableType    = chip::app::DataModel::DecodableList<chip::ByteSpan>;
     using DecodableArgType = const chip::app::DataModel::DecodableList<chip::ByteSpan> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ListOctetString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27219,13 +27219,13 @@
 namespace ListStructOctetString {
 struct TypeInfo
 {
-    using Type = chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type>;
+    using Type = chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type>;
     using DecodableType =
-        chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType>;
+        chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType>;
     using DecodableArgType =
-        const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> &;
+        const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ListStructOctetString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27237,7 +27237,7 @@
     using DecodableType    = chip::ByteSpan;
     using DecodableArgType = chip::ByteSpan;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::LongOctetString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
     static constexpr size_t MaxLength() { return 1000; }
@@ -27250,7 +27250,7 @@
     using DecodableType    = chip::CharSpan;
     using DecodableArgType = chip::CharSpan;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::CharString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
     static constexpr size_t MaxLength() { return 10; }
@@ -27263,7 +27263,7 @@
     using DecodableType    = chip::CharSpan;
     using DecodableArgType = chip::CharSpan;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::LongCharString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
     static constexpr size_t MaxLength() { return 1000; }
@@ -27276,7 +27276,7 @@
     using DecodableType    = uint64_t;
     using DecodableArgType = uint64_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::EpochUs::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27288,7 +27288,7 @@
     using DecodableType    = uint32_t;
     using DecodableArgType = uint32_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::EpochS::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27300,7 +27300,7 @@
     using DecodableType    = chip::VendorId;
     using DecodableArgType = chip::VendorId;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::VendorId::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27308,13 +27308,13 @@
 namespace ListNullablesAndOptionalsStruct {
 struct TypeInfo
 {
-    using Type = chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type>;
+    using Type = chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type>;
     using DecodableType =
-        chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType>;
+        chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType>;
     using DecodableArgType = const chip::app::DataModel::DecodableList<
-        chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> &;
+        chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ListNullablesAndOptionalsStruct::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27322,11 +27322,11 @@
 namespace EnumAttr {
 struct TypeInfo
 {
-    using Type             = chip::app::Clusters::TestCluster::SimpleEnum;
-    using DecodableType    = chip::app::Clusters::TestCluster::SimpleEnum;
-    using DecodableArgType = chip::app::Clusters::TestCluster::SimpleEnum;
+    using Type             = chip::app::Clusters::UnitTesting::SimpleEnum;
+    using DecodableType    = chip::app::Clusters::UnitTesting::SimpleEnum;
+    using DecodableArgType = chip::app::Clusters::UnitTesting::SimpleEnum;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::EnumAttr::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27334,11 +27334,11 @@
 namespace StructAttr {
 struct TypeInfo
 {
-    using Type             = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type;
-    using DecodableType    = chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType;
-    using DecodableArgType = const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType &;
+    using Type             = chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type;
+    using DecodableType    = chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType;
+    using DecodableArgType = const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::StructAttr::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27350,7 +27350,7 @@
     using DecodableType    = uint8_t;
     using DecodableArgType = uint8_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::RangeRestrictedInt8u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27362,7 +27362,7 @@
     using DecodableType    = int8_t;
     using DecodableArgType = int8_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::RangeRestrictedInt8s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27374,7 +27374,7 @@
     using DecodableType    = uint16_t;
     using DecodableArgType = uint16_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::RangeRestrictedInt16u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27386,7 +27386,7 @@
     using DecodableType    = int16_t;
     using DecodableArgType = int16_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::RangeRestrictedInt16s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27398,7 +27398,7 @@
     using DecodableType    = chip::app::DataModel::DecodableList<chip::ByteSpan>;
     using DecodableArgType = const chip::app::DataModel::DecodableList<chip::ByteSpan> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ListLongOctetString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27406,13 +27406,13 @@
 namespace ListFabricScoped {
 struct TypeInfo
 {
-    using Type = chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type>;
+    using Type = chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type>;
     using DecodableType =
-        chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType>;
+        chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType>;
     using DecodableArgType =
-        const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> &;
+        const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ListFabricScoped::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27424,7 +27424,7 @@
     using DecodableType    = bool;
     using DecodableArgType = bool;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::TimedWriteBoolean::Id; }
     static constexpr bool MustUseTimedWrite() { return true; }
 };
@@ -27436,7 +27436,7 @@
     using DecodableType    = bool;
     using DecodableArgType = bool;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::GeneralErrorBoolean::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27448,7 +27448,7 @@
     using DecodableType    = bool;
     using DecodableArgType = bool;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::ClusterErrorBoolean::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27460,7 +27460,7 @@
     using DecodableType    = bool;
     using DecodableArgType = bool;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::Unsupported::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27472,7 +27472,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<bool>;
     using DecodableArgType = const chip::app::DataModel::Nullable<bool> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableBoolean::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27480,12 +27480,12 @@
 namespace NullableBitmap8 {
 struct TypeInfo
 {
-    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
-    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>;
+    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
+    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>;
     using DecodableArgType =
-        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> &;
+        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap8::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27493,12 +27493,12 @@
 namespace NullableBitmap16 {
 struct TypeInfo
 {
-    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
-    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>;
+    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
+    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>;
     using DecodableArgType =
-        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> &;
+        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap16::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27506,12 +27506,12 @@
 namespace NullableBitmap32 {
 struct TypeInfo
 {
-    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
-    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>;
+    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
+    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>;
     using DecodableArgType =
-        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> &;
+        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap32::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27519,12 +27519,12 @@
 namespace NullableBitmap64 {
 struct TypeInfo
 {
-    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
-    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>;
+    using Type          = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
+    using DecodableType = chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>;
     using DecodableArgType =
-        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> &;
+        const chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap64::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27536,7 +27536,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint8_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint8_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt8u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27548,7 +27548,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint16_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint16_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt16u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27560,7 +27560,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint32_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint32_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt24u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27572,7 +27572,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint32_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint32_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt32u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27584,7 +27584,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt40u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27596,7 +27596,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt48u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27608,7 +27608,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt56u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27620,7 +27620,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt64u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27632,7 +27632,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int8_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int8_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt8s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27644,7 +27644,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int16_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int16_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt16s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27656,7 +27656,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int32_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int32_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt24s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27668,7 +27668,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int32_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int32_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt32s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27680,7 +27680,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt40s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27692,7 +27692,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt48s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27704,7 +27704,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt56s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27716,7 +27716,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int64_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int64_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt64s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27728,7 +27728,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint8_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint8_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableEnum8::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27740,7 +27740,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint16_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint16_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableEnum16::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27752,7 +27752,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<float>;
     using DecodableArgType = const chip::app::DataModel::Nullable<float> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableFloatSingle::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27764,7 +27764,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<double>;
     using DecodableArgType = const chip::app::DataModel::Nullable<double> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableFloatDouble::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27776,7 +27776,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<chip::ByteSpan>;
     using DecodableArgType = const chip::app::DataModel::Nullable<chip::ByteSpan> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableOctetString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
     static constexpr size_t MaxLength() { return 10; }
@@ -27789,7 +27789,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<chip::CharSpan>;
     using DecodableArgType = const chip::app::DataModel::Nullable<chip::CharSpan> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableCharString::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
     static constexpr size_t MaxLength() { return 10; }
@@ -27798,11 +27798,11 @@
 namespace NullableEnumAttr {
 struct TypeInfo
 {
-    using Type             = chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum>;
-    using DecodableType    = chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum>;
-    using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> &;
+    using Type             = chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum>;
+    using DecodableType    = chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum>;
+    using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableEnumAttr::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27810,12 +27810,12 @@
 namespace NullableStruct {
 struct TypeInfo
 {
-    using Type          = chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>;
-    using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType>;
+    using Type          = chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>;
+    using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType>;
     using DecodableArgType =
-        const chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> &;
+        const chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableStruct::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27827,7 +27827,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint8_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint8_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableRangeRestrictedInt8u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27839,7 +27839,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int8_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int8_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableRangeRestrictedInt8s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27851,7 +27851,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<uint16_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<uint16_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableRangeRestrictedInt16u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27863,7 +27863,7 @@
     using DecodableType    = chip::app::DataModel::Nullable<int16_t>;
     using DecodableArgType = const chip::app::DataModel::Nullable<int16_t> &;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::NullableRangeRestrictedInt16s::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27875,7 +27875,7 @@
     using DecodableType    = uint8_t;
     using DecodableArgType = uint8_t;
 
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr AttributeId GetAttributeId() { return Attributes::WriteOnlyInt8u::Id; }
     static constexpr bool MustUseTimedWrite() { return false; }
 };
@@ -27883,31 +27883,31 @@
 namespace GeneratedCommandList {
 struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
 {
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 };
 } // namespace GeneratedCommandList
 namespace AcceptedCommandList {
 struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
 {
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 };
 } // namespace AcceptedCommandList
 namespace AttributeList {
 struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
 {
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 };
 } // namespace AttributeList
 namespace FeatureMap {
 struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
 {
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 };
 } // namespace FeatureMap
 namespace ClusterRevision {
 struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
 {
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 };
 } // namespace ClusterRevision
 
@@ -27915,19 +27915,19 @@
 {
     struct DecodableType
     {
-        static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+        static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
         CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
 
         Attributes::Boolean::TypeInfo::DecodableType boolean = static_cast<bool>(0);
         Attributes::Bitmap8::TypeInfo::DecodableType bitmap8 =
-            static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>(0);
+            static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>(0);
         Attributes::Bitmap16::TypeInfo::DecodableType bitmap16 =
-            static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>(0);
+            static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>(0);
         Attributes::Bitmap32::TypeInfo::DecodableType bitmap32 =
-            static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(0);
+            static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(0);
         Attributes::Bitmap64::TypeInfo::DecodableType bitmap64 =
-            static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>(0);
+            static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>(0);
         Attributes::Int8u::TypeInfo::DecodableType int8u             = static_cast<uint8_t>(0);
         Attributes::Int16u::TypeInfo::DecodableType int16u           = static_cast<uint16_t>(0);
         Attributes::Int24u::TypeInfo::DecodableType int24u           = static_cast<uint32_t>(0);
@@ -27959,7 +27959,7 @@
         Attributes::EpochS::TypeInfo::DecodableType epochS     = static_cast<uint32_t>(0);
         Attributes::VendorId::TypeInfo::DecodableType vendorId = static_cast<chip::VendorId>(0);
         Attributes::ListNullablesAndOptionalsStruct::TypeInfo::DecodableType listNullablesAndOptionalsStruct;
-        Attributes::EnumAttr::TypeInfo::DecodableType enumAttr = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(0);
+        Attributes::EnumAttr::TypeInfo::DecodableType enumAttr = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(0);
         Attributes::StructAttr::TypeInfo::DecodableType structAttr;
         Attributes::RangeRestrictedInt8u::TypeInfo::DecodableType rangeRestrictedInt8u   = static_cast<uint8_t>(0);
         Attributes::RangeRestrictedInt8s::TypeInfo::DecodableType rangeRestrictedInt8s   = static_cast<int8_t>(0);
@@ -28032,7 +28032,7 @@
 public:
     static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
     static constexpr EventId GetEventId() { return Events::TestEvent::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr bool kIsFabricScoped = false;
 
     uint8_t arg1    = static_cast<uint8_t>(0);
@@ -28050,7 +28050,7 @@
 public:
     static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
     static constexpr EventId GetEventId() { return Events::TestEvent::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     uint8_t arg1    = static_cast<uint8_t>(0);
     SimpleEnum arg2 = static_cast<SimpleEnum>(0);
@@ -28075,7 +28075,7 @@
 public:
     static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
     static constexpr EventId GetEventId() { return Events::TestFabricScopedEvent::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
     static constexpr bool kIsFabricScoped = true;
 
     chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
@@ -28090,7 +28090,7 @@
 public:
     static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
     static constexpr EventId GetEventId() { return Events::TestFabricScopedEvent::Id; }
-    static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; }
+    static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; }
 
     chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
 
@@ -28098,7 +28098,7 @@
 };
 } // namespace TestFabricScopedEvent
 } // namespace Events
-} // namespace TestCluster
+} // namespace UnitTesting
 namespace FaultInjection {
 
 namespace Commands {
diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h
index 9dea025..45c8dec 100644
--- a/zzz_generated/app-common/app-common/zap-generated/command-id.h
+++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h
@@ -317,7 +317,7 @@
 #define ZCL_GET_MEASUREMENT_PROFILE_RESPONSE_COMMAND_COMMAND_ID (0x01)
 #define ZCL_GET_MEASUREMENT_PROFILE_COMMAND_COMMAND_ID (0x01)
 
-// Commands for cluster: Test Cluster
+// Commands for cluster: Unit Testing
 #define ZCL_TEST_COMMAND_ID (0x00)
 #define ZCL_TEST_SPECIFIC_RESPONSE_COMMAND_ID (0x00)
 #define ZCL_TEST_NOT_HANDLED_COMMAND_ID (0x01)
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
index d61a604..c7dce39 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
@@ -4605,7 +4605,7 @@
 } // namespace Attributes
 } // namespace ElectricalMeasurement
 
-namespace TestCluster {
+namespace UnitTesting {
 namespace Attributes {
 
 namespace Boolean {
@@ -4957,7 +4957,7 @@
 } // namespace ClusterRevision
 
 } // namespace Attributes
-} // namespace TestCluster
+} // namespace UnitTesting
 
 namespace FaultInjection {
 namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
index 1ac3f68..a5d2738 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
@@ -232,9 +232,9 @@
 namespace ElectricalMeasurement {
 static constexpr ClusterId Id = 0x00000B04;
 } // namespace ElectricalMeasurement
-namespace TestCluster {
+namespace UnitTesting {
 static constexpr ClusterId Id = 0xFFF1FC05;
-} // namespace TestCluster
+} // namespace UnitTesting
 namespace FaultInjection {
 static constexpr ClusterId Id = 0xFFF1FC06;
 } // namespace FaultInjection
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
index 41c5ed6..d7430e8 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
@@ -1091,7 +1091,7 @@
 } // namespace Commands
 } // namespace ElectricalMeasurement
 
-namespace TestCluster {
+namespace UnitTesting {
 namespace Commands {
 
 namespace Test {
@@ -1231,7 +1231,7 @@
 } // namespace TestEmitTestFabricScopedEventRequest
 
 } // namespace Commands
-} // namespace TestCluster
+} // namespace UnitTesting
 
 namespace FaultInjection {
 namespace Commands {
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
index 0304e45..f466ccb 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
@@ -323,7 +323,7 @@
 } // namespace Events
 } // namespace PumpConfigurationAndControl
 
-namespace TestCluster {
+namespace UnitTesting {
 namespace Events {
 
 namespace TestEvent {
@@ -335,7 +335,7 @@
 } // namespace TestFabricScopedEvent
 
 } // namespace Events
-} // namespace TestCluster
+} // namespace UnitTesting
 
 } // namespace Clusters
 } // namespace app
diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h
index b9d539a..4ab05c7 100644
--- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h
+++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h
@@ -453,10 +453,10 @@
 #define CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER
 #endif
 
-#if defined(ZCL_USING_TEST_CLUSTER_SERVER) || defined(ZCL_USING_TEST_CLUSTER_CLIENT)
-#define CHIP_PRINTCLUSTER_TEST_CLUSTER { ZCL_TEST_CLUSTER_ID, "Test Cluster" },
+#if defined(ZCL_USING_UNIT_TESTING_CLUSTER_SERVER) || defined(ZCL_USING_UNIT_TESTING_CLUSTER_CLIENT)
+#define CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER { ZCL_UNIT_TESTING_CLUSTER_ID, "Unit Testing" },
 #else
-#define CHIP_PRINTCLUSTER_TEST_CLUSTER
+#define CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER
 #endif
 
 #if defined(ZCL_USING_FAULT_INJECTION_CLUSTER_SERVER) || defined(ZCL_USING_FAULT_INJECTION_CLUSTER_CLIENT)
@@ -535,7 +535,7 @@
     CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER                                                                                    \
     CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER                                                                                        \
     CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER                                                                               \
-    CHIP_PRINTCLUSTER_TEST_CLUSTER                                                                                                 \
+    CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER                                                                                         \
     CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER
 
 #define MAX_CLUSTER_NAME_LENGTH 39
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index 78b66ba..b437a36 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -102,7 +102,7 @@
 | ApplicationBasic                                                    | 0x050D |
 | AccountLogin                                                        | 0x050E |
 | ElectricalMeasurement                                               | 0x0B04 |
-| TestCluster                                                         | 0xFFF1FC05|
+| UnitTesting                                                         | 0xFFF1FC05|
 | FaultInjection                                                      | 0xFFF1FC06|
 \*----------------------------------------------------------------------------*/
 
@@ -7297,7 +7297,7 @@
 };
 
 /*----------------------------------------------------------------------------*\
-| Cluster TestCluster                                                 | 0xFFF1FC05|
+| Cluster UnitTesting                                                 | 0xFFF1FC05|
 |------------------------------------------------------------------------------|
 | Commands:                                                           |        |
 | * Test                                                              |   0x00 |
@@ -7420,10 +7420,10 @@
 /*
  * Command Test
  */
-class TestClusterTest : public ClusterCommand
+class UnitTestingTest : public ClusterCommand
 {
 public:
-    TestClusterTest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test", credsIssuerConfig)
+    UnitTestingTest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test", credsIssuerConfig)
     {
         ClusterCommand::AddArguments();
     }
@@ -7443,16 +7443,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::Test::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::Test::Type mRequest;
 };
 
 /*
  * Command TestNotHandled
  */
-class TestClusterTestNotHandled : public ClusterCommand
+class UnitTestingTestNotHandled : public ClusterCommand
 {
 public:
-    TestClusterTestNotHandled(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-not-handled", credsIssuerConfig)
+    UnitTestingTestNotHandled(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-not-handled", credsIssuerConfig)
     {
         ClusterCommand::AddArguments();
     }
@@ -7472,16 +7472,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Type mRequest;
 };
 
 /*
  * Command TestSpecific
  */
-class TestClusterTestSpecific : public ClusterCommand
+class UnitTestingTestSpecific : public ClusterCommand
 {
 public:
-    TestClusterTestSpecific(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-specific", credsIssuerConfig)
+    UnitTestingTestSpecific(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-specific", credsIssuerConfig)
     {
         ClusterCommand::AddArguments();
     }
@@ -7501,16 +7501,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestSpecific::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestSpecific::Type mRequest;
 };
 
 /*
  * Command TestUnknownCommand
  */
-class TestClusterTestUnknownCommand : public ClusterCommand
+class UnitTestingTestUnknownCommand : public ClusterCommand
 {
 public:
-    TestClusterTestUnknownCommand(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestUnknownCommand(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-unknown-command", credsIssuerConfig)
     {
         ClusterCommand::AddArguments();
@@ -7531,16 +7531,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Type mRequest;
 };
 
 /*
  * Command TestAddArguments
  */
-class TestClusterTestAddArguments : public ClusterCommand
+class UnitTestingTestAddArguments : public ClusterCommand
 {
 public:
-    TestClusterTestAddArguments(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestAddArguments(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-add-arguments", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -7563,16 +7563,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type mRequest;
 };
 
 /*
  * Command TestSimpleArgumentRequest
  */
-class TestClusterTestSimpleArgumentRequest : public ClusterCommand
+class UnitTestingTestSimpleArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestSimpleArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestSimpleArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-simple-argument-request", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, 1, &mRequest.arg1);
@@ -7594,16 +7594,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type mRequest;
 };
 
 /*
  * Command TestStructArrayArgumentRequest
  */
-class TestClusterTestStructArrayArgumentRequest : public ClusterCommand
+class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestStructArrayArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestStructArrayArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-struct-array-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1),
         mComplex_Arg2(&mRequest.arg2), mComplex_Arg3(&mRequest.arg3), mComplex_Arg4(&mRequest.arg4)
     {
@@ -7631,22 +7631,22 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>>
         mComplex_Arg1;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>
         mComplex_Arg2;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>> mComplex_Arg3;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>> mComplex_Arg3;
     TypedComplexArgument<chip::app::DataModel::List<const bool>> mComplex_Arg4;
 };
 
 /*
  * Command TestStructArgumentRequest
  */
-class TestClusterTestStructArgumentRequest : public ClusterCommand
+class UnitTestingTestStructArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7668,17 +7668,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type> mComplex_Arg1;
 };
 
 /*
  * Command TestNestedStructArgumentRequest
  */
-class TestClusterTestNestedStructArgumentRequest : public ClusterCommand
+class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestNestedStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestNestedStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-nested-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7700,17 +7700,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::NestedStruct::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::NestedStruct::Type> mComplex_Arg1;
 };
 
 /*
  * Command TestListStructArgumentRequest
  */
-class TestClusterTestListStructArgumentRequest : public ClusterCommand
+class UnitTestingTestListStructArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestListStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestListStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-list-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7732,18 +7732,18 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>
         mComplex_Arg1;
 };
 
 /*
  * Command TestListInt8UArgumentRequest
  */
-class TestClusterTestListInt8UArgumentRequest : public ClusterCommand
+class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestListInt8UArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestListInt8UArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-list-int8uargument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7765,17 +7765,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type mRequest;
     TypedComplexArgument<chip::app::DataModel::List<const uint8_t>> mComplex_Arg1;
 };
 
 /*
  * Command TestNestedStructListArgumentRequest
  */
-class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand
+class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7797,17 +7797,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::NestedStructList::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type> mComplex_Arg1;
 };
 
 /*
  * Command TestListNestedStructListArgumentRequest
  */
-class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand
+class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestListNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestListNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-list-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7829,18 +7829,18 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>>
         mComplex_Arg1;
 };
 
 /*
  * Command TestListInt8UReverseRequest
  */
-class TestClusterTestListInt8UReverseRequest : public ClusterCommand
+class UnitTestingTestListInt8UReverseRequest : public ClusterCommand
 {
 public:
-    TestClusterTestListInt8UReverseRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestListInt8UReverseRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-list-int8ureverse-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -7862,17 +7862,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type mRequest;
     TypedComplexArgument<chip::app::DataModel::List<const uint8_t>> mComplex_Arg1;
 };
 
 /*
  * Command TestEnumsRequest
  */
-class TestClusterTestEnumsRequest : public ClusterCommand
+class UnitTestingTestEnumsRequest : public ClusterCommand
 {
 public:
-    TestClusterTestEnumsRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestEnumsRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-enums-request", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, UINT16_MAX, &mRequest.arg1);
@@ -7895,16 +7895,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type mRequest;
 };
 
 /*
  * Command TestNullableOptionalRequest
  */
-class TestClusterTestNullableOptionalRequest : public ClusterCommand
+class UnitTestingTestNullableOptionalRequest : public ClusterCommand
 {
 public:
-    TestClusterTestNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-nullable-optional-request", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -7926,16 +7926,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type mRequest;
 };
 
 /*
  * Command TestComplexNullableOptionalRequest
  */
-class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand
+class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand
 {
 public:
-    TestClusterTestComplexNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestComplexNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-complex-nullable-optional-request", credsIssuerConfig),
         mComplex_NullableStruct(&mRequest.nullableStruct), mComplex_OptionalStruct(&mRequest.optionalStruct),
         mComplex_NullableOptionalStruct(&mRequest.nullableOptionalStruct), mComplex_NullableList(&mRequest.nullableList),
@@ -7971,30 +7971,30 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>
         mComplex_NullableStruct;
-    TypedComplexArgument<chip::Optional<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>> mComplex_OptionalStruct;
+    TypedComplexArgument<chip::Optional<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>> mComplex_OptionalStruct;
     TypedComplexArgument<
-        chip::Optional<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>>
+        chip::Optional<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>>
         mComplex_NullableOptionalStruct;
     TypedComplexArgument<
-        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>>>
+        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>>>
         mComplex_NullableList;
-    TypedComplexArgument<chip::Optional<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>>>
+    TypedComplexArgument<chip::Optional<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>>>
         mComplex_OptionalList;
     TypedComplexArgument<chip::Optional<
-        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>>>>
+        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>>>>
         mComplex_NullableOptionalList;
 };
 
 /*
  * Command SimpleStructEchoRequest
  */
-class TestClusterSimpleStructEchoRequest : public ClusterCommand
+class UnitTestingSimpleStructEchoRequest : public ClusterCommand
 {
 public:
-    TestClusterSimpleStructEchoRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingSimpleStructEchoRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("simple-struct-echo-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1)
     {
         AddArgument("Arg1", &mComplex_Arg1);
@@ -8016,17 +8016,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type> mComplex_Arg1;
 };
 
 /*
  * Command TimedInvokeRequest
  */
-class TestClusterTimedInvokeRequest : public ClusterCommand
+class UnitTestingTimedInvokeRequest : public ClusterCommand
 {
 public:
-    TestClusterTimedInvokeRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTimedInvokeRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("timed-invoke-request", credsIssuerConfig)
     {
         ClusterCommand::AddArguments();
@@ -8047,16 +8047,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type mRequest;
 };
 
 /*
  * Command TestSimpleOptionalArgumentRequest
  */
-class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand
+class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand
 {
 public:
-    TestClusterTestSimpleOptionalArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestSimpleOptionalArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-simple-optional-argument-request", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, 1, &mRequest.arg1);
@@ -8078,16 +8078,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type mRequest;
 };
 
 /*
  * Command TestEmitTestEventRequest
  */
-class TestClusterTestEmitTestEventRequest : public ClusterCommand
+class UnitTestingTestEmitTestEventRequest : public ClusterCommand
 {
 public:
-    TestClusterTestEmitTestEventRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestEmitTestEventRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-emit-test-event-request", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -8111,16 +8111,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type mRequest;
 };
 
 /*
  * Command TestEmitTestFabricScopedEventRequest
  */
-class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand
+class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand
 {
 public:
-    TestClusterTestEmitTestFabricScopedEventRequest(CredentialIssuerCommands * credsIssuerConfig) :
+    UnitTestingTestEmitTestFabricScopedEventRequest(CredentialIssuerCommands * credsIssuerConfig) :
         ClusterCommand("test-emit-test-fabric-scoped-event-request", credsIssuerConfig)
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -8142,7 +8142,7 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest;
 };
 
 /*----------------------------------------------------------------------------*\
@@ -12908,39 +12908,39 @@
 
     commands.Register(clusterName, clusterCommands);
 }
-void registerClusterTestCluster(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
+void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
 {
-    using namespace chip::app::Clusters::TestCluster;
+    using namespace chip::app::Clusters::UnitTesting;
 
-    const char * clusterName = "TestCluster";
+    const char * clusterName = "UnitTesting";
 
     commands_list clusterCommands = {
         //
         // Commands
         //
         make_unique<ClusterCommand>(Id, credsIssuerConfig),                                 //
-        make_unique<TestClusterTest>(credsIssuerConfig),                                    //
-        make_unique<TestClusterTestNotHandled>(credsIssuerConfig),                          //
-        make_unique<TestClusterTestSpecific>(credsIssuerConfig),                            //
-        make_unique<TestClusterTestUnknownCommand>(credsIssuerConfig),                      //
-        make_unique<TestClusterTestAddArguments>(credsIssuerConfig),                        //
-        make_unique<TestClusterTestSimpleArgumentRequest>(credsIssuerConfig),               //
-        make_unique<TestClusterTestStructArrayArgumentRequest>(credsIssuerConfig),          //
-        make_unique<TestClusterTestStructArgumentRequest>(credsIssuerConfig),               //
-        make_unique<TestClusterTestNestedStructArgumentRequest>(credsIssuerConfig),         //
-        make_unique<TestClusterTestListStructArgumentRequest>(credsIssuerConfig),           //
-        make_unique<TestClusterTestListInt8UArgumentRequest>(credsIssuerConfig),            //
-        make_unique<TestClusterTestNestedStructListArgumentRequest>(credsIssuerConfig),     //
-        make_unique<TestClusterTestListNestedStructListArgumentRequest>(credsIssuerConfig), //
-        make_unique<TestClusterTestListInt8UReverseRequest>(credsIssuerConfig),             //
-        make_unique<TestClusterTestEnumsRequest>(credsIssuerConfig),                        //
-        make_unique<TestClusterTestNullableOptionalRequest>(credsIssuerConfig),             //
-        make_unique<TestClusterTestComplexNullableOptionalRequest>(credsIssuerConfig),      //
-        make_unique<TestClusterSimpleStructEchoRequest>(credsIssuerConfig),                 //
-        make_unique<TestClusterTimedInvokeRequest>(credsIssuerConfig),                      //
-        make_unique<TestClusterTestSimpleOptionalArgumentRequest>(credsIssuerConfig),       //
-        make_unique<TestClusterTestEmitTestEventRequest>(credsIssuerConfig),                //
-        make_unique<TestClusterTestEmitTestFabricScopedEventRequest>(credsIssuerConfig),    //
+        make_unique<UnitTestingTest>(credsIssuerConfig),                                    //
+        make_unique<UnitTestingTestNotHandled>(credsIssuerConfig),                          //
+        make_unique<UnitTestingTestSpecific>(credsIssuerConfig),                            //
+        make_unique<UnitTestingTestUnknownCommand>(credsIssuerConfig),                      //
+        make_unique<UnitTestingTestAddArguments>(credsIssuerConfig),                        //
+        make_unique<UnitTestingTestSimpleArgumentRequest>(credsIssuerConfig),               //
+        make_unique<UnitTestingTestStructArrayArgumentRequest>(credsIssuerConfig),          //
+        make_unique<UnitTestingTestStructArgumentRequest>(credsIssuerConfig),               //
+        make_unique<UnitTestingTestNestedStructArgumentRequest>(credsIssuerConfig),         //
+        make_unique<UnitTestingTestListStructArgumentRequest>(credsIssuerConfig),           //
+        make_unique<UnitTestingTestListInt8UArgumentRequest>(credsIssuerConfig),            //
+        make_unique<UnitTestingTestNestedStructListArgumentRequest>(credsIssuerConfig),     //
+        make_unique<UnitTestingTestListNestedStructListArgumentRequest>(credsIssuerConfig), //
+        make_unique<UnitTestingTestListInt8UReverseRequest>(credsIssuerConfig),             //
+        make_unique<UnitTestingTestEnumsRequest>(credsIssuerConfig),                        //
+        make_unique<UnitTestingTestNullableOptionalRequest>(credsIssuerConfig),             //
+        make_unique<UnitTestingTestComplexNullableOptionalRequest>(credsIssuerConfig),      //
+        make_unique<UnitTestingSimpleStructEchoRequest>(credsIssuerConfig),                 //
+        make_unique<UnitTestingTimedInvokeRequest>(credsIssuerConfig),                      //
+        make_unique<UnitTestingTestSimpleOptionalArgumentRequest>(credsIssuerConfig),       //
+        make_unique<UnitTestingTestEmitTestEventRequest>(credsIssuerConfig),                //
+        make_unique<UnitTestingTestEmitTestFabricScopedEventRequest>(credsIssuerConfig),    //
         //
         // Attributes
         //
@@ -13039,13 +13039,13 @@
         make_unique<ReadAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig),            //
         make_unique<WriteAttribute<>>(Id, credsIssuerConfig),                                                              //
         make_unique<WriteAttribute<bool>>(Id, "boolean", 0, 1, Attributes::Boolean::Id, credsIssuerConfig),                //
-        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>>(
+        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>>(
             Id, "bitmap8", 0, UINT8_MAX, Attributes::Bitmap8::Id, credsIssuerConfig), //
-        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>>(
+        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>>(
             Id, "bitmap16", 0, UINT16_MAX, Attributes::Bitmap16::Id, credsIssuerConfig), //
-        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>>(
+        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>>(
             Id, "bitmap32", 0, UINT32_MAX, Attributes::Bitmap32::Id, credsIssuerConfig), //
-        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>>(
+        make_unique<WriteAttribute<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>>(
             Id, "bitmap64", 0, UINT64_MAX, Attributes::Bitmap64::Id, credsIssuerConfig),                                     //
         make_unique<WriteAttribute<uint8_t>>(Id, "int8u", 0, UINT8_MAX, Attributes::Int8u::Id, credsIssuerConfig),           //
         make_unique<WriteAttribute<uint16_t>>(Id, "int16u", 0, UINT16_MAX, Attributes::Int16u::Id, credsIssuerConfig),       //
@@ -13077,7 +13077,7 @@
         make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::ByteSpan>>>(
             Id, "list-octet-string", Attributes::ListOctetString::Id, credsIssuerConfig), //
         make_unique<WriteAttributeAsComplex<
-            chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type>>>(
+            chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type>>>(
             Id, "list-struct-octet-string", Attributes::ListStructOctetString::Id, credsIssuerConfig),                            //
         make_unique<WriteAttribute<chip::ByteSpan>>(Id, "long-octet-string", Attributes::LongOctetString::Id, credsIssuerConfig), //
         make_unique<WriteAttribute<chip::CharSpan>>(Id, "char-string", Attributes::CharString::Id, credsIssuerConfig),            //
@@ -13086,11 +13086,11 @@
         make_unique<WriteAttribute<uint32_t>>(Id, "epoch-s", 0, UINT32_MAX, Attributes::EpochS::Id, credsIssuerConfig),           //
         make_unique<WriteAttribute<chip::VendorId>>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorId::Id, credsIssuerConfig), //
         make_unique<WriteAttributeAsComplex<
-            chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type>>>(
+            chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type>>>(
             Id, "list-nullables-and-optionals-struct", Attributes::ListNullablesAndOptionalsStruct::Id, credsIssuerConfig), //
-        make_unique<WriteAttribute<chip::app::Clusters::TestCluster::SimpleEnum>>(Id, "enum-attr", 0, UINT8_MAX,
+        make_unique<WriteAttribute<chip::app::Clusters::UnitTesting::SimpleEnum>>(Id, "enum-attr", 0, UINT8_MAX,
                                                                                   Attributes::EnumAttr::Id, credsIssuerConfig), //
-        make_unique<WriteAttributeAsComplex<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>(
+        make_unique<WriteAttributeAsComplex<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>(
             Id, "struct-attr", Attributes::StructAttr::Id, credsIssuerConfig), //
         make_unique<WriteAttribute<uint8_t>>(Id, "range-restricted-int8u", 0, UINT8_MAX, Attributes::RangeRestrictedInt8u::Id,
                                              credsIssuerConfig), //
@@ -13103,7 +13103,7 @@
         make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::ByteSpan>>>(
             Id, "list-long-octet-string", Attributes::ListLongOctetString::Id, credsIssuerConfig), //
         make_unique<WriteAttributeAsComplex<
-            chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type>>>(
+            chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type>>>(
             Id, "list-fabric-scoped", Attributes::ListFabricScoped::Id, credsIssuerConfig),                                       //
         make_unique<WriteAttribute<bool>>(Id, "timed-write-boolean", 0, 1, Attributes::TimedWriteBoolean::Id, credsIssuerConfig), //
         make_unique<WriteAttribute<bool>>(Id, "general-error-boolean", 0, 1, Attributes::GeneralErrorBoolean::Id,
@@ -13114,16 +13114,16 @@
         make_unique<WriteAttribute<chip::app::DataModel::Nullable<bool>>>(Id, "nullable-boolean", 0, 1,
                                                                           Attributes::NullableBoolean::Id, credsIssuerConfig), //
         make_unique<
-            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>>>(
+            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>>>(
             Id, "nullable-bitmap8", 0, UINT8_MAX, Attributes::NullableBitmap8::Id, credsIssuerConfig), //
         make_unique<
-            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>>>(
+            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>>>(
             Id, "nullable-bitmap16", 0, UINT16_MAX, Attributes::NullableBitmap16::Id, credsIssuerConfig), //
         make_unique<
-            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>>>(
+            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>>>(
             Id, "nullable-bitmap32", 0, UINT32_MAX, Attributes::NullableBitmap32::Id, credsIssuerConfig), //
         make_unique<
-            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>>>(
+            WriteAttribute<chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>>>(
             Id, "nullable-bitmap64", 0, UINT64_MAX, Attributes::NullableBitmap64::Id, credsIssuerConfig), //
         make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint8_t>>>(Id, "nullable-int8u", 0, UINT8_MAX,
                                                                              Attributes::NullableInt8u::Id, credsIssuerConfig), //
@@ -13171,10 +13171,10 @@
             Id, "nullable-octet-string", Attributes::NullableOctetString::Id, credsIssuerConfig), //
         make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::CharSpan>>>(
             Id, "nullable-char-string", Attributes::NullableCharString::Id, credsIssuerConfig), //
-        make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum>>>(
+        make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum>>>(
             Id, "nullable-enum-attr", 0, UINT8_MAX, Attributes::NullableEnumAttr::Id, credsIssuerConfig), //
         make_unique<
-            WriteAttributeAsComplex<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>>(
+            WriteAttributeAsComplex<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>>(
             Id, "nullable-struct", Attributes::NullableStruct::Id, credsIssuerConfig), //
         make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint8_t>>>(Id, "nullable-range-restricted-int8u", 0, UINT8_MAX,
                                                                              Attributes::NullableRangeRestrictedInt8u::Id,
@@ -13426,7 +13426,7 @@
     registerClusterApplicationBasic(commands, credsIssuerConfig);
     registerClusterAccountLogin(commands, credsIssuerConfig);
     registerClusterElectricalMeasurement(commands, credsIssuerConfig);
-    registerClusterTestCluster(commands, credsIssuerConfig);
+    registerClusterUnitTesting(commands, credsIssuerConfig);
     registerClusterFaultInjection(commands, credsIssuerConfig);
     registerClusterSubscriptions(commands, credsIssuerConfig);
 }
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
index 89ee4ac..5fec5e0 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
@@ -550,7 +550,7 @@
     ComplexArgumentParser::Finalize(request.credentialIndex);
 }
 CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
-                                        chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::Type & request,
+                                        chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -564,7 +564,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::Type & request)
 {
     ComplexArgumentParser::Finalize(request.a);
 }
@@ -1122,7 +1122,7 @@
     ComplexArgumentParser::Finalize(request.fullNetworkData);
     ComplexArgumentParser::Finalize(request.isChild);
 }
-CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::TestCluster::Structs::NestedStruct::Type & request,
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::NestedStruct::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -1144,14 +1144,14 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::NestedStruct::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::NestedStruct::Type & request)
 {
     ComplexArgumentParser::Finalize(request.a);
     ComplexArgumentParser::Finalize(request.b);
     ComplexArgumentParser::Finalize(request.c);
 }
 CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
-                                        chip::app::Clusters::TestCluster::Structs::NestedStructList::Type & request,
+                                        chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -1189,7 +1189,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::NestedStructList::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type & request)
 {
     ComplexArgumentParser::Finalize(request.a);
     ComplexArgumentParser::Finalize(request.b);
@@ -1290,7 +1290,7 @@
     ComplexArgumentParser::Finalize(request.type);
 }
 CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
-                                        chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type & request,
+                                        chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -1372,7 +1372,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type & request)
 {
     ComplexArgumentParser::Finalize(request.nullableInt);
     ComplexArgumentParser::Finalize(request.optionalInt);
@@ -1715,7 +1715,7 @@
     ComplexArgumentParser::Finalize(request.mfgCode);
     ComplexArgumentParser::Finalize(request.value);
 }
-CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type & request,
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -1757,7 +1757,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request)
 {
     ComplexArgumentParser::Finalize(request.a);
     ComplexArgumentParser::Finalize(request.b);
@@ -1903,7 +1903,7 @@
     ComplexArgumentParser::Finalize(request.fabricIndex);
 }
 CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
-                                        chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type & request,
+                                        chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -1964,7 +1964,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type & request)
 {
     ComplexArgumentParser::Finalize(request.fabricSensitiveInt8u);
     ComplexArgumentParser::Finalize(request.optionalFabricSensitiveInt8u);
@@ -1976,7 +1976,7 @@
     ComplexArgumentParser::Finalize(request.fabricIndex);
 }
 CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
-                                        chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type & request,
+                                        chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type & request,
                                         Json::Value & value)
 {
     VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
@@ -1996,7 +1996,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type & request)
+void ComplexArgumentParser::Finalize(chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type & request)
 {
     ComplexArgumentParser::Finalize(request.member1);
     ComplexArgumentParser::Finalize(request.member2);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
index d9ec10d..7a69b94 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
@@ -92,10 +92,10 @@
                         Json::Value & value);
 
 static void Finalize(chip::app::Clusters::DoorLock::Structs::DlCredential::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::Type & request,
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::Type & request);
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::Type & request);
 static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::Type & request,
                         Json::Value & value);
 
@@ -150,14 +150,14 @@
                         Json::Value & value);
 
 static void Finalize(chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::NestedStruct::Type & request,
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::NestedStruct::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::NestedStruct::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::NestedStructList::Type & request,
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::NestedStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::NestedStructList::Type & request);
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type & request);
 static CHIP_ERROR Setup(const char * label, chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfo::Type & request,
                         Json::Value & value);
 
@@ -166,10 +166,10 @@
                         Json::Value & value);
 
 static void Finalize(chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type & request,
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type & request);
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type & request);
 static CHIP_ERROR Setup(const char * label,
                         chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::Type & request,
                         Json::Value & value);
@@ -204,10 +204,10 @@
                         Json::Value & value);
 
 static void Finalize(chip::app::Clusters::ModeSelect::Structs::SemanticTag::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type & request,
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type & request);
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request);
 static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentLauncher::Structs::StyleInformation::Type & request,
                         Json::Value & value);
 
@@ -224,14 +224,14 @@
                         Json::Value & value);
 
 static void Finalize(chip::app::Clusters::Binding::Structs::TargetStruct::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type & request,
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type & request,
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type & request,
                         Json::Value & value);
 
-static void Finalize(chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type & request);
+static void Finalize(chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type & request);
 static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request,
                         Json::Value & value);
 
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
index 76ab57f..ba839e1 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -546,7 +546,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::DecodableType & value)
+                                     const chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -1175,7 +1175,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const chip::app::Clusters::TestCluster::Structs::NestedStruct::DecodableType & value)
+                                     const chip::app::Clusters::UnitTesting::Structs::NestedStruct::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -1207,7 +1207,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const chip::app::Clusters::TestCluster::Structs::NestedStructList::DecodableType & value)
+                                     const chip::app::Clusters::UnitTesting::Structs::NestedStructList::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -1369,7 +1369,7 @@
 }
 CHIP_ERROR
 DataModelLogger::LogValue(const char * label, size_t indent,
-                          const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType & value)
+                          const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -1837,7 +1837,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & value)
+                                     const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -2045,7 +2045,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType & value)
+                                     const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -2118,7 +2118,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType & value)
+                                     const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -3488,7 +3488,7 @@
 
     return CHIP_NO_ERROR;
 }
-CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const TestCluster::Events::TestEvent::DecodableType & value)
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const UnitTesting::Events::TestEvent::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -3544,7 +3544,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Events::TestFabricScopedEvent::DecodableType & value)
+                                     const UnitTesting::Events::TestFabricScopedEvent::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     {
@@ -4015,7 +4015,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestSpecificResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestSpecificResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue));
@@ -4023,7 +4023,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestAddArgumentsResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue));
@@ -4031,7 +4031,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue));
@@ -4039,7 +4039,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1));
@@ -4052,7 +4052,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1));
@@ -4060,7 +4060,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestEnumsResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestEnumsResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1));
@@ -4069,7 +4069,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestNullableOptionalResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("wasPresent", indent + 1, value.wasPresent));
@@ -4080,7 +4080,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("nullableIntWasNull", indent + 1, value.nullableIntWasNull));
@@ -4121,7 +4121,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::BooleanResponse::DecodableType & value)
+                                     const UnitTesting::Commands::BooleanResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value));
@@ -4129,7 +4129,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::SimpleStructResponse::DecodableType & value)
+                                     const UnitTesting::Commands::SimpleStructResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1));
@@ -4137,7 +4137,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestEmitTestEventResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value));
@@ -4145,7 +4145,7 @@
     return CHIP_NO_ERROR;
 }
 CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
-                                     const TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value)
+                                     const UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value)
 {
     DataModelLogger::LogString(label, indent, "{");
     ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value));
@@ -9563,443 +9563,443 @@
         }
         break;
     }
-    case TestCluster::Id: {
+    case UnitTesting::Id: {
         switch (path.mAttributeId)
         {
-        case TestCluster::Attributes::Boolean::Id: {
+        case UnitTesting::Attributes::Boolean::Id: {
             bool value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("boolean", 1, value);
         }
-        case TestCluster::Attributes::Bitmap8::Id: {
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+        case UnitTesting::Attributes::Bitmap8::Id: {
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("bitmap8", 1, value);
         }
-        case TestCluster::Attributes::Bitmap16::Id: {
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+        case UnitTesting::Attributes::Bitmap16::Id: {
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("bitmap16", 1, value);
         }
-        case TestCluster::Attributes::Bitmap32::Id: {
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+        case UnitTesting::Attributes::Bitmap32::Id: {
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("bitmap32", 1, value);
         }
-        case TestCluster::Attributes::Bitmap64::Id: {
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+        case UnitTesting::Attributes::Bitmap64::Id: {
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("bitmap64", 1, value);
         }
-        case TestCluster::Attributes::Int8u::Id: {
+        case UnitTesting::Attributes::Int8u::Id: {
             uint8_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int8u", 1, value);
         }
-        case TestCluster::Attributes::Int16u::Id: {
+        case UnitTesting::Attributes::Int16u::Id: {
             uint16_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int16u", 1, value);
         }
-        case TestCluster::Attributes::Int24u::Id: {
+        case UnitTesting::Attributes::Int24u::Id: {
             uint32_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int24u", 1, value);
         }
-        case TestCluster::Attributes::Int32u::Id: {
+        case UnitTesting::Attributes::Int32u::Id: {
             uint32_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int32u", 1, value);
         }
-        case TestCluster::Attributes::Int40u::Id: {
+        case UnitTesting::Attributes::Int40u::Id: {
             uint64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int40u", 1, value);
         }
-        case TestCluster::Attributes::Int48u::Id: {
+        case UnitTesting::Attributes::Int48u::Id: {
             uint64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int48u", 1, value);
         }
-        case TestCluster::Attributes::Int56u::Id: {
+        case UnitTesting::Attributes::Int56u::Id: {
             uint64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int56u", 1, value);
         }
-        case TestCluster::Attributes::Int64u::Id: {
+        case UnitTesting::Attributes::Int64u::Id: {
             uint64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int64u", 1, value);
         }
-        case TestCluster::Attributes::Int8s::Id: {
+        case UnitTesting::Attributes::Int8s::Id: {
             int8_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int8s", 1, value);
         }
-        case TestCluster::Attributes::Int16s::Id: {
+        case UnitTesting::Attributes::Int16s::Id: {
             int16_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int16s", 1, value);
         }
-        case TestCluster::Attributes::Int24s::Id: {
+        case UnitTesting::Attributes::Int24s::Id: {
             int32_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int24s", 1, value);
         }
-        case TestCluster::Attributes::Int32s::Id: {
+        case UnitTesting::Attributes::Int32s::Id: {
             int32_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int32s", 1, value);
         }
-        case TestCluster::Attributes::Int40s::Id: {
+        case UnitTesting::Attributes::Int40s::Id: {
             int64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int40s", 1, value);
         }
-        case TestCluster::Attributes::Int48s::Id: {
+        case UnitTesting::Attributes::Int48s::Id: {
             int64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int48s", 1, value);
         }
-        case TestCluster::Attributes::Int56s::Id: {
+        case UnitTesting::Attributes::Int56s::Id: {
             int64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int56s", 1, value);
         }
-        case TestCluster::Attributes::Int64s::Id: {
+        case UnitTesting::Attributes::Int64s::Id: {
             int64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("int64s", 1, value);
         }
-        case TestCluster::Attributes::Enum8::Id: {
+        case UnitTesting::Attributes::Enum8::Id: {
             uint8_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("enum8", 1, value);
         }
-        case TestCluster::Attributes::Enum16::Id: {
+        case UnitTesting::Attributes::Enum16::Id: {
             uint16_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("enum16", 1, value);
         }
-        case TestCluster::Attributes::FloatSingle::Id: {
+        case UnitTesting::Attributes::FloatSingle::Id: {
             float value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("float_single", 1, value);
         }
-        case TestCluster::Attributes::FloatDouble::Id: {
+        case UnitTesting::Attributes::FloatDouble::Id: {
             double value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("float_double", 1, value);
         }
-        case TestCluster::Attributes::OctetString::Id: {
+        case UnitTesting::Attributes::OctetString::Id: {
             chip::ByteSpan value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("octet_string", 1, value);
         }
-        case TestCluster::Attributes::ListInt8u::Id: {
+        case UnitTesting::Attributes::ListInt8u::Id: {
             chip::app::DataModel::DecodableList<uint8_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("list_int8u", 1, value);
         }
-        case TestCluster::Attributes::ListOctetString::Id: {
+        case UnitTesting::Attributes::ListOctetString::Id: {
             chip::app::DataModel::DecodableList<chip::ByteSpan> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("list_octet_string", 1, value);
         }
-        case TestCluster::Attributes::ListStructOctetString::Id: {
-            chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType>
+        case UnitTesting::Attributes::ListStructOctetString::Id: {
+            chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType>
                 value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("list_struct_octet_string", 1, value);
         }
-        case TestCluster::Attributes::LongOctetString::Id: {
+        case UnitTesting::Attributes::LongOctetString::Id: {
             chip::ByteSpan value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("long_octet_string", 1, value);
         }
-        case TestCluster::Attributes::CharString::Id: {
+        case UnitTesting::Attributes::CharString::Id: {
             chip::CharSpan value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("char_string", 1, value);
         }
-        case TestCluster::Attributes::LongCharString::Id: {
+        case UnitTesting::Attributes::LongCharString::Id: {
             chip::CharSpan value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("long_char_string", 1, value);
         }
-        case TestCluster::Attributes::EpochUs::Id: {
+        case UnitTesting::Attributes::EpochUs::Id: {
             uint64_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("epoch_us", 1, value);
         }
-        case TestCluster::Attributes::EpochS::Id: {
+        case UnitTesting::Attributes::EpochS::Id: {
             uint32_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("epoch_s", 1, value);
         }
-        case TestCluster::Attributes::VendorId::Id: {
+        case UnitTesting::Attributes::VendorId::Id: {
             chip::VendorId value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("vendor_id", 1, value);
         }
-        case TestCluster::Attributes::ListNullablesAndOptionalsStruct::Id: {
+        case UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id: {
             chip::app::DataModel::DecodableList<
-                chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType>
+                chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType>
                 value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("list_nullables_and_optionals_struct", 1, value);
         }
-        case TestCluster::Attributes::EnumAttr::Id: {
-            chip::app::Clusters::TestCluster::SimpleEnum value;
+        case UnitTesting::Attributes::EnumAttr::Id: {
+            chip::app::Clusters::UnitTesting::SimpleEnum value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("enum_attr", 1, value);
         }
-        case TestCluster::Attributes::StructAttr::Id: {
-            chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType value;
+        case UnitTesting::Attributes::StructAttr::Id: {
+            chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("struct_attr", 1, value);
         }
-        case TestCluster::Attributes::RangeRestrictedInt8u::Id: {
+        case UnitTesting::Attributes::RangeRestrictedInt8u::Id: {
             uint8_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("range_restricted_int8u", 1, value);
         }
-        case TestCluster::Attributes::RangeRestrictedInt8s::Id: {
+        case UnitTesting::Attributes::RangeRestrictedInt8s::Id: {
             int8_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("range_restricted_int8s", 1, value);
         }
-        case TestCluster::Attributes::RangeRestrictedInt16u::Id: {
+        case UnitTesting::Attributes::RangeRestrictedInt16u::Id: {
             uint16_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("range_restricted_int16u", 1, value);
         }
-        case TestCluster::Attributes::RangeRestrictedInt16s::Id: {
+        case UnitTesting::Attributes::RangeRestrictedInt16s::Id: {
             int16_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("range_restricted_int16s", 1, value);
         }
-        case TestCluster::Attributes::ListLongOctetString::Id: {
+        case UnitTesting::Attributes::ListLongOctetString::Id: {
             chip::app::DataModel::DecodableList<chip::ByteSpan> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("list_long_octet_string", 1, value);
         }
-        case TestCluster::Attributes::ListFabricScoped::Id: {
-            chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> value;
+        case UnitTesting::Attributes::ListFabricScoped::Id: {
+            chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("list_fabric_scoped", 1, value);
         }
-        case TestCluster::Attributes::TimedWriteBoolean::Id: {
+        case UnitTesting::Attributes::TimedWriteBoolean::Id: {
             bool value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("timed_write_boolean", 1, value);
         }
-        case TestCluster::Attributes::GeneralErrorBoolean::Id: {
+        case UnitTesting::Attributes::GeneralErrorBoolean::Id: {
             bool value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("general_error_boolean", 1, value);
         }
-        case TestCluster::Attributes::ClusterErrorBoolean::Id: {
+        case UnitTesting::Attributes::ClusterErrorBoolean::Id: {
             bool value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("cluster_error_boolean", 1, value);
         }
-        case TestCluster::Attributes::Unsupported::Id: {
+        case UnitTesting::Attributes::Unsupported::Id: {
             bool value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("unsupported", 1, value);
         }
-        case TestCluster::Attributes::NullableBoolean::Id: {
+        case UnitTesting::Attributes::NullableBoolean::Id: {
             chip::app::DataModel::Nullable<bool> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_boolean", 1, value);
         }
-        case TestCluster::Attributes::NullableBitmap8::Id: {
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+        case UnitTesting::Attributes::NullableBitmap8::Id: {
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_bitmap8", 1, value);
         }
-        case TestCluster::Attributes::NullableBitmap16::Id: {
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+        case UnitTesting::Attributes::NullableBitmap16::Id: {
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_bitmap16", 1, value);
         }
-        case TestCluster::Attributes::NullableBitmap32::Id: {
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+        case UnitTesting::Attributes::NullableBitmap32::Id: {
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_bitmap32", 1, value);
         }
-        case TestCluster::Attributes::NullableBitmap64::Id: {
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+        case UnitTesting::Attributes::NullableBitmap64::Id: {
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_bitmap64", 1, value);
         }
-        case TestCluster::Attributes::NullableInt8u::Id: {
+        case UnitTesting::Attributes::NullableInt8u::Id: {
             chip::app::DataModel::Nullable<uint8_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int8u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt16u::Id: {
+        case UnitTesting::Attributes::NullableInt16u::Id: {
             chip::app::DataModel::Nullable<uint16_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int16u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt24u::Id: {
+        case UnitTesting::Attributes::NullableInt24u::Id: {
             chip::app::DataModel::Nullable<uint32_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int24u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt32u::Id: {
+        case UnitTesting::Attributes::NullableInt32u::Id: {
             chip::app::DataModel::Nullable<uint32_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int32u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt40u::Id: {
+        case UnitTesting::Attributes::NullableInt40u::Id: {
             chip::app::DataModel::Nullable<uint64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int40u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt48u::Id: {
+        case UnitTesting::Attributes::NullableInt48u::Id: {
             chip::app::DataModel::Nullable<uint64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int48u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt56u::Id: {
+        case UnitTesting::Attributes::NullableInt56u::Id: {
             chip::app::DataModel::Nullable<uint64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int56u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt64u::Id: {
+        case UnitTesting::Attributes::NullableInt64u::Id: {
             chip::app::DataModel::Nullable<uint64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int64u", 1, value);
         }
-        case TestCluster::Attributes::NullableInt8s::Id: {
+        case UnitTesting::Attributes::NullableInt8s::Id: {
             chip::app::DataModel::Nullable<int8_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int8s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt16s::Id: {
+        case UnitTesting::Attributes::NullableInt16s::Id: {
             chip::app::DataModel::Nullable<int16_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int16s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt24s::Id: {
+        case UnitTesting::Attributes::NullableInt24s::Id: {
             chip::app::DataModel::Nullable<int32_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int24s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt32s::Id: {
+        case UnitTesting::Attributes::NullableInt32s::Id: {
             chip::app::DataModel::Nullable<int32_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int32s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt40s::Id: {
+        case UnitTesting::Attributes::NullableInt40s::Id: {
             chip::app::DataModel::Nullable<int64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int40s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt48s::Id: {
+        case UnitTesting::Attributes::NullableInt48s::Id: {
             chip::app::DataModel::Nullable<int64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int48s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt56s::Id: {
+        case UnitTesting::Attributes::NullableInt56s::Id: {
             chip::app::DataModel::Nullable<int64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int56s", 1, value);
         }
-        case TestCluster::Attributes::NullableInt64s::Id: {
+        case UnitTesting::Attributes::NullableInt64s::Id: {
             chip::app::DataModel::Nullable<int64_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_int64s", 1, value);
         }
-        case TestCluster::Attributes::NullableEnum8::Id: {
+        case UnitTesting::Attributes::NullableEnum8::Id: {
             chip::app::DataModel::Nullable<uint8_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_enum8", 1, value);
         }
-        case TestCluster::Attributes::NullableEnum16::Id: {
+        case UnitTesting::Attributes::NullableEnum16::Id: {
             chip::app::DataModel::Nullable<uint16_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_enum16", 1, value);
         }
-        case TestCluster::Attributes::NullableFloatSingle::Id: {
+        case UnitTesting::Attributes::NullableFloatSingle::Id: {
             chip::app::DataModel::Nullable<float> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_float_single", 1, value);
         }
-        case TestCluster::Attributes::NullableFloatDouble::Id: {
+        case UnitTesting::Attributes::NullableFloatDouble::Id: {
             chip::app::DataModel::Nullable<double> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_float_double", 1, value);
         }
-        case TestCluster::Attributes::NullableOctetString::Id: {
+        case UnitTesting::Attributes::NullableOctetString::Id: {
             chip::app::DataModel::Nullable<chip::ByteSpan> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_octet_string", 1, value);
         }
-        case TestCluster::Attributes::NullableCharString::Id: {
+        case UnitTesting::Attributes::NullableCharString::Id: {
             chip::app::DataModel::Nullable<chip::CharSpan> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_char_string", 1, value);
         }
-        case TestCluster::Attributes::NullableEnumAttr::Id: {
-            chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+        case UnitTesting::Attributes::NullableEnumAttr::Id: {
+            chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_enum_attr", 1, value);
         }
-        case TestCluster::Attributes::NullableStruct::Id: {
-            chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType> value;
+        case UnitTesting::Attributes::NullableStruct::Id: {
+            chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_struct", 1, value);
         }
-        case TestCluster::Attributes::NullableRangeRestrictedInt8u::Id: {
+        case UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id: {
             chip::app::DataModel::Nullable<uint8_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_range_restricted_int8u", 1, value);
         }
-        case TestCluster::Attributes::NullableRangeRestrictedInt8s::Id: {
+        case UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id: {
             chip::app::DataModel::Nullable<int8_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_range_restricted_int8s", 1, value);
         }
-        case TestCluster::Attributes::NullableRangeRestrictedInt16u::Id: {
+        case UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id: {
             chip::app::DataModel::Nullable<uint16_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_range_restricted_int16u", 1, value);
         }
-        case TestCluster::Attributes::NullableRangeRestrictedInt16s::Id: {
+        case UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id: {
             chip::app::DataModel::Nullable<int16_t> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("nullable_range_restricted_int16s", 1, value);
         }
-        case TestCluster::Attributes::WriteOnlyInt8u::Id: {
+        case UnitTesting::Attributes::WriteOnlyInt8u::Id: {
             uint8_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("write_only_int8u", 1, value);
         }
-        case TestCluster::Attributes::GeneratedCommandList::Id: {
+        case UnitTesting::Attributes::GeneratedCommandList::Id: {
             chip::app::DataModel::DecodableList<chip::CommandId> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("GeneratedCommandList", 1, value);
         }
-        case TestCluster::Attributes::AcceptedCommandList::Id: {
+        case UnitTesting::Attributes::AcceptedCommandList::Id: {
             chip::app::DataModel::DecodableList<chip::CommandId> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("AcceptedCommandList", 1, value);
         }
-        case TestCluster::Attributes::AttributeList::Id: {
+        case UnitTesting::Attributes::AttributeList::Id: {
             chip::app::DataModel::DecodableList<chip::AttributeId> value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("AttributeList", 1, value);
         }
-        case TestCluster::Attributes::FeatureMap::Id: {
+        case UnitTesting::Attributes::FeatureMap::Id: {
             uint32_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("FeatureMap", 1, value);
         }
-        case TestCluster::Attributes::ClusterRevision::Id: {
+        case UnitTesting::Attributes::ClusterRevision::Id: {
             uint16_t value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("ClusterRevision", 1, value);
@@ -10349,66 +10349,66 @@
         }
         break;
     }
-    case TestCluster::Id: {
+    case UnitTesting::Id: {
         switch (path.mCommandId)
         {
-        case TestCluster::Commands::TestSpecificResponse::Id: {
-            TestCluster::Commands::TestSpecificResponse::DecodableType value;
+        case UnitTesting::Commands::TestSpecificResponse::Id: {
+            UnitTesting::Commands::TestSpecificResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestSpecificResponse", 1, value);
         }
-        case TestCluster::Commands::TestAddArgumentsResponse::Id: {
-            TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+        case UnitTesting::Commands::TestAddArgumentsResponse::Id: {
+            UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestAddArgumentsResponse", 1, value);
         }
-        case TestCluster::Commands::TestSimpleArgumentResponse::Id: {
-            TestCluster::Commands::TestSimpleArgumentResponse::DecodableType value;
+        case UnitTesting::Commands::TestSimpleArgumentResponse::Id: {
+            UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestSimpleArgumentResponse", 1, value);
         }
-        case TestCluster::Commands::TestStructArrayArgumentResponse::Id: {
-            TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType value;
+        case UnitTesting::Commands::TestStructArrayArgumentResponse::Id: {
+            UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestStructArrayArgumentResponse", 1, value);
         }
-        case TestCluster::Commands::TestListInt8UReverseResponse::Id: {
-            TestCluster::Commands::TestListInt8UReverseResponse::DecodableType value;
+        case UnitTesting::Commands::TestListInt8UReverseResponse::Id: {
+            UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestListInt8UReverseResponse", 1, value);
         }
-        case TestCluster::Commands::TestEnumsResponse::Id: {
-            TestCluster::Commands::TestEnumsResponse::DecodableType value;
+        case UnitTesting::Commands::TestEnumsResponse::Id: {
+            UnitTesting::Commands::TestEnumsResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestEnumsResponse", 1, value);
         }
-        case TestCluster::Commands::TestNullableOptionalResponse::Id: {
-            TestCluster::Commands::TestNullableOptionalResponse::DecodableType value;
+        case UnitTesting::Commands::TestNullableOptionalResponse::Id: {
+            UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestNullableOptionalResponse", 1, value);
         }
-        case TestCluster::Commands::TestComplexNullableOptionalResponse::Id: {
-            TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType value;
+        case UnitTesting::Commands::TestComplexNullableOptionalResponse::Id: {
+            UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestComplexNullableOptionalResponse", 1, value);
         }
-        case TestCluster::Commands::BooleanResponse::Id: {
-            TestCluster::Commands::BooleanResponse::DecodableType value;
+        case UnitTesting::Commands::BooleanResponse::Id: {
+            UnitTesting::Commands::BooleanResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("BooleanResponse", 1, value);
         }
-        case TestCluster::Commands::SimpleStructResponse::Id: {
-            TestCluster::Commands::SimpleStructResponse::DecodableType value;
+        case UnitTesting::Commands::SimpleStructResponse::Id: {
+            UnitTesting::Commands::SimpleStructResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("SimpleStructResponse", 1, value);
         }
-        case TestCluster::Commands::TestEmitTestEventResponse::Id: {
-            TestCluster::Commands::TestEmitTestEventResponse::DecodableType value;
+        case UnitTesting::Commands::TestEmitTestEventResponse::Id: {
+            UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestEmitTestEventResponse", 1, value);
         }
-        case TestCluster::Commands::TestEmitTestFabricScopedEventResponse::Id: {
-            TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType value;
+        case UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::Id: {
+            UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestEmitTestFabricScopedEventResponse", 1, value);
         }
@@ -10803,16 +10803,16 @@
         }
         break;
     }
-    case TestCluster::Id: {
+    case UnitTesting::Id: {
         switch (header.mPath.mEventId)
         {
-        case TestCluster::Events::TestEvent::Id: {
-            chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+        case UnitTesting::Events::TestEvent::Id: {
+            chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestEvent", 1, value);
         }
-        case TestCluster::Events::TestFabricScopedEvent::Id: {
-            chip::app::Clusters::TestCluster::Events::TestFabricScopedEvent::DecodableType value;
+        case UnitTesting::Events::TestFabricScopedEvent::Id: {
+            chip::app::Clusters::UnitTesting::Events::TestFabricScopedEvent::DecodableType value;
             ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
             return DataModelLogger::LogValue("TestFabricScopedEvent", 1, value);
         }
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
index ca89b8b..c9b8233 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -56,7 +56,7 @@
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::DoorLock::Structs::DlCredential::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -86,15 +86,15 @@
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::NestedStruct::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::NestedStruct::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::NestedStructList::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::NestedStructList::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfo::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType & value);
 static CHIP_ERROR
 LogValue(const char * label, size_t indent,
          const chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType & value);
@@ -113,7 +113,7 @@
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::ModeSelect::Structs::SemanticTag::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::ContentLauncher::Structs::StyleInformation::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -123,9 +123,9 @@
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::Binding::Structs::TargetStruct::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value);
 static CHIP_ERROR
@@ -261,9 +261,9 @@
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::PumpConfigurationAndControl::Events::TurbineOperation::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Events::TestFabricScopedEvent::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Events::TestFabricScopedEvent::DecodableType & value);
 
 static CHIP_ERROR LogValue(const char * label, size_t indent,
                            const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & value);
@@ -363,29 +363,29 @@
 LogValue(const char * label, size_t indent,
          const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & value);
 static CHIP_ERROR
 LogValue(const char * label, size_t indent,
-         const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & value);
+         const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & value);
 static CHIP_ERROR
 LogValue(const char * label, size_t indent,
-         const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType & value);
+         const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & value);
 static CHIP_ERROR LogValue(const char * label, size_t indent,
-                           const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & value);
+                           const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & value);
 static CHIP_ERROR
 LogValue(const char * label, size_t indent,
-         const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value);
+         const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value);
diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h
index ef88de3..1c8402f 100644
--- a/zzz_generated/chip-tool/zap-generated/test/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h
@@ -47933,8 +47933,8 @@
     chip::Optional<uint16_t> mTimeout;
 
     chip::app::DataModel::Nullable<bool> booValueNull;
-    chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> nullableValue254;
-    chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> nullableEnumAttr3;
+    chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> nullableValue254;
+    chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> nullableEnumAttr3;
     uint8_t * nullableOctetStrTestValueBuffer = nullptr;
     chip::app::DataModel::Nullable<chip::ByteSpan> nullableOctetStrTestValue;
     char * nullableCharStringSaveBuffer = nullptr;
@@ -47965,7 +47965,7 @@
         case 3:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("returnValue", value.returnValue, 7U));
             }
@@ -47973,7 +47973,7 @@
         case 4:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U));
             }
@@ -48014,7 +48014,7 @@
         case 11:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap8", value, 0U));
             }
@@ -48025,7 +48025,7 @@
         case 13:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap8", value, 255U));
             }
@@ -48036,7 +48036,7 @@
         case 15:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap8", value, 0U));
             }
@@ -48044,7 +48044,7 @@
         case 16:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap16", value, 0U));
             }
@@ -48055,7 +48055,7 @@
         case 18:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap16", value, 65535U));
             }
@@ -48066,7 +48066,7 @@
         case 20:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap16", value, 0U));
             }
@@ -48074,7 +48074,7 @@
         case 21:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 0UL));
             }
@@ -48085,7 +48085,7 @@
         case 23:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 4294967295UL));
             }
@@ -48096,7 +48096,7 @@
         case 25:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 0UL));
             }
@@ -48104,7 +48104,7 @@
         case 26:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap64", value, 0ULL));
             }
@@ -48115,7 +48115,7 @@
         case 28:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap64", value, 18446744073709551615ULL));
             }
@@ -48126,7 +48126,7 @@
         case 30:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap64", value, 0ULL));
             }
@@ -48974,7 +48974,7 @@
         case 154:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("arg1", value.arg1, 20003U));
                 VerifyOrReturn(CheckValue("arg2", value.arg2, 1U));
@@ -48983,7 +48983,7 @@
         case 155:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("arg1", value.arg1, 20003U));
                 VerifyOrReturn(CheckValue("arg2", value.arg2, 4U));
@@ -48992,7 +48992,7 @@
         case 156:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, true));
             }
@@ -49000,7 +49000,7 @@
         case 157:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, false));
             }
@@ -49008,7 +49008,7 @@
         case 158:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, true));
             }
@@ -49016,7 +49016,7 @@
         case 159:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, false));
             }
@@ -49024,7 +49024,7 @@
         case 160:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, true));
             }
@@ -49032,7 +49032,7 @@
         case 161:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, false));
             }
@@ -49040,7 +49040,7 @@
         case 162:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("arg1.a", value.arg1.a, 17U));
                 VerifyOrReturn(CheckValue("arg1.b", value.arg1.b, false));
@@ -49056,7 +49056,7 @@
         case 163:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, true));
             }
@@ -49064,7 +49064,7 @@
         case 164:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, false));
             }
@@ -49072,7 +49072,7 @@
         case 165:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 {
                     auto iter_0 = value.arg1.begin();
@@ -49101,7 +49101,7 @@
         case 166:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 {
                     auto iter_0 = value.arg1.begin();
@@ -49112,7 +49112,7 @@
         case 167:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, true));
             }
@@ -49120,7 +49120,7 @@
         case 168:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, false));
             }
@@ -49128,7 +49128,7 @@
         case 169:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, true));
             }
@@ -49136,7 +49136,7 @@
         case 170:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, false));
             }
@@ -49195,7 +49195,7 @@
         case 176:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType>
+                chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType>
                     value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 {
@@ -49223,7 +49223,7 @@
         case 177:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("wasPresent", value.wasPresent, true));
                 VerifyOrReturn(CheckValuePresent("wasNull", value.wasNull));
@@ -49238,7 +49238,7 @@
         case 178:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("wasPresent", value.wasPresent, false));
             }
@@ -49247,7 +49247,7 @@
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
                 chip::app::DataModel::DecodableList<
-                    chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType>
+                    chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType>
                     value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 {
@@ -49271,7 +49271,7 @@
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
                 chip::app::DataModel::DecodableList<
-                    chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType>
+                    chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType>
                     value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 {
@@ -49339,7 +49339,7 @@
         case 188:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value));
                 VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254U));
@@ -49351,7 +49351,7 @@
         case 190:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value));
                 VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254U));
@@ -49364,7 +49364,7 @@
         case 192:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNull("nullableBitmap8", value));
             }
@@ -49372,7 +49372,7 @@
         case 193:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value", value, nullableValue254));
             }
@@ -49383,7 +49383,7 @@
         case 195:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap16", value));
                 VerifyOrReturn(CheckValue("nullableBitmap16.Value()", value.Value(), 65534U));
@@ -49395,7 +49395,7 @@
         case 197:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap16", value));
                 VerifyOrReturn(CheckValue("nullableBitmap16.Value()", value.Value(), 65534U));
@@ -49407,7 +49407,7 @@
         case 199:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNull("nullableBitmap16", value));
             }
@@ -49418,7 +49418,7 @@
         case 201:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap32", value));
                 VerifyOrReturn(CheckValue("nullableBitmap32.Value()", value.Value(), 4294967294UL));
@@ -49430,7 +49430,7 @@
         case 203:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap32", value));
                 VerifyOrReturn(CheckValue("nullableBitmap32.Value()", value.Value(), 4294967294UL));
@@ -49442,7 +49442,7 @@
         case 205:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNull("nullableBitmap32", value));
             }
@@ -49453,7 +49453,7 @@
         case 207:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap64", value));
                 VerifyOrReturn(CheckValue("nullableBitmap64.Value()", value.Value(), 18446744073709551614ULL));
@@ -49465,7 +49465,7 @@
         case 209:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableBitmap64", value));
                 VerifyOrReturn(CheckValue("nullableBitmap64.Value()", value.Value(), 18446744073709551614ULL));
@@ -49477,7 +49477,7 @@
         case 211:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+                chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNull("nullableBitmap64", value));
             }
@@ -50332,7 +50332,7 @@
         case 346:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+                chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value));
                 VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 0U));
@@ -50344,7 +50344,7 @@
         case 348:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+                chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value));
                 VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 3U));
@@ -50356,7 +50356,7 @@
         case 350:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+                chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value));
                 VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 3U));
@@ -50369,7 +50369,7 @@
         case 352:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+                chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValueNull("nullableEnumAttr", value));
             }
@@ -50377,7 +50377,7 @@
         case 353:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+                chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value", value, nullableEnumAttr3));
             }
@@ -51233,7 +51233,7 @@
         case 489:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType value;
+                chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("structAttr.a", value.a, 5U));
                 VerifyOrReturn(CheckValue("structAttr.b", value.b, true));
@@ -51270,8 +51270,8 @@
         case 1: {
             LogStep(1, "Send Test Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::Test::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::Test::Id, value,
+            chip::app::Clusters::UnitTesting::Commands::Test::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::Test::Id, value,
                                chip::NullOptional
 
             );
@@ -51279,8 +51279,8 @@
         case 2: {
             LogStep(2, "Send Test Not Handled Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestNotHandled::Id, value,
+            chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestNotHandled::Id, value,
                                chip::NullOptional
 
             );
@@ -51288,8 +51288,8 @@
         case 3: {
             LogStep(3, "Send Test Specific Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestSpecific::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestSpecific::Id, value,
+            chip::app::Clusters::UnitTesting::Commands::TestSpecific::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestSpecific::Id, value,
                                chip::NullOptional
 
             );
@@ -51297,10 +51297,10 @@
         case 4: {
             LogStep(4, "Send Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = 3U;
             value.arg2 = 17U;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
@@ -51308,17 +51308,17 @@
         case 5: {
             LogStep(5, "Send failing Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = 250U;
             value.arg2 = 6U;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
         }
         case 6: {
             LogStep(6, "Read attribute BOOLEAN Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 7: {
@@ -51326,12 +51326,12 @@
             ListFreer listFreer;
             bool value;
             value = 1;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 8: {
             LogStep(8, "Read attribute BOOLEAN True");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 9: {
@@ -51339,141 +51339,141 @@
             ListFreer listFreer;
             bool value;
             value = 0;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 10: {
             LogStep(10, "Read attribute BOOLEAN False");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 11: {
             LogStep(11, "Read attribute BITMAP8 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true,
                                  chip::NullOptional);
         }
         case 12: {
             LogStep(12, "Write attribute BITMAP8 Max Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>(255U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>(255U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 13: {
             LogStep(13, "Read attribute BITMAP8 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true,
                                  chip::NullOptional);
         }
         case 14: {
             LogStep(14, "Write attribute BITMAP8 Min Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>(0U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>(0U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 15: {
             LogStep(15, "Read attribute BITMAP8 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true,
                                  chip::NullOptional);
         }
         case 16: {
             LogStep(16, "Read attribute BITMAP16 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true,
                                  chip::NullOptional);
         }
         case 17: {
             LogStep(17, "Write attribute BITMAP16 Max Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>(65535U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>(65535U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 18: {
             LogStep(18, "Read attribute BITMAP16 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true,
                                  chip::NullOptional);
         }
         case 19: {
             LogStep(19, "Write attribute BITMAP16 Min Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>(0U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>(0U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 20: {
             LogStep(20, "Read attribute BITMAP16 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true,
                                  chip::NullOptional);
         }
         case 21: {
             LogStep(21, "Read attribute BITMAP32 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 22: {
             LogStep(22, "Write attribute BITMAP32 Max Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(4294967295UL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(4294967295UL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 23: {
             LogStep(23, "Read attribute BITMAP32 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 24: {
             LogStep(24, "Write attribute BITMAP32 Min Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(0UL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(0UL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 25: {
             LogStep(25, "Read attribute BITMAP32 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 26: {
             LogStep(26, "Read attribute BITMAP64 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true,
                                  chip::NullOptional);
         }
         case 27: {
             LogStep(27, "Write attribute BITMAP64 Max Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>(18446744073709551615ULL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>(18446744073709551615ULL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 28: {
             LogStep(28, "Read attribute BITMAP64 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true,
                                  chip::NullOptional);
         }
         case 29: {
             LogStep(29, "Write attribute BITMAP64 Min Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>(0ULL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>(0ULL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 30: {
             LogStep(30, "Read attribute BITMAP64 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true,
                                  chip::NullOptional);
         }
         case 31: {
             LogStep(31, "Read attribute INT8U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true,
                                  chip::NullOptional);
         }
         case 32: {
@@ -51481,12 +51481,12 @@
             ListFreer listFreer;
             uint8_t value;
             value = 255U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 33: {
             LogStep(33, "Read attribute INT8U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true,
                                  chip::NullOptional);
         }
         case 34: {
@@ -51494,17 +51494,17 @@
             ListFreer listFreer;
             uint8_t value;
             value = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 35: {
             LogStep(35, "Read attribute INT8U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true,
                                  chip::NullOptional);
         }
         case 36: {
             LogStep(36, "Read attribute INT16U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true,
                                  chip::NullOptional);
         }
         case 37: {
@@ -51512,12 +51512,12 @@
             ListFreer listFreer;
             uint16_t value;
             value = 65535U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 38: {
             LogStep(38, "Read attribute INT16U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true,
                                  chip::NullOptional);
         }
         case 39: {
@@ -51525,17 +51525,17 @@
             ListFreer listFreer;
             uint16_t value;
             value = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 40: {
             LogStep(40, "Read attribute INT16U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true,
                                  chip::NullOptional);
         }
         case 41: {
             LogStep(41, "Read attribute INT32U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 42: {
@@ -51543,12 +51543,12 @@
             ListFreer listFreer;
             uint32_t value;
             value = 4294967295UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 43: {
             LogStep(43, "Read attribute INT32U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 44: {
@@ -51556,17 +51556,17 @@
             ListFreer listFreer;
             uint32_t value;
             value = 0UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 45: {
             LogStep(45, "Read attribute INT32U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 46: {
             LogStep(46, "Read attribute INT64U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true,
                                  chip::NullOptional);
         }
         case 47: {
@@ -51574,12 +51574,12 @@
             ListFreer listFreer;
             uint64_t value;
             value = 18446744073709551615ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 48: {
             LogStep(48, "Read attribute INT64U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true,
                                  chip::NullOptional);
         }
         case 49: {
@@ -51587,17 +51587,17 @@
             ListFreer listFreer;
             uint64_t value;
             value = 0ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 50: {
             LogStep(50, "Read attribute INT64U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true,
                                  chip::NullOptional);
         }
         case 51: {
             LogStep(51, "Read attribute INT8S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 52: {
@@ -51605,12 +51605,12 @@
             ListFreer listFreer;
             int8_t value;
             value = 127;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 53: {
             LogStep(53, "Read attribute INT8S Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 54: {
@@ -51618,12 +51618,12 @@
             ListFreer listFreer;
             int8_t value;
             value = -128;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 55: {
             LogStep(55, "Read attribute INT8S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 56: {
@@ -51631,17 +51631,17 @@
             ListFreer listFreer;
             int8_t value;
             value = 0;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 57: {
             LogStep(57, "Read attribute INT8S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 58: {
             LogStep(58, "Read attribute INT16S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 59: {
@@ -51649,12 +51649,12 @@
             ListFreer listFreer;
             int16_t value;
             value = 32767;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 60: {
             LogStep(60, "Read attribute INT16S Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 61: {
@@ -51662,12 +51662,12 @@
             ListFreer listFreer;
             int16_t value;
             value = -32768;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 62: {
             LogStep(62, "Read attribute INT16S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 63: {
@@ -51675,17 +51675,17 @@
             ListFreer listFreer;
             int16_t value;
             value = 0;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 64: {
             LogStep(64, "Read attribute INT16S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 65: {
             LogStep(65, "Read attribute INT32S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 66: {
@@ -51693,12 +51693,12 @@
             ListFreer listFreer;
             int32_t value;
             value = 2147483647L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 67: {
             LogStep(67, "Read attribute INT32S Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 68: {
@@ -51706,12 +51706,12 @@
             ListFreer listFreer;
             int32_t value;
             value = -2147483648L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 69: {
             LogStep(69, "Read attribute INT32S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 70: {
@@ -51719,17 +51719,17 @@
             ListFreer listFreer;
             int32_t value;
             value = 0L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 71: {
             LogStep(71, "Read attribute INT32S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 72: {
             LogStep(72, "Read attribute INT64S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 73: {
@@ -51737,12 +51737,12 @@
             ListFreer listFreer;
             int64_t value;
             value = 9223372036854775807LL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 74: {
             LogStep(74, "Read attribute INT64S Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 75: {
@@ -51750,12 +51750,12 @@
             ListFreer listFreer;
             int64_t value;
             value = -9223372036854775807LL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 76: {
             LogStep(76, "Read attribute INT64S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 77: {
@@ -51763,17 +51763,17 @@
             ListFreer listFreer;
             int64_t value;
             value = 0LL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 78: {
             LogStep(78, "Read attribute INT64S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 79: {
             LogStep(79, "Read attribute SINGLE Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true,
                                  chip::NullOptional);
         }
         case 80: {
@@ -51781,12 +51781,12 @@
             ListFreer listFreer;
             float value;
             value = 0.1f;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 81: {
             LogStep(81, "Read attribute SINGLE medium Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true,
                                  chip::NullOptional);
         }
         case 82: {
@@ -51794,12 +51794,12 @@
             ListFreer listFreer;
             float value;
             value = 17000000000.0f;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 83: {
             LogStep(83, "Read attribute SINGLE large Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true,
                                  chip::NullOptional);
         }
         case 84: {
@@ -51807,12 +51807,12 @@
             ListFreer listFreer;
             float value;
             value = 1.7e-10f;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 85: {
             LogStep(85, "Read attribute SINGLE small Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true,
                                  chip::NullOptional);
         }
         case 86: {
@@ -51820,17 +51820,17 @@
             ListFreer listFreer;
             float value;
             value = 0.0f;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 87: {
             LogStep(87, "Read attribute SINGLE Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatSingle::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true,
                                  chip::NullOptional);
         }
         case 88: {
             LogStep(88, "Read attribute DOUBLE Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true,
                                  chip::NullOptional);
         }
         case 89: {
@@ -51838,12 +51838,12 @@
             ListFreer listFreer;
             double value;
             value = 0.1234567890123;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 90: {
             LogStep(90, "Read attribute DOUBLE medium Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true,
                                  chip::NullOptional);
         }
         case 91: {
@@ -51851,12 +51851,12 @@
             ListFreer listFreer;
             double value;
             value = 1.7e+200;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 92: {
             LogStep(92, "Read attribute DOUBLE large Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true,
                                  chip::NullOptional);
         }
         case 93: {
@@ -51864,12 +51864,12 @@
             ListFreer listFreer;
             double value;
             value = 1.7e-200;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 94: {
             LogStep(94, "Read attribute DOUBLE small Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true,
                                  chip::NullOptional);
         }
         case 95: {
@@ -51877,17 +51877,17 @@
             ListFreer listFreer;
             double value;
             value = 0;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 96: {
             LogStep(96, "Read attribute DOUBLE Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::FloatDouble::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true,
                                  chip::NullOptional);
         }
         case 97: {
             LogStep(97, "Read attribute ENUM8 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true,
                                  chip::NullOptional);
         }
         case 98: {
@@ -51895,12 +51895,12 @@
             ListFreer listFreer;
             uint8_t value;
             value = 255U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 99: {
             LogStep(99, "Read attribute ENUM8 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true,
                                  chip::NullOptional);
         }
         case 100: {
@@ -51908,17 +51908,17 @@
             ListFreer listFreer;
             uint8_t value;
             value = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 101: {
             LogStep(101, "Read attribute ENUM8 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true,
                                  chip::NullOptional);
         }
         case 102: {
             LogStep(102, "Read attribute ENUM16 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true,
                                  chip::NullOptional);
         }
         case 103: {
@@ -51926,12 +51926,12 @@
             ListFreer listFreer;
             uint16_t value;
             value = 65535U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 104: {
             LogStep(104, "Read attribute ENUM16 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true,
                                  chip::NullOptional);
         }
         case 105: {
@@ -51939,17 +51939,17 @@
             ListFreer listFreer;
             uint16_t value;
             value = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 106: {
             LogStep(106, "Read attribute ENUM16 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true,
                                  chip::NullOptional);
         }
         case 107: {
             LogStep(107, "Read attribute OCTET_STRING Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 108: {
@@ -51957,12 +51957,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("Tes\000ti\000nggarbage: not in length on purpose"), 9);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 109: {
             LogStep(109, "Read attribute OCTET_STRING with embedded null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 110: {
@@ -51970,12 +51970,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("\x00\x01\x02\x03\x04\x05garbage: not in length on purpose"), 6);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 111: {
             LogStep(111, "Read attribute OCTET_STRING with hex: format");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 112: {
@@ -51983,12 +51983,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("\015\012\377\042\240garbage: not in length on purpose"), 5);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 113: {
             LogStep(113, "Read attribute OCTET_STRING with weird chars");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 114: {
@@ -51996,12 +51996,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 115: {
             LogStep(115, "Read attribute OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 116: {
@@ -52009,12 +52009,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("TestValueLongerThan10garbage: not in length on purpose"), 21);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 117: {
             LogStep(117, "Read attribute OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 118: {
@@ -52022,12 +52022,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 119: {
             LogStep(119, "Read attribute LONG_OCTET_STRING Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 120: {
@@ -52040,12 +52040,12 @@
                                              "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
                                              "111111111111111111111111111111111111111111111garbage: not in length on purpose"),
                 300);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 121: {
             LogStep(121, "Read attribute LONG_OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 122: {
@@ -52053,12 +52053,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 123: {
             LogStep(123, "Read attribute CHAR_STRING Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 124: {
@@ -52066,12 +52066,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("☉T☉garbage: not in length on purpose", 7);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 125: {
             LogStep(125, "Read attribute CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 126: {
@@ -52079,12 +52079,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("☉TestValueLongerThan10☉garbage: not in length on purpose", 27);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 127: {
             LogStep(127, "Read attribute CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 128: {
@@ -52092,12 +52092,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("garbage: not in length on purpose", 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 129: {
             LogStep(129, "Read attribute LONG_CHAR_STRING Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongCharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id, true,
                                  chip::NullOptional);
         }
         case 130: {
@@ -52109,12 +52109,12 @@
                 "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"
                 "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉garbage: not in length on purpose",
                 900);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongCharString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 131: {
             LogStep(131, "Read attribute LONG_CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongCharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id, true,
                                  chip::NullOptional);
         }
         case 132: {
@@ -52122,12 +52122,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("garbage: not in length on purpose", 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::LongCharString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 133: {
             LogStep(133, "Read attribute LIST_LONG_OCTET_STRING (for chunked read)");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListLongOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 134: {
@@ -52185,17 +52185,17 @@
                     512);
                 value = chip::app::DataModel::List<chip::ByteSpan>(listHolder_0->mList, 5);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListLongOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 135: {
             LogStep(135, "Read attribute LIST_LONG_OCTET_STRING (for chunked read)");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListLongOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 136: {
             LogStep(136, "Read attribute EPOCH_US Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true,
                                  chip::NullOptional);
         }
         case 137: {
@@ -52203,12 +52203,12 @@
             ListFreer listFreer;
             uint64_t value;
             value = 18446744073709551615ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 138: {
             LogStep(138, "Read attribute EPOCH_US Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true,
                                  chip::NullOptional);
         }
         case 139: {
@@ -52216,17 +52216,17 @@
             ListFreer listFreer;
             uint64_t value;
             value = 0ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 140: {
             LogStep(140, "Read attribute EPOCH_US Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true,
                                  chip::NullOptional);
         }
         case 141: {
             LogStep(141, "Read attribute EPOCH_S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true,
                                  chip::NullOptional);
         }
         case 142: {
@@ -52234,12 +52234,12 @@
             ListFreer listFreer;
             uint32_t value;
             value = 4294967295UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 143: {
             LogStep(143, "Read attribute EPOCH_S Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true,
                                  chip::NullOptional);
         }
         case 144: {
@@ -52247,17 +52247,17 @@
             ListFreer listFreer;
             uint32_t value;
             value = 0UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 145: {
             LogStep(145, "Read attribute EPOCH_S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true,
                                  chip::NullOptional);
         }
         case 146: {
             LogStep(146, "Read attribute UNSUPPORTED");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Unsupported::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Unsupported::Id, true,
                                  chip::NullOptional);
         }
         case 147: {
@@ -52265,14 +52265,14 @@
             ListFreer listFreer;
             bool value;
             value = 0;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Unsupported::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Unsupported::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 148: {
             LogStep(148, "Send Test Command to unsupported endpoint");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::Test::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(200), TestCluster::Id, TestCluster::Commands::Test::Id, value,
+            chip::app::Clusters::UnitTesting::Commands::Test::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(200), UnitTesting::Id, UnitTesting::Commands::Test::Id, value,
                                chip::NullOptional
 
             );
@@ -52280,15 +52280,15 @@
         case 149: {
             LogStep(149, "Send Test Command to unsupported cluster");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::Test::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(0), TestCluster::Id, TestCluster::Commands::Test::Id, value,
+            chip::app::Clusters::UnitTesting::Commands::Test::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Commands::Test::Id, value,
                                chip::NullOptional
 
             );
         }
         case 150: {
             LogStep(150, "Read attribute vendor_id Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true,
                                  chip::NullOptional);
         }
         case 151: {
@@ -52296,12 +52296,12 @@
             ListFreer listFreer;
             chip::VendorId value;
             value = static_cast<chip::VendorId>(17);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 152: {
             LogStep(152, "Read attribute vendor_id");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true,
                                  chip::NullOptional);
         }
         case 153: {
@@ -52309,16 +52309,16 @@
             ListFreer listFreer;
             chip::VendorId value;
             value = static_cast<chip::VendorId>(0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 154: {
             LogStep(154, "Send a command with a vendor_id and enum");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type value;
             value.arg1 = static_cast<chip::VendorId>(20003);
-            value.arg2 = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(1);
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEnumsRequest::Id, value,
+            value.arg2 = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(1);
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEnumsRequest::Id, value,
                                chip::NullOptional
 
             );
@@ -52326,10 +52326,10 @@
         case 155: {
             LogStep(155, "Send a command with a vendor_id and invalid enum");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type value;
             value.arg1 = static_cast<chip::VendorId>(20003);
-            value.arg2 = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(101);
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEnumsRequest::Id, value,
+            value.arg2 = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(101);
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEnumsRequest::Id, value,
                                chip::NullOptional
 
             );
@@ -52337,127 +52337,127 @@
         case 156: {
             LogStep(156, "Send Test Command With Struct Argument and arg1.b is true");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type value;
 
             value.arg1.a = 0U;
             value.arg1.b = true;
-            value.arg1.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.g = 0.0f;
             value.arg1.h = 0;
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestStructArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestStructArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 157: {
             LogStep(157, "Send Test Command With Struct Argument and arg1.b is false");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type value;
 
             value.arg1.a = 0U;
             value.arg1.b = false;
-            value.arg1.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.g = 0.0f;
             value.arg1.h = 0;
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestStructArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestStructArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 158: {
             LogStep(158, "Send Test Command With Nested Struct Argument and arg1.c.b is true");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type value;
 
             value.arg1.a = 0U;
             value.arg1.b = true;
 
             value.arg1.c.a = 0U;
             value.arg1.c.b = true;
-            value.arg1.c.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.c.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.c.g = 0.0f;
             value.arg1.c.h = 0;
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNestedStructArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNestedStructArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 159: {
             LogStep(159, "Send Test Command With Nested Struct Argument arg1.c.b is false");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type value;
 
             value.arg1.a = 0U;
             value.arg1.b = true;
 
             value.arg1.c.a = 0U;
             value.arg1.c.b = false;
-            value.arg1.c.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.c.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.c.g = 0.0f;
             value.arg1.c.h = 0;
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNestedStructArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNestedStructArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 160: {
             LogStep(160, "Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type value;
 
             value.arg1.a = 0U;
             value.arg1.b = true;
 
             value.arg1.c.a = 0U;
             value.arg1.c.b = true;
-            value.arg1.c.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.c.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.c.g = 0.0f;
             value.arg1.c.h = 0;
 
             {
-                auto * listHolder_1 = new ListHolder<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(2);
+                auto * listHolder_1 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(2);
                 listFreer.add(listHolder_1);
 
                 listHolder_1->mList[0].a = 1U;
                 listHolder_1->mList[0].b = true;
-                listHolder_1->mList[0].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                listHolder_1->mList[0].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                 listHolder_1->mList[0].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                 listHolder_1->mList[0].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                listHolder_1->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_1->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_1->mList[0].g = 0.0f;
                 listHolder_1->mList[0].h = 0;
 
                 listHolder_1->mList[1].a = 2U;
                 listHolder_1->mList[1].b = true;
-                listHolder_1->mList[1].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                listHolder_1->mList[1].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                 listHolder_1->mList[1].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                 listHolder_1->mList[1].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                listHolder_1->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_1->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_1->mList[1].g = 0.0f;
                 listHolder_1->mList[1].h = 0;
 
-                value.arg1.d = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(
+                value.arg1.d = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(
                     listHolder_1->mList, 2);
             }
 
@@ -52490,53 +52490,53 @@
                 value.arg1.g           = chip::app::DataModel::List<uint8_t>(listHolder_1->mList, 2);
             }
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNestedStructListArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNestedStructListArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 161: {
             LogStep(161, "Send Test Command With Nested Struct List Argument and some fields b of arg1.d are false");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type value;
 
             value.arg1.a = 0U;
             value.arg1.b = true;
 
             value.arg1.c.a = 0U;
             value.arg1.c.b = true;
-            value.arg1.c.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.c.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.c.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.c.g = 0.0f;
             value.arg1.c.h = 0;
 
             {
-                auto * listHolder_1 = new ListHolder<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(2);
+                auto * listHolder_1 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(2);
                 listFreer.add(listHolder_1);
 
                 listHolder_1->mList[0].a = 1U;
                 listHolder_1->mList[0].b = true;
-                listHolder_1->mList[0].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                listHolder_1->mList[0].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                 listHolder_1->mList[0].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                 listHolder_1->mList[0].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                listHolder_1->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_1->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_1->mList[0].g = 0.0f;
                 listHolder_1->mList[0].h = 0;
 
                 listHolder_1->mList[1].a = 2U;
                 listHolder_1->mList[1].b = false;
-                listHolder_1->mList[1].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                listHolder_1->mList[1].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                 listHolder_1->mList[1].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                 listHolder_1->mList[1].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                listHolder_1->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_1->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_1->mList[1].g = 0.0f;
                 listHolder_1->mList[1].h = 0;
 
-                value.arg1.d = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(
+                value.arg1.d = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(
                     listHolder_1->mList, 2);
             }
 
@@ -52569,26 +52569,26 @@
                 value.arg1.g           = chip::app::DataModel::List<uint8_t>(listHolder_1->mList, 2);
             }
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNestedStructListArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNestedStructListArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 162: {
             LogStep(162, "Send Test Command With Struct Argument and see what we get back");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Type value;
 
             value.arg1.a = 17U;
             value.arg1.b = false;
-            value.arg1.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg1.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
             value.arg1.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-            value.arg1.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+            value.arg1.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
             value.arg1.g = 0.1f;
             value.arg1.h = 0.1;
 
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::SimpleStructEchoRequest::Id,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::SimpleStructEchoRequest::Id,
                                value, chip::NullOptional
 
             );
@@ -52596,7 +52596,7 @@
         case 163: {
             LogStep(163, "Send Test Command With List of INT8U and none of them is set to 0");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type value;
 
             {
                 auto * listHolder_0 = new ListHolder<uint8_t>(9);
@@ -52612,15 +52612,15 @@
                 listHolder_0->mList[8] = 9U;
                 value.arg1             = chip::app::DataModel::List<uint8_t>(listHolder_0->mList, 9);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListInt8UArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListInt8UArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 164: {
             LogStep(164, "Send Test Command With List of INT8U and one of them is set to 0");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type value;
 
             {
                 auto * listHolder_0 = new ListHolder<uint8_t>(10);
@@ -52637,15 +52637,15 @@
                 listHolder_0->mList[9] = 0U;
                 value.arg1             = chip::app::DataModel::List<uint8_t>(listHolder_0->mList, 10);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListInt8UArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListInt8UArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 165: {
             LogStep(165, "Send Test Command With List of INT8U and get it reversed");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type value;
 
             {
                 auto * listHolder_0 = new ListHolder<uint8_t>(9);
@@ -52661,93 +52661,93 @@
                 listHolder_0->mList[8] = 9U;
                 value.arg1             = chip::app::DataModel::List<uint8_t>(listHolder_0->mList, 9);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListInt8UReverseRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListInt8UReverseRequest::Id, value, chip::NullOptional
 
             );
         }
         case 166: {
             LogStep(166, "Send Test Command With empty List of INT8U and get an empty list back");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type value;
 
             value.arg1 = chip::app::DataModel::List<uint8_t>();
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListInt8UReverseRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListInt8UReverseRequest::Id, value, chip::NullOptional
 
             );
         }
         case 167: {
             LogStep(167, "Send Test Command With List of Struct Argument and arg1.b of first item is true");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type value;
 
             {
-                auto * listHolder_0 = new ListHolder<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(2);
+                auto * listHolder_0 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(2);
                 listFreer.add(listHolder_0);
 
                 listHolder_0->mList[0].a = 0U;
                 listHolder_0->mList[0].b = true;
-                listHolder_0->mList[0].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+                listHolder_0->mList[0].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
                 listHolder_0->mList[0].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18);
                 listHolder_0->mList[0].e = chip::Span<const char>("first_char_stringgarbage: not in length on purpose", 17);
-                listHolder_0->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_0->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_0->mList[0].g = 0.0f;
                 listHolder_0->mList[0].h = 0;
 
                 listHolder_0->mList[1].a = 1U;
                 listHolder_0->mList[1].b = true;
-                listHolder_0->mList[1].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                listHolder_0->mList[1].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                 listHolder_0->mList[1].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19);
                 listHolder_0->mList[1].e = chip::Span<const char>("second_char_stringgarbage: not in length on purpose", 18);
-                listHolder_0->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_0->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_0->mList[1].g = 0.0f;
                 listHolder_0->mList[1].h = 0;
 
-                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(
+                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(
                     listHolder_0->mList, 2);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListStructArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListStructArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 168: {
             LogStep(168, "Send Test Command With List of Struct Argument and arg1.b of first item is false");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type value;
 
             {
-                auto * listHolder_0 = new ListHolder<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(2);
+                auto * listHolder_0 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(2);
                 listFreer.add(listHolder_0);
 
                 listHolder_0->mList[0].a = 1U;
                 listHolder_0->mList[0].b = true;
-                listHolder_0->mList[0].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                listHolder_0->mList[0].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                 listHolder_0->mList[0].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19);
                 listHolder_0->mList[0].e = chip::Span<const char>("second_char_stringgarbage: not in length on purpose", 18);
-                listHolder_0->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_0->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_0->mList[0].g = 0.0f;
                 listHolder_0->mList[0].h = 0;
 
                 listHolder_0->mList[1].a = 0U;
                 listHolder_0->mList[1].b = false;
-                listHolder_0->mList[1].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+                listHolder_0->mList[1].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
                 listHolder_0->mList[1].d =
                     chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18);
                 listHolder_0->mList[1].e = chip::Span<const char>("first_char_stringgarbage: not in length on purpose", 17);
-                listHolder_0->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_0->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_0->mList[1].g = 0.0f;
                 listHolder_0->mList[1].h = 0;
 
-                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(
+                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(
                     listHolder_0->mList, 2);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListStructArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListStructArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
@@ -52755,10 +52755,10 @@
             LogStep(169,
                     "Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type value;
 
             {
-                auto * listHolder_0 = new ListHolder<chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>(1);
+                auto * listHolder_0 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>(1);
                 listFreer.add(listHolder_0);
 
                 listHolder_0->mList[0].a = 0U;
@@ -52766,40 +52766,40 @@
 
                 listHolder_0->mList[0].c.a = 0U;
                 listHolder_0->mList[0].c.b = true;
-                listHolder_0->mList[0].c.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+                listHolder_0->mList[0].c.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
                 listHolder_0->mList[0].c.d =
                     chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
                 listHolder_0->mList[0].c.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-                listHolder_0->mList[0].c.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_0->mList[0].c.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_0->mList[0].c.g = 0.0f;
                 listHolder_0->mList[0].c.h = 0;
 
                 {
-                    auto * listHolder_2 = new ListHolder<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(2);
+                    auto * listHolder_2 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(2);
                     listFreer.add(listHolder_2);
 
                     listHolder_2->mList[0].a = 1U;
                     listHolder_2->mList[0].b = true;
-                    listHolder_2->mList[0].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                    listHolder_2->mList[0].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                     listHolder_2->mList[0].d =
                         chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                     listHolder_2->mList[0].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                    listHolder_2->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                    listHolder_2->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                     listHolder_2->mList[0].g = 0.0f;
                     listHolder_2->mList[0].h = 0;
 
                     listHolder_2->mList[1].a = 2U;
                     listHolder_2->mList[1].b = true;
-                    listHolder_2->mList[1].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                    listHolder_2->mList[1].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                     listHolder_2->mList[1].d =
                         chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                     listHolder_2->mList[1].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                    listHolder_2->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                    listHolder_2->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                     listHolder_2->mList[1].g = 0.0f;
                     listHolder_2->mList[1].h = 0;
 
                     listHolder_0->mList[0].d =
-                        chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(
+                        chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(
                             listHolder_2->mList, 2);
                 }
 
@@ -52832,21 +52832,21 @@
                     listHolder_0->mList[0].g = chip::app::DataModel::List<uint8_t>(listHolder_2->mList, 2);
                 }
 
-                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>(
+                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>(
                     listHolder_0->mList, 1);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListNestedStructListArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 170: {
             LogStep(170, "Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type value;
 
             {
-                auto * listHolder_0 = new ListHolder<chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>(1);
+                auto * listHolder_0 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>(1);
                 listFreer.add(listHolder_0);
 
                 listHolder_0->mList[0].a = 0U;
@@ -52854,40 +52854,40 @@
 
                 listHolder_0->mList[0].c.a = 0U;
                 listHolder_0->mList[0].c.b = true;
-                listHolder_0->mList[0].c.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+                listHolder_0->mList[0].c.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
                 listHolder_0->mList[0].c.d =
                     chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12);
                 listHolder_0->mList[0].c.e = chip::Span<const char>("char_stringgarbage: not in length on purpose", 11);
-                listHolder_0->mList[0].c.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                listHolder_0->mList[0].c.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                 listHolder_0->mList[0].c.g = 0.0f;
                 listHolder_0->mList[0].c.h = 0;
 
                 {
-                    auto * listHolder_2 = new ListHolder<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(2);
+                    auto * listHolder_2 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(2);
                     listFreer.add(listHolder_2);
 
                     listHolder_2->mList[0].a = 1U;
                     listHolder_2->mList[0].b = true;
-                    listHolder_2->mList[0].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                    listHolder_2->mList[0].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                     listHolder_2->mList[0].d =
                         chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                     listHolder_2->mList[0].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                    listHolder_2->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                    listHolder_2->mList[0].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                     listHolder_2->mList[0].g = 0.0f;
                     listHolder_2->mList[0].h = 0;
 
                     listHolder_2->mList[1].a = 2U;
                     listHolder_2->mList[1].b = false;
-                    listHolder_2->mList[1].c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+                    listHolder_2->mList[1].c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
                     listHolder_2->mList[1].d =
                         chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19);
                     listHolder_2->mList[1].e = chip::Span<const char>("nested_char_stringgarbage: not in length on purpose", 18);
-                    listHolder_2->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(1U);
+                    listHolder_2->mList[1].f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(1U);
                     listHolder_2->mList[1].g = 0.0f;
                     listHolder_2->mList[1].h = 0;
 
                     listHolder_0->mList[0].d =
-                        chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>(
+                        chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>(
                             listHolder_2->mList, 2);
                 }
 
@@ -52920,11 +52920,11 @@
                     listHolder_0->mList[0].g = chip::app::DataModel::List<uint8_t>(listHolder_2->mList, 2);
                 }
 
-                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>(
+                value.arg1 = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>(
                     listHolder_0->mList, 1);
             }
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestListNestedStructListArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
@@ -52942,12 +52942,12 @@
                 listHolder_0->mList[3] = 4U;
                 value                  = chip::app::DataModel::List<uint8_t>(listHolder_0->mList, 4);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 172: {
             LogStep(172, "Read attribute LIST With List of INT8U");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 173: {
@@ -52964,21 +52964,21 @@
                 listHolder_0->mList[3] = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5);
                 value                  = chip::app::DataModel::List<chip::ByteSpan>(listHolder_0->mList, 4);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 174: {
             LogStep(174, "Read attribute LIST With List of OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 175: {
             LogStep(175, "Write attribute LIST With List of LIST_STRUCT_OCTET_STRING");
             ListFreer listFreer;
-            chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type> value;
+            chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type> value;
 
             {
-                auto * listHolder_0 = new ListHolder<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type>(4);
+                auto * listHolder_0 = new ListHolder<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type>(4);
                 listFreer.add(listHolder_0);
 
                 listHolder_0->mList[0].member1 = 0ULL;
@@ -52997,52 +52997,52 @@
                 listHolder_0->mList[3].member2 =
                     chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5);
 
-                value = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type>(
+                value = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type>(
                     listHolder_0->mList, 4);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::ListStructOctetString::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::ListStructOctetString::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 176: {
             LogStep(176, "Read attribute LIST With List of LIST_STRUCT_OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::ListStructOctetString::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::ListStructOctetString::Id, true, chip::NullOptional);
         }
         case 177: {
             LogStep(177, "Send Test Command with optional arg set.");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type value;
             value.arg1.Emplace();
             value.arg1.Value().SetNonNull();
             value.arg1.Value().Value() = 5U;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional
 
             );
         }
         case 178: {
             LogStep(178, "Send Test Command without its optional arg.");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional
+            chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional
 
             );
         }
         case 179: {
             LogStep(179, "Read list of structs containing nullables and optionals");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::ListNullablesAndOptionalsStruct::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id, true, chip::NullOptional);
         }
         case 180: {
             LogStep(180, "Write list of structs containing nullables and optionals");
             ListFreer listFreer;
-            chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type> value;
+            chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type> value;
 
             {
                 auto * listHolder_0 =
-                    new ListHolder<chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type>(1);
+                    new ListHolder<chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type>(1);
                 listFreer.add(listHolder_0);
 
                 listHolder_0->mList[0].nullableInt.SetNull();
@@ -53051,37 +53051,37 @@
                 listHolder_0->mList[0].nullableList.SetNonNull();
 
                 {
-                    auto * listHolder_3 = new ListHolder<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+                    auto * listHolder_3 = new ListHolder<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
                     listFreer.add(listHolder_3);
-                    listHolder_3->mList[0] = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(1);
-                    listHolder_3->mList[1] = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+                    listHolder_3->mList[0] = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(1);
+                    listHolder_3->mList[1] = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
                     listHolder_0->mList[0].nullableList.Value() =
-                        chip::app::DataModel::List<chip::app::Clusters::TestCluster::SimpleEnum>(listHolder_3->mList, 2);
+                        chip::app::DataModel::List<chip::app::Clusters::UnitTesting::SimpleEnum>(listHolder_3->mList, 2);
                 }
 
-                value = chip::app::DataModel::List<chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type>(
+                value = chip::app::DataModel::List<chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type>(
                     listHolder_0->mList, 1);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::ListNullablesAndOptionalsStruct::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 181: {
             LogStep(181, "Read list of structs containing nullables and optionals after writing");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::ListNullablesAndOptionalsStruct::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id, true, chip::NullOptional);
         }
         case 182: {
             LogStep(182, "Write attribute NULLABLE_BOOLEAN null");
             ListFreer listFreer;
             chip::app::DataModel::Nullable<bool> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 183: {
             LogStep(183, "Read attribute NULLABLE_BOOLEAN null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 184: {
@@ -53090,186 +53090,186 @@
             chip::app::DataModel::Nullable<bool> value;
             value.SetNonNull();
             value.Value() = true;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 185: {
             LogStep(185, "Read attribute NULLABLE_BOOLEAN True");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 186: {
             LogStep(186, "Read attribute NULLABLE_BOOLEAN not null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 187: {
             LogStep(187, "Write attribute NULLABLE_BITMAP8 Max Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>(254U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>(254U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 188: {
             LogStep(188, "Read attribute NULLABLE_BITMAP8 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                  true, chip::NullOptional);
         }
         case 189: {
             LogStep(189, "Write attribute NULLABLE_BITMAP8 Invalid Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>(255U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>(255U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 190: {
             LogStep(190, "Read attribute NULLABLE_BITMAP8 unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                  true, chip::NullOptional);
         }
         case 191: {
             LogStep(191, "Write attribute NULLABLE_BITMAP8 null Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 192: {
             LogStep(192, "Read attribute NULLABLE_BITMAP8 null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                  true, chip::NullOptional);
         }
         case 193: {
             LogStep(193, "Read attribute NULLABLE_BITMAP8 not 254 Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id,
                                  true, chip::NullOptional);
         }
         case 194: {
             LogStep(194, "Write attribute NULLABLE_BITMAP16 Max Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>(65534U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>(65534U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 195: {
             LogStep(195, "Read attribute NULLABLE_BITMAP16 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id,
                                  true, chip::NullOptional);
         }
         case 196: {
             LogStep(196, "Write attribute NULLABLE_BITMAP16 Invalid Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>(65535U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>(65535U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 197: {
             LogStep(197, "Read attribute NULLABLE_BITMAP16 unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id,
                                  true, chip::NullOptional);
         }
         case 198: {
             LogStep(198, "Write attribute NULLABLE_BITMAP16 null Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 199: {
             LogStep(199, "Read attribute NULLABLE_BITMAP16 null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id,
                                  true, chip::NullOptional);
         }
         case 200: {
             LogStep(200, "Write attribute NULLABLE_BITMAP32 Max Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(4294967294UL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(4294967294UL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 201: {
             LogStep(201, "Read attribute NULLABLE_BITMAP32 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id,
                                  true, chip::NullOptional);
         }
         case 202: {
             LogStep(202, "Write attribute NULLABLE_BITMAP32 Invalid Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(4294967295UL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(4294967295UL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 203: {
             LogStep(203, "Read attribute NULLABLE_BITMAP32 unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id,
                                  true, chip::NullOptional);
         }
         case 204: {
             LogStep(204, "Write attribute NULLABLE_BITMAP32 null Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 205: {
             LogStep(205, "Read attribute NULLABLE_BITMAP32 null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id,
                                  true, chip::NullOptional);
         }
         case 206: {
             LogStep(206, "Write attribute NULLABLE_BITMAP64 Max Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>(18446744073709551614ULL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>(18446744073709551614ULL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 207: {
             LogStep(207, "Read attribute NULLABLE_BITMAP64 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id,
                                  true, chip::NullOptional);
         }
         case 208: {
             LogStep(208, "Write attribute NULLABLE_BITMAP64 Invalid Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>(18446744073709551615ULL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id,
+            value.Value() = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>(18446744073709551615ULL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 209: {
             LogStep(209, "Read attribute NULLABLE_BITMAP64 unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id,
                                  true, chip::NullOptional);
         }
         case 210: {
             LogStep(210, "Write attribute NULLABLE_BITMAP64 null Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>> value;
+            chip::app::DataModel::Nullable<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 211: {
             LogStep(211, "Read attribute NULLABLE_BITMAP64 null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id,
                                  true, chip::NullOptional);
         }
         case 212: {
@@ -53278,12 +53278,12 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 213: {
             LogStep(213, "Read attribute NULLABLE_INT8U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 214: {
@@ -53292,12 +53292,12 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 254U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 215: {
             LogStep(215, "Read attribute NULLABLE_INT8U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 216: {
@@ -53306,17 +53306,17 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 255U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 217: {
             LogStep(217, "Read attribute NULLABLE_INT8U unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 218: {
             LogStep(218, "Read attribute NULLABLE_INT8U unchanged Value with constraint");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 219: {
@@ -53324,22 +53324,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 220: {
             LogStep(220, "Read attribute NULLABLE_INT8U null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 221: {
             LogStep(221, "Read attribute NULLABLE_INT8U null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 222: {
             LogStep(222, "Read attribute NULLABLE_INT8U null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 223: {
@@ -53348,17 +53348,17 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 128U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 224: {
             LogStep(224, "Read attribute NULLABLE_INT8U Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 225: {
             LogStep(225, "Read attribute NULLABLE_INT8U notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 226: {
@@ -53367,12 +53367,12 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 227: {
             LogStep(227, "Read attribute NULLABLE_INT16U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 228: {
@@ -53381,12 +53381,12 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 65534U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 229: {
             LogStep(229, "Read attribute NULLABLE_INT16U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 230: {
@@ -53395,12 +53395,12 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 65535U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 231: {
             LogStep(231, "Read attribute NULLABLE_INT16U unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 232: {
@@ -53408,22 +53408,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 233: {
             LogStep(233, "Read attribute NULLABLE_INT16U null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 234: {
             LogStep(234, "Read attribute NULLABLE_INT16U null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 235: {
             LogStep(235, "Read attribute NULLABLE_INT16U null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 236: {
@@ -53432,17 +53432,17 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 32000U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 237: {
             LogStep(237, "Read attribute NULLABLE_INT16U Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 238: {
             LogStep(238, "Read attribute NULLABLE_INT16U notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true,
                                  chip::NullOptional);
         }
         case 239: {
@@ -53451,12 +53451,12 @@
             chip::app::DataModel::Nullable<uint32_t> value;
             value.SetNonNull();
             value.Value() = 0UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 240: {
             LogStep(240, "Read attribute NULLABLE_INT32U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 241: {
@@ -53465,12 +53465,12 @@
             chip::app::DataModel::Nullable<uint32_t> value;
             value.SetNonNull();
             value.Value() = 4294967294UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 242: {
             LogStep(242, "Read attribute NULLABLE_INT32U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 243: {
@@ -53479,12 +53479,12 @@
             chip::app::DataModel::Nullable<uint32_t> value;
             value.SetNonNull();
             value.Value() = 4294967295UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 244: {
             LogStep(244, "Read attribute NULLABLE_INT32U unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 245: {
@@ -53492,22 +53492,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint32_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 246: {
             LogStep(246, "Read attribute NULLABLE_INT32U null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 247: {
             LogStep(247, "Read attribute NULLABLE_INT32U null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 248: {
             LogStep(248, "Read attribute NULLABLE_INT32U null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 249: {
@@ -53516,17 +53516,17 @@
             chip::app::DataModel::Nullable<uint32_t> value;
             value.SetNonNull();
             value.Value() = 2147483647UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 250: {
             LogStep(250, "Read attribute NULLABLE_INT32U Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 251: {
             LogStep(251, "Read attribute NULLABLE_INT32U notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true,
                                  chip::NullOptional);
         }
         case 252: {
@@ -53535,12 +53535,12 @@
             chip::app::DataModel::Nullable<uint64_t> value;
             value.SetNonNull();
             value.Value() = 0ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 253: {
             LogStep(253, "Read attribute NULLABLE_INT64U Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 254: {
@@ -53549,12 +53549,12 @@
             chip::app::DataModel::Nullable<uint64_t> value;
             value.SetNonNull();
             value.Value() = 18446744073709551614ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 255: {
             LogStep(255, "Read attribute NULLABLE_INT64U Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 256: {
@@ -53563,12 +53563,12 @@
             chip::app::DataModel::Nullable<uint64_t> value;
             value.SetNonNull();
             value.Value() = 18446744073709551615ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 257: {
             LogStep(257, "Read attribute NULLABLE_INT64U unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 258: {
@@ -53576,22 +53576,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint64_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 259: {
             LogStep(259, "Read attribute NULLABLE_INT64U null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 260: {
             LogStep(260, "Read attribute NULLABLE_INT64U null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 261: {
             LogStep(261, "Read attribute NULLABLE_INT64U null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 262: {
@@ -53600,17 +53600,17 @@
             chip::app::DataModel::Nullable<uint64_t> value;
             value.SetNonNull();
             value.Value() = 18000000000000000000ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 263: {
             LogStep(263, "Read attribute NULLABLE_INT64U Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 264: {
             LogStep(264, "Read attribute NULLABLE_INT64U notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true,
                                  chip::NullOptional);
         }
         case 265: {
@@ -53619,12 +53619,12 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = -127;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 266: {
             LogStep(266, "Read attribute NULLABLE_INT8S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 267: {
@@ -53633,12 +53633,12 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = -128;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 268: {
             LogStep(268, "Read attribute NULLABLE_INT8S unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 269: {
@@ -53646,22 +53646,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 270: {
             LogStep(270, "Read attribute NULLABLE_INT8S null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 271: {
             LogStep(271, "Read attribute NULLABLE_INT8S null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 272: {
             LogStep(272, "Read attribute NULLABLE_INT8S null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 273: {
@@ -53670,17 +53670,17 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = -127;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 274: {
             LogStep(274, "Read attribute NULLABLE_INT8S Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 275: {
             LogStep(275, "Read attribute NULLABLE_INT8S notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true,
                                  chip::NullOptional);
         }
         case 276: {
@@ -53689,12 +53689,12 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = -32767;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 277: {
             LogStep(277, "Read attribute NULLABLE_INT16S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 278: {
@@ -53703,12 +53703,12 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = -32768;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 279: {
             LogStep(279, "Read attribute NULLABLE_INT16S unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 280: {
@@ -53716,22 +53716,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 281: {
             LogStep(281, "Read attribute NULLABLE_INT16S null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 282: {
             LogStep(282, "Read attribute NULLABLE_INT16S null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 283: {
             LogStep(283, "Read attribute NULLABLE_INT16S null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 284: {
@@ -53740,17 +53740,17 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = -32767;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 285: {
             LogStep(285, "Read attribute NULLABLE_INT16S Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 286: {
             LogStep(286, "Read attribute NULLABLE_INT16S notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true,
                                  chip::NullOptional);
         }
         case 287: {
@@ -53759,12 +53759,12 @@
             chip::app::DataModel::Nullable<int32_t> value;
             value.SetNonNull();
             value.Value() = -2147483647L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 288: {
             LogStep(288, "Read attribute NULLABLE_INT32S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 289: {
@@ -53773,12 +53773,12 @@
             chip::app::DataModel::Nullable<int32_t> value;
             value.SetNonNull();
             value.Value() = -2147483648L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 290: {
             LogStep(290, "Read attribute NULLABLE_INT32S unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 291: {
@@ -53786,22 +53786,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<int32_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 292: {
             LogStep(292, "Read attribute NULLABLE_INT32S null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 293: {
             LogStep(293, "Read attribute NULLABLE_INT32S null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 294: {
             LogStep(294, "Read attribute NULLABLE_INT32S null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 295: {
@@ -53810,17 +53810,17 @@
             chip::app::DataModel::Nullable<int32_t> value;
             value.SetNonNull();
             value.Value() = -2147483647L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 296: {
             LogStep(296, "Read attribute NULLABLE_INT32S Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 297: {
             LogStep(297, "Read attribute NULLABLE_INT32S notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true,
                                  chip::NullOptional);
         }
         case 298: {
@@ -53829,12 +53829,12 @@
             chip::app::DataModel::Nullable<int64_t> value;
             value.SetNonNull();
             value.Value() = -9223372036854775807LL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 299: {
             LogStep(299, "Read attribute NULLABLE_INT64S Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 300: {
@@ -53843,12 +53843,12 @@
             chip::app::DataModel::Nullable<int64_t> value;
             value.SetNonNull();
             value.Value() = static_cast<int64_t>(-9223372036854775807LL - 1);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 301: {
             LogStep(301, "Read attribute NULLABLE_INT64S unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 302: {
@@ -53856,22 +53856,22 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<int64_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 303: {
             LogStep(303, "Read attribute NULLABLE_INT64S null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 304: {
             LogStep(304, "Read attribute NULLABLE_INT64S null Value & range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 305: {
             LogStep(305, "Read attribute NULLABLE_INT64S null Value & not");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 306: {
@@ -53880,17 +53880,17 @@
             chip::app::DataModel::Nullable<int64_t> value;
             value.SetNonNull();
             value.Value() = -9223372036854775807LL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 307: {
             LogStep(307, "Read attribute NULLABLE_INT64S Value in range");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 308: {
             LogStep(308, "Read attribute NULLABLE_INT64S notValue OK");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true,
                                  chip::NullOptional);
         }
         case 309: {
@@ -53899,12 +53899,12 @@
             chip::app::DataModel::Nullable<float> value;
             value.SetNonNull();
             value.Value() = 0.1f;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 310: {
             LogStep(310, "Read attribute NULLABLE_SINGLE medium Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                  true, chip::NullOptional);
         }
         case 311: {
@@ -53913,12 +53913,12 @@
             chip::app::DataModel::Nullable<float> value;
             value.SetNonNull();
             value.Value() = INFINITY;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 312: {
             LogStep(312, "Read attribute NULLABLE_SINGLE largest Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                  true, chip::NullOptional);
         }
         case 313: {
@@ -53927,12 +53927,12 @@
             chip::app::DataModel::Nullable<float> value;
             value.SetNonNull();
             value.Value() = -INFINITY;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 314: {
             LogStep(314, "Read attribute NULLABLE_SINGLE smallest Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                  true, chip::NullOptional);
         }
         case 315: {
@@ -53940,12 +53940,12 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<float> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 316: {
             LogStep(316, "Read attribute NULLABLE_SINGLE null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                  true, chip::NullOptional);
         }
         case 317: {
@@ -53954,12 +53954,12 @@
             chip::app::DataModel::Nullable<float> value;
             value.SetNonNull();
             value.Value() = 0.0f;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 318: {
             LogStep(318, "Read attribute NULLABLE_SINGLE 0 Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatSingle::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id,
                                  true, chip::NullOptional);
         }
         case 319: {
@@ -53968,12 +53968,12 @@
             chip::app::DataModel::Nullable<double> value;
             value.SetNonNull();
             value.Value() = 0.1234567890123;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 320: {
             LogStep(320, "Read attribute NULLABLE_DOUBLE medium Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                  true, chip::NullOptional);
         }
         case 321: {
@@ -53982,12 +53982,12 @@
             chip::app::DataModel::Nullable<double> value;
             value.SetNonNull();
             value.Value() = INFINITY;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 322: {
             LogStep(322, "Read attribute NULLABLE_DOUBLE largest Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                  true, chip::NullOptional);
         }
         case 323: {
@@ -53996,12 +53996,12 @@
             chip::app::DataModel::Nullable<double> value;
             value.SetNonNull();
             value.Value() = -INFINITY;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 324: {
             LogStep(324, "Read attribute NULLABLE_DOUBLE smallest Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                  true, chip::NullOptional);
         }
         case 325: {
@@ -54009,12 +54009,12 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<double> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 326: {
             LogStep(326, "Read attribute NULLABLE_DOUBLE null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                  true, chip::NullOptional);
         }
         case 327: {
@@ -54023,12 +54023,12 @@
             chip::app::DataModel::Nullable<double> value;
             value.SetNonNull();
             value.Value() = 0;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 328: {
             LogStep(328, "Read attribute NULLABLE_DOUBLE 0 Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableFloatDouble::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id,
                                  true, chip::NullOptional);
         }
         case 329: {
@@ -54037,12 +54037,12 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 330: {
             LogStep(330, "Read attribute NULLABLE_ENUM8 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true,
                                  chip::NullOptional);
         }
         case 331: {
@@ -54051,12 +54051,12 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 254U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 332: {
             LogStep(332, "Read attribute NULLABLE_ENUM8 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true,
                                  chip::NullOptional);
         }
         case 333: {
@@ -54065,12 +54065,12 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 255U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 334: {
             LogStep(334, "Read attribute NULLABLE_ENUM8 unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true,
                                  chip::NullOptional);
         }
         case 335: {
@@ -54078,12 +54078,12 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 336: {
             LogStep(336, "Read attribute NULLABLE_ENUM8 null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true,
                                  chip::NullOptional);
         }
         case 337: {
@@ -54092,12 +54092,12 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 338: {
             LogStep(338, "Read attribute NULLABLE_ENUM16 Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true,
                                  chip::NullOptional);
         }
         case 339: {
@@ -54106,12 +54106,12 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 65534U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 340: {
             LogStep(340, "Read attribute NULLABLE_ENUM16 Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true,
                                  chip::NullOptional);
         }
         case 341: {
@@ -54120,12 +54120,12 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 65535U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 342: {
             LogStep(342, "Read attribute NULLABLE_ENUM16 unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true,
                                  chip::NullOptional);
         }
         case 343: {
@@ -54133,77 +54133,77 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 344: {
             LogStep(344, "Read attribute NULLABLE_ENUM16 null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true,
                                  chip::NullOptional);
         }
         case 345: {
             LogStep(345, "Write attribute NULLABLE_SIMPLE_ENUM Min Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+            chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            value.Value() = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(0);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 346: {
             LogStep(346, "Read attribute NULLABLE_SIMPLE_ENUM Min Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                  true, chip::NullOptional);
         }
         case 347: {
             LogStep(347, "Write attribute NULLABLE_SIMPLE_ENUM Max Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+            chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            value.Value() = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 348: {
             LogStep(348, "Read attribute NULLABLE_SIMPLE_ENUM Max Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                  true, chip::NullOptional);
         }
         case 349: {
             LogStep(349, "Write attribute NULLABLE_SIMPLE_ENUM Invalid Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+            chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
             value.SetNonNull();
-            value.Value() = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(255);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            value.Value() = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(255);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 350: {
             LogStep(350, "Read attribute NULLABLE_SIMPLE_ENUM unchanged Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                  true, chip::NullOptional);
         }
         case 351: {
             LogStep(351, "Write attribute NULLABLE_SIMPLE_ENUM null Value");
             ListFreer listFreer;
-            chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::SimpleEnum> value;
+            chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::SimpleEnum> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 352: {
             LogStep(352, "Read attribute NULLABLE_SIMPLE_ENUM null Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                  true, chip::NullOptional);
         }
         case 353: {
             LogStep(353, "Read attribute NULLABLE_SIMPLE_ENUM not 3 Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnumAttr::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id,
                                  true, chip::NullOptional);
         }
         case 354: {
             LogStep(354, "Read attribute NULLABLE_OCTET_STRING Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 355: {
@@ -54212,12 +54212,12 @@
             chip::app::DataModel::Nullable<chip::ByteSpan> value;
             value.SetNonNull();
             value.Value() = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 356: {
             LogStep(356, "Read attribute NULLABLE_OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 357: {
@@ -54225,12 +54225,12 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<chip::ByteSpan> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 358: {
             LogStep(358, "Read attribute NULLABLE_OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 359: {
@@ -54239,22 +54239,22 @@
             chip::app::DataModel::Nullable<chip::ByteSpan> value;
             value.SetNonNull();
             value.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 360: {
             LogStep(360, "Read attribute NULLABLE_OCTET_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 361: {
             LogStep(361, "Read attribute NULLABLE_OCTET_STRING not TestValue");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableOctetString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id,
                                  true, chip::NullOptional);
         }
         case 362: {
             LogStep(362, "Read attribute NULLABLE_CHAR_STRING Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                  true, chip::NullOptional);
         }
         case 363: {
@@ -54263,17 +54263,17 @@
             chip::app::DataModel::Nullable<chip::CharSpan> value;
             value.SetNonNull();
             value.Value() = chip::Span<const char>("☉T☉garbage: not in length on purpose", 7);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 364: {
             LogStep(364, "Read attribute NULLABLE_CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                  true, chip::NullOptional);
         }
         case 365: {
             LogStep(365, "Read attribute NULLABLE_CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                  true, chip::NullOptional);
         }
         case 366: {
@@ -54281,12 +54281,12 @@
             ListFreer listFreer;
             chip::app::DataModel::Nullable<chip::CharSpan> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 367: {
             LogStep(367, "Read attribute NULLABLE_CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                  true, chip::NullOptional);
         }
         case 368: {
@@ -54295,52 +54295,52 @@
             chip::app::DataModel::Nullable<chip::CharSpan> value;
             value.SetNonNull();
             value.Value() = chip::Span<const char>("garbage: not in length on purpose", 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 369: {
             LogStep(369, "Read attribute NULLABLE_CHAR_STRING");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                  true, chip::NullOptional);
         }
         case 370: {
             LogStep(370, "Read attribute NULLABLE_CHAR_STRING not ☉T☉");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableCharString::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id,
                                  true, chip::NullOptional);
         }
         case 371: {
             LogStep(371, "Read attribute from nonexistent endpoint.");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(200), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(200), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 372: {
             LogStep(372, "Read attribute from nonexistent cluster.");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 373: {
             LogStep(373, "Send a command that takes an optional parameter but do not set it.");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestSimpleOptionalArgumentRequest::Id, value, chip::NullOptional
+            chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 374: {
             LogStep(374, "Send a command that takes an optional parameter but do not set it.");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type value;
             value.arg1.Emplace();
             value.arg1.Value() = 1;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestSimpleOptionalArgumentRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id, value, chip::NullOptional
 
             );
         }
         case 375: {
             LogStep(375, "Subscribe to list attribute");
-            return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, 2, 5,
+            return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, 2, 5,
                                       true, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional);
         }
         case 376: {
@@ -54357,7 +54357,7 @@
                 listHolder_0->mList[3] = 8U;
                 value                  = chip::app::DataModel::List<uint8_t>(listHolder_0->mList, 4);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 377: {
@@ -54366,7 +54366,7 @@
         }
         case 378: {
             LogStep(378, "Read range-restricted unsigned 8-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id,
                                  true, chip::NullOptional);
         }
         case 379: {
@@ -54374,36 +54374,36 @@
             ListFreer listFreer;
             uint8_t value;
             value = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 380: {
             LogStep(380, "Write just-below-range value to a range-restricted unsigned 8-bit integer");
             ListFreer listFreer;
             uint8_t value;
             value = 19U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 381: {
             LogStep(381, "Write just-above-range value to a range-restricted unsigned 8-bit integer");
             ListFreer listFreer;
             uint8_t value;
             value = 101U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 382: {
             LogStep(382, "Write max value to a range-restricted unsigned 8-bit integer");
             ListFreer listFreer;
             uint8_t value;
             value = 255U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 383: {
             LogStep(383, "Verify range-restricted unsigned 8-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id,
                                  true, chip::NullOptional);
         }
         case 384: {
@@ -54411,12 +54411,12 @@
             ListFreer listFreer;
             uint8_t value;
             value = 20U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 385: {
             LogStep(385, "Verify range-restricted unsigned 8-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id,
                                  true, chip::NullOptional);
         }
         case 386: {
@@ -54424,12 +54424,12 @@
             ListFreer listFreer;
             uint8_t value;
             value = 100U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 387: {
             LogStep(387, "Verify range-restricted unsigned 8-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id,
                                  true, chip::NullOptional);
         }
         case 388: {
@@ -54437,26 +54437,26 @@
             ListFreer listFreer;
             uint8_t value;
             value = 50U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 389: {
             LogStep(389, "Verify range-restricted unsigned 8-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id,
                                  true, chip::NullOptional);
         }
         case 390: {
             LogStep(390, "Read range-restricted unsigned 16-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 391: {
             LogStep(391, "Write min value to a range-restricted unsigned 16-bit integer");
             ListFreer listFreer;
             uint16_t value;
             value = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 392: {
@@ -54464,8 +54464,8 @@
             ListFreer listFreer;
             uint16_t value;
             value = 99U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 393: {
@@ -54473,8 +54473,8 @@
             ListFreer listFreer;
             uint16_t value;
             value = 1001U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 394: {
@@ -54482,60 +54482,60 @@
             ListFreer listFreer;
             uint16_t value;
             value = 65535U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 395: {
             LogStep(395, "Verify range-restricted unsigned 16-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 396: {
             LogStep(396, "Write min valid value to a range-restricted unsigned 16-bit integer");
             ListFreer listFreer;
             uint16_t value;
             value = 100U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 397: {
             LogStep(397, "Verify range-restricted unsigned 16-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 398: {
             LogStep(398, "Write max valid value to a range-restricted unsigned 16-bit integer");
             ListFreer listFreer;
             uint16_t value;
             value = 1000U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 399: {
             LogStep(399, "Verify range-restricted unsigned 16-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 400: {
             LogStep(400, "Write middle valid value to a range-restricted unsigned 16-bit integer");
             ListFreer listFreer;
             uint16_t value;
             value = 500U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 401: {
             LogStep(401, "Verify range-restricted unsigned 16-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 402: {
             LogStep(402, "Read range-restricted signed 8-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8s::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id,
                                  true, chip::NullOptional);
         }
         case 403: {
@@ -54543,36 +54543,36 @@
             ListFreer listFreer;
             int8_t value;
             value = -128;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 404: {
             LogStep(404, "Write just-below-range value to a range-restricted signed 8-bit integer");
             ListFreer listFreer;
             int8_t value;
             value = -41;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 405: {
             LogStep(405, "Write just-above-range value to a range-restricted signed 8-bit integer");
             ListFreer listFreer;
             int8_t value;
             value = 51;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 406: {
             LogStep(406, "Write max value to a range-restricted signed 8-bit integer");
             ListFreer listFreer;
             int8_t value;
             value = 127;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 407: {
             LogStep(407, "Verify range-restricted signed 8-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8s::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id,
                                  true, chip::NullOptional);
         }
         case 408: {
@@ -54580,12 +54580,12 @@
             ListFreer listFreer;
             int8_t value;
             value = -40;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 409: {
             LogStep(409, "Verify range-restricted signed 8-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8s::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id,
                                  true, chip::NullOptional);
         }
         case 410: {
@@ -54593,12 +54593,12 @@
             ListFreer listFreer;
             int8_t value;
             value = 50;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 411: {
             LogStep(411, "Verify range-restricted signed 8-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8s::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id,
                                  true, chip::NullOptional);
         }
         case 412: {
@@ -54606,26 +54606,26 @@
             ListFreer listFreer;
             int8_t value;
             value = 6;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional);
         }
         case 413: {
             LogStep(413, "Verify range-restricted signed 8-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8s::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id,
                                  true, chip::NullOptional);
         }
         case 414: {
             LogStep(414, "Read range-restricted signed 16-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 415: {
             LogStep(415, "Write min value to a range-restricted signed 16-bit integer");
             ListFreer listFreer;
             int16_t value;
             value = -32768;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 416: {
@@ -54633,8 +54633,8 @@
             ListFreer listFreer;
             int16_t value;
             value = -151;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 417: {
@@ -54642,8 +54642,8 @@
             ListFreer listFreer;
             int16_t value;
             value = 201;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 418: {
@@ -54651,61 +54651,61 @@
             ListFreer listFreer;
             int16_t value;
             value = 32767;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 419: {
             LogStep(419, "Verify range-restricted signed 16-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 420: {
             LogStep(420, "Write min valid value to a range-restricted signed 16-bit integer");
             ListFreer listFreer;
             int16_t value;
             value = -150;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 421: {
             LogStep(421, "Verify range-restricted signed 16-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 422: {
             LogStep(422, "Write max valid value to a range-restricted signed 16-bit integer");
             ListFreer listFreer;
             int16_t value;
             value = 200;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 423: {
             LogStep(423, "Verify range-restricted signed 16-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 424: {
             LogStep(424, "Write middle valid value to a range-restricted signed 16-bit integer");
             ListFreer listFreer;
             int16_t value;
             value = 7;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 425: {
             LogStep(425, "Verify range-restricted signed 16-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 426: {
             LogStep(426, "Read nullable range-restricted unsigned 8-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
         }
         case 427: {
             LogStep(427, "Write min value to a nullable range-restricted unsigned 8-bit integer");
@@ -54713,8 +54713,8 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 428: {
@@ -54723,8 +54723,8 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 19U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 429: {
@@ -54733,8 +54733,8 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 101U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 430: {
@@ -54743,14 +54743,14 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 254U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 431: {
             LogStep(431, "Verify nullable range-restricted unsigned 8-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
         }
         case 432: {
             LogStep(432, "Write min valid value to a nullable range-restricted unsigned 8-bit integer");
@@ -54758,14 +54758,14 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 20U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 433: {
             LogStep(433, "Verify nullable range-restricted unsigned 8-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
         }
         case 434: {
             LogStep(434, "Write max valid value to a nullable range-restricted unsigned 8-bit integer");
@@ -54773,14 +54773,14 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 100U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 435: {
             LogStep(435, "Verify nullable range-restricted unsigned 8-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
         }
         case 436: {
             LogStep(436, "Write middle valid value to a nullable range-restricted unsigned 8-bit integer");
@@ -54788,33 +54788,33 @@
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNonNull();
             value.Value() = 50U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 437: {
             LogStep(437, "Verify nullable range-restricted unsigned 8-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
         }
         case 438: {
             LogStep(438, "Write null value to a nullable range-restricted unsigned 8-bit integer");
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint8_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 439: {
             LogStep(439, "Verify nullable range-restricted unsigned 8-bit integer value is null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional);
         }
         case 440: {
             LogStep(440, "Read nullable range-restricted unsigned 16-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 441: {
             LogStep(441, "Write min value to a nullable range-restricted unsigned 16-bit integer");
@@ -54822,8 +54822,8 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 0U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 442: {
@@ -54832,8 +54832,8 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 99U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 443: {
@@ -54842,8 +54842,8 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 1001U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 444: {
@@ -54852,14 +54852,14 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 65534U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 445: {
             LogStep(445, "Verify nullable range-restricted unsigned 16-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 446: {
             LogStep(446, "Write min valid value to a nullable range-restricted unsigned 16-bit integer");
@@ -54867,14 +54867,14 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 100U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 447: {
             LogStep(447, "Verify nullable range-restricted unsigned 16-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 448: {
             LogStep(448, "Write max valid value to a nullable range-restricted unsigned 16-bit integer");
@@ -54882,14 +54882,14 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 1000U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 449: {
             LogStep(449, "Verify nullable range-restricted unsigned 16-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 450: {
             LogStep(450, "Write middle valid value to a nullable range-restricted unsigned 16-bit integer");
@@ -54897,33 +54897,33 @@
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNonNull();
             value.Value() = 500U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 451: {
             LogStep(451, "Verify nullable range-restricted unsigned 16-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 452: {
             LogStep(452, "Write null value to a nullable range-restricted unsigned 16-bit integer");
             ListFreer listFreer;
             chip::app::DataModel::Nullable<uint16_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 453: {
             LogStep(453, "Verify nullable range-restricted unsigned 16-bit integer value is null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional);
         }
         case 454: {
             LogStep(454, "Read nullable range-restricted signed 8-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
         }
         case 455: {
             LogStep(455, "Write min value to a nullable range-restricted signed 8-bit integer");
@@ -54931,8 +54931,8 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = -127;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 456: {
@@ -54941,8 +54941,8 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = -41;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 457: {
@@ -54951,8 +54951,8 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = 51;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 458: {
@@ -54961,14 +54961,14 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = 127;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 459: {
             LogStep(459, "Verify nullable range-restricted signed 8-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
         }
         case 460: {
             LogStep(460, "Write min valid value to a nullable range-restricted signed 8-bit integer");
@@ -54976,14 +54976,14 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = -40;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 461: {
             LogStep(461, "Verify nullable range-restricted signed 8-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
         }
         case 462: {
             LogStep(462, "Write max valid value to a nullable range-restricted signed 8-bit integer");
@@ -54991,14 +54991,14 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = 50;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 463: {
             LogStep(463, "Verify nullable range-restricted signed 8-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
         }
         case 464: {
             LogStep(464, "Write middle valid value to a nullable range-restricted signed 8-bit integer");
@@ -55006,33 +55006,33 @@
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNonNull();
             value.Value() = 6;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 465: {
             LogStep(465, "Verify nullable range-restricted signed 8-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
         }
         case 466: {
             LogStep(466, "Write null value to a nullable range-restricted signed 8-bit integer");
             ListFreer listFreer;
             chip::app::DataModel::Nullable<int8_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 467: {
             LogStep(467, "Verify nullable range-restricted signed 8-bit integer value is at null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional);
         }
         case 468: {
             LogStep(468, "Read nullable range-restricted signed 16-bit integer");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 469: {
             LogStep(469, "Write min value to a nullable range-restricted signed 16-bit integer");
@@ -55040,8 +55040,8 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = -32767;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 470: {
@@ -55050,8 +55050,8 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = -151;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 471: {
@@ -55060,8 +55060,8 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = 201;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 472: {
@@ -55070,14 +55070,14 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = 32767;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 473: {
             LogStep(473, "Verify nullable range-restricted signed 16-bit integer value has not changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 474: {
             LogStep(474, "Write min valid value to a nullable range-restricted signed 16-bit integer");
@@ -55085,14 +55085,14 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = -150;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 475: {
             LogStep(475, "Verify nullable range-restricted signed 16-bit integer value is at min valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 476: {
             LogStep(476, "Write max valid value to a nullable range-restricted signed 16-bit integer");
@@ -55100,14 +55100,14 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = 200;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 477: {
             LogStep(477, "Verify nullable range-restricted signed 16-bit integer value is at max valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 478: {
             LogStep(478, "Write middle valid value to a nullable range-restricted signed 16-bit integer");
@@ -55115,35 +55115,35 @@
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNonNull();
             value.Value() = 7;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 479: {
             LogStep(479, "Verify nullable range-restricted signed 16-bit integer value is at mid valid");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 480: {
             LogStep(480, "Write null value to a nullable range-restricted signed 16-bit integer");
             ListFreer listFreer;
             chip::app::DataModel::Nullable<int16_t> value;
             value.SetNull();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                  TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                  UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional,
                                   chip::NullOptional);
         }
         case 481: {
             LogStep(481, "Verify nullable range-restricted signed 16-bit integer value is null");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                 TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                 UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional);
         }
         case 482: {
             LogStep(482, "Write attribute that returns general status on write");
             ListFreer listFreer;
             bool value;
             value = false;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::GeneralErrorBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::GeneralErrorBoolean::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 483: {
@@ -55151,49 +55151,49 @@
             ListFreer listFreer;
             bool value;
             value = false;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ClusterErrorBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ClusterErrorBoolean::Id,
                                   value, chip::NullOptional, chip::NullOptional);
         }
         case 484: {
             LogStep(484, "Read attribute that returns general status on read");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::GeneralErrorBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::GeneralErrorBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 485: {
             LogStep(485, "read attribute that returns cluster-specific status on read");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ClusterErrorBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ClusterErrorBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 486: {
             LogStep(486, "read AcceptedCommandList attribute");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::AcceptedCommandList::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::AcceptedCommandList::Id,
                                  true, chip::NullOptional);
         }
         case 487: {
             LogStep(487, "read GeneratedCommandList attribute");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::GeneratedCommandList::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::GeneratedCommandList::Id,
                                  true, chip::NullOptional);
         }
         case 488: {
             LogStep(488, "Write struct-typed attribute");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type value;
+            chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type value;
 
             value.a = 5U;
             value.b = true;
-            value.c = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.c = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.d = chip::ByteSpan(chip::Uint8::from_const_char("abcgarbage: not in length on purpose"), 3);
             value.e = chip::Span<const char>("garbage: not in length on purpose", 0);
-            value.f = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::SimpleBitmap>>(17U);
+            value.f = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::SimpleBitmap>>(17U);
             value.g = 1.5f;
             value.h = 3.14159265358979;
 
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::StructAttr::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::StructAttr::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 489: {
             LogStep(489, "Read struct-typed attribute");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::StructAttr::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::StructAttr::Id, true,
                                  chip::NullOptional);
         }
         }
@@ -55245,7 +55245,7 @@
         case 1:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("wasPresent", value.wasPresent, true));
                 VerifyOrReturn(CheckValuePresent("wasNull", value.wasNull));
@@ -55371,19 +55371,19 @@
         case 1: {
             LogStep(1, "Send Test Command with optional arg set to null.");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type value;
             value.arg1.Emplace();
             value.arg1.Value().SetNull();
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                               TestCluster::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                               UnitTesting::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional
 
             );
         }
         case 2: {
             LogStep(2, "Send command that needs timed invoke without a timeout value");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TimedInvokeRequest::Id,
+            chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TimedInvokeRequest::Id,
                                value, chip::NullOptional, chip::NullOptional
 
             );
@@ -55391,8 +55391,8 @@
         case 3: {
             LogStep(3, "Send command that needs timed invoke with a long timeout value");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TimedInvokeRequest::Id,
+            chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TimedInvokeRequest::Id,
                                value, chip::Optional<uint16_t>(10000), chip::NullOptional
 
             );
@@ -55400,9 +55400,9 @@
         case 4: {
             LogStep(4, "Send command that needs timed invoke with a too-short timeout value");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type value;
-            ReturnErrorOnFailure(SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                             TestCluster::Commands::TimedInvokeRequest::Id, value, chip::Optional<uint16_t>(1),
+            chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type value;
+            ReturnErrorOnFailure(SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                             UnitTesting::Commands::TimedInvokeRequest::Id, value, chip::Optional<uint16_t>(1),
                                              chip::NullOptional
 
                                              ));
@@ -55413,8 +55413,8 @@
         case 5: {
             LogStep(5, "Send command that does not need timed invoke with a long timeout value");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::Test::Type value;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::Test::Id, value,
+            chip::app::Clusters::UnitTesting::Commands::Test::Type value;
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::Test::Id, value,
                                chip::Optional<uint16_t>(10000), chip::NullOptional
 
             );
@@ -55422,8 +55422,8 @@
         case 6: {
             LogStep(6, "Send command that does not need timed invoke with a too-short timeout value");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::Test::Type value;
-            ReturnErrorOnFailure(SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::Test::Id,
+            chip::app::Clusters::UnitTesting::Commands::Test::Type value;
+            ReturnErrorOnFailure(SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::Test::Id,
                                              value, chip::Optional<uint16_t>(1), chip::NullOptional
 
                                              ));
@@ -55433,7 +55433,7 @@
         }
         case 7: {
             LogStep(7, "Read attribute that needs timed write initial state");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 8: {
@@ -55441,12 +55441,12 @@
             ListFreer listFreer;
             bool value;
             value = true;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                   value, chip::NullOptional, chip::NullOptional, chip::NullOptional);
         }
         case 9: {
             LogStep(9, "Read attribute that needs timed write state unchanged 1");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 10: {
@@ -55454,8 +55454,8 @@
             ListFreer listFreer;
             bool value;
             value = true;
-            ReturnErrorOnFailure(WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                                TestCluster::Attributes::TimedWriteBoolean::Id, value, chip::Optional<uint16_t>(1),
+            ReturnErrorOnFailure(WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                                UnitTesting::Attributes::TimedWriteBoolean::Id, value, chip::Optional<uint16_t>(1),
                                                 chip::NullOptional, chip::NullOptional));
 
             using namespace chip::System::Clock::Literals;
@@ -55463,7 +55463,7 @@
         }
         case 11: {
             LogStep(11, "Read attribute that needs timed write state unchanged 2");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 12: {
@@ -55471,12 +55471,12 @@
             ListFreer listFreer;
             bool value;
             value = true;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                   value, chip::Optional<uint16_t>(10000), chip::NullOptional, chip::NullOptional);
         }
         case 13: {
             LogStep(13, "Read attribute that needs timed write state changed");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                  true, chip::NullOptional);
         }
         case 14: {
@@ -55484,12 +55484,12 @@
             ListFreer listFreer;
             bool value;
             value = false;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::TimedWriteBoolean::Id,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id,
                                   value, chip::Optional<uint16_t>(10000), chip::NullOptional, chip::NullOptional);
         }
         case 15: {
             LogStep(15, "Read attribute that does not need timed write initial value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 16: {
@@ -55497,8 +55497,8 @@
             ListFreer listFreer;
             bool value;
             value = true;
-            ReturnErrorOnFailure(WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id,
-                                                TestCluster::Attributes::Boolean::Id, value, chip::Optional<uint16_t>(1),
+            ReturnErrorOnFailure(WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id,
+                                                UnitTesting::Attributes::Boolean::Id, value, chip::Optional<uint16_t>(1),
                                                 chip::NullOptional, chip::NullOptional));
 
             using namespace chip::System::Clock::Literals;
@@ -55506,7 +55506,7 @@
         }
         case 17: {
             LogStep(17, "Read attribute that does not need timed write unchanged value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 18: {
@@ -55514,12 +55514,12 @@
             ListFreer listFreer;
             bool value;
             value = true;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value,
                                   chip::Optional<uint16_t>(10000), chip::NullOptional, chip::NullOptional);
         }
         case 19: {
             LogStep(19, "Read attribute that does not need timed write changed value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 20: {
@@ -55527,7 +55527,7 @@
             ListFreer listFreer;
             bool value;
             value = false;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         }
@@ -55603,7 +55603,7 @@
         case 5:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 0UL));
             }
@@ -55614,7 +55614,7 @@
         case 7:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 5UL));
                 VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL));
@@ -55623,7 +55623,7 @@
         case 8:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 5UL));
                 VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL));
@@ -55632,7 +55632,7 @@
         case 9:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 5UL));
                 VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL));
@@ -55641,7 +55641,7 @@
         case 10:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 5UL));
                 VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL));
@@ -55810,17 +55810,17 @@
                 listHolder_0->mList[3] = 4U;
                 value                  = chip::app::DataModel::List<uint8_t>(listHolder_0->mList, 4);
             }
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 2: {
             LogStep(2, "Read attribute LIST With Partial List of INT8U that should be in it");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 3: {
             LogStep(3, "Read attribute LIST With Partial List of INT8U that should not be included");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true,
                                  chip::NullOptional);
         }
         case 4: {
@@ -55829,40 +55829,40 @@
             chip::app::DataModel::List<const uint8_t> value;
 
             value = chip::app::DataModel::List<uint8_t>();
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 5: {
             LogStep(5, "Read attribute BITMAP32 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 6: {
             LogStep(6, "Write attribute BITMAP32 with MaskVal1 and MaskVal3");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(5UL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(5UL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 7: {
             LogStep(7, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal2 is not set");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 8: {
             LogStep(8, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal1 is set");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 9: {
             LogStep(9, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal3 is set");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 10: {
             LogStep(10, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure Maskval1 and MaskVal3 are set");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 11: {
@@ -55870,22 +55870,22 @@
             ListFreer listFreer;
             uint32_t value;
             value = 5UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 12: {
             LogStep(12, "Read attribute INT32U Value MinValue Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 13: {
             LogStep(13, "Read attribute INT32U Value MaxValue Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 14: {
             LogStep(14, "Read attribute INT32U Value NotValue Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 15: {
@@ -55893,7 +55893,7 @@
             ListFreer listFreer;
             uint32_t value;
             value = 0UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 16: {
@@ -55901,27 +55901,27 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("** Test **garbage: not in length on purpose", 10);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 17: {
             LogStep(17, "Read attribute CHAR_STRING Value MinLength Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 18: {
             LogStep(18, "Read attribute CHAR_STRING Value MaxLength Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 19: {
             LogStep(19, "Read attribute CHAR_STRING Value StartsWith Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 20: {
             LogStep(20, "Read attribute CHAR_STRING Value EndsWith Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 21: {
@@ -55929,12 +55929,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("lowercasegarbage: not in length on purpose", 9);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 22: {
             LogStep(22, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 23: {
@@ -55942,12 +55942,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("UPPERCASEgarbage: not in length on purpose", 9);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 24: {
             LogStep(24, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 25: {
@@ -55955,12 +55955,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("lowUPPERgarbage: not in length on purpose", 8);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 26: {
             LogStep(26, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 27: {
@@ -55968,12 +55968,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("ABCDEF012Vgarbage: not in length on purpose", 10);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 28: {
             LogStep(28, "Read attribute CHAR_STRING Value isHexString Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 29: {
@@ -55981,12 +55981,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("ABCDEF0123garbage: not in length on purpose", 10);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 30: {
             LogStep(30, "Read attribute CHAR_STRING Value isHexString Constraints");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 31: {
@@ -55994,7 +55994,7 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("garbage: not in length on purpose", 0);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         }
@@ -56141,7 +56141,7 @@
         case 3:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 eventNumber = value.value;
             }
@@ -56152,7 +56152,7 @@
             case 0:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U));
@@ -56171,7 +56171,7 @@
             case 0:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U));
@@ -56195,7 +56195,7 @@
         case 7:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, static_cast<uint64_t>(eventNumber + 1)));
             }
@@ -56206,7 +56206,7 @@
             case 0:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U));
@@ -56217,7 +56217,7 @@
             case 1:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 4U));
@@ -56236,7 +56236,7 @@
             case 0:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U));
@@ -56247,7 +56247,7 @@
             case 1:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 4U));
@@ -56263,7 +56263,7 @@
         case 10:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("value", value.value, static_cast<uint64_t>(eventNumber + 2)));
             }
@@ -56274,7 +56274,7 @@
             case 0:
                 VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
                 {
-                    chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value;
+                    chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value;
                     VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                     VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 4U));
                     VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 3U));
@@ -56313,23 +56313,23 @@
         case 1: {
             LogStep(1, "Check there is no event on the target endpoint");
             mTestSubStepCount = 0;
-            return ReadEvent(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Events::TestEvent::Id, false,
+            return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false,
                              chip::NullOptional);
         }
         case 2: {
             LogStep(2, "Check reading events from an invalid endpoint");
             mTestSubStepCount = 0;
-            return ReadEvent(kIdentityAlpha, GetEndpoint(0), TestCluster::Id, TestCluster::Events::TestEvent::Id, false,
+            return ReadEvent(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false,
                              chip::NullOptional);
         }
         case 3: {
             LogStep(3, "Generate an event on the accessory");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type value;
             value.arg1 = 1U;
-            value.arg2 = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(2);
+            value.arg2 = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(2);
             value.arg3 = true;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEmitTestEventRequest::Id,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEmitTestEventRequest::Id,
                                value, chip::NullOptional
 
             );
@@ -56337,29 +56337,29 @@
         case 4: {
             LogStep(4, "Read the event back");
             mTestSubStepCount = 1;
-            return ReadEvent(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Events::TestEvent::Id, false,
+            return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false,
                              chip::NullOptional);
         }
         case 5: {
             LogStep(5, "Read the event with eventNumber set to the event value");
             mTestSubStepCount = 1;
-            return ReadEvent(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Events::TestEvent::Id, false,
+            return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false,
                              chip::Optional<chip::EventNumber>(eventNumber));
         }
         case 6: {
             LogStep(6, "Read the event with eventNumber set to the event value + 1");
             mTestSubStepCount = 0;
-            return ReadEvent(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Events::TestEvent::Id, false,
+            return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false,
                              chip::Optional<chip::EventNumber>(eventNumber + 1));
         }
         case 7: {
             LogStep(7, "Generate a second event on the accessory");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type value;
             value.arg1 = 3U;
-            value.arg2 = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(4);
+            value.arg2 = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(4);
             value.arg3 = false;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEmitTestEventRequest::Id,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEmitTestEventRequest::Id,
                                value, chip::NullOptional
 
             );
@@ -56367,23 +56367,23 @@
         case 8: {
             LogStep(8, "Read the event back");
             mTestSubStepCount = 2;
-            return ReadEvent(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Events::TestEvent::Id, false,
+            return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false,
                              chip::NullOptional);
         }
         case 9: {
             LogStep(9, "Subscribe to the event");
             mTestSubStepCount = 2;
-            return SubscribeEvent(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Events::TestEvent::Id, 3, 5, false,
+            return SubscribeEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, 3, 5, false,
                                   chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional);
         }
         case 10: {
             LogStep(10, "Generate a third event on the accessory");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type value;
             value.arg1 = 4U;
-            value.arg2 = static_cast<chip::app::Clusters::TestCluster::SimpleEnum>(3);
+            value.arg2 = static_cast<chip::app::Clusters::UnitTesting::SimpleEnum>(3);
             value.arg3 = true;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEmitTestEventRequest::Id,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEmitTestEventRequest::Id,
                                value, chip::NullOptional
 
             );
@@ -57022,10 +57022,10 @@
 
     uint8_t TestAddArgumentDefaultValue;
     bool readAttributeBooleanDefaultValue;
-    chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> readAttributeBitmap8DefaultValue;
-    chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> readAttributeBitmap16DefaultValue;
-    chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> readAttributeBitmap32DefaultValue;
-    chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> readAttributeBitmap64DefaultValue;
+    chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> readAttributeBitmap8DefaultValue;
+    chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> readAttributeBitmap16DefaultValue;
+    chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> readAttributeBitmap32DefaultValue;
+    chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> readAttributeBitmap64DefaultValue;
     uint8_t readAttributeInt8uDefaultValue;
     uint16_t readAttributeInt16uDefaultValue;
     uint32_t readAttributeInt32uDefaultValue;
@@ -57067,7 +57067,7 @@
         case 1:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U));
                 TestAddArgumentDefaultValue = value.returnValue;
@@ -57076,7 +57076,7 @@
         case 2:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("returnValue", value.returnValue, TestAddArgumentDefaultValue));
             }
@@ -57084,7 +57084,7 @@
         case 3:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value.returnValue", value.returnValue, TestAddArgumentDefaultValue));
             }
@@ -57123,7 +57123,7 @@
         case 9:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap8", value, 0U));
                 readAttributeBitmap8DefaultValue = value;
@@ -57135,7 +57135,7 @@
         case 11:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap8DefaultValue));
             }
@@ -57146,7 +57146,7 @@
         case 13:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap8", value, readAttributeBitmap8DefaultValue));
             }
@@ -57154,7 +57154,7 @@
         case 14:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap16", value, 0U));
                 readAttributeBitmap16DefaultValue = value;
@@ -57166,7 +57166,7 @@
         case 16:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap16DefaultValue));
             }
@@ -57177,7 +57177,7 @@
         case 18:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap16", value, readAttributeBitmap16DefaultValue));
             }
@@ -57185,7 +57185,7 @@
         case 19:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, 0UL));
                 readAttributeBitmap32DefaultValue = value;
@@ -57197,7 +57197,7 @@
         case 21:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap32DefaultValue));
             }
@@ -57208,7 +57208,7 @@
         case 23:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap32", value, readAttributeBitmap32DefaultValue));
             }
@@ -57216,7 +57216,7 @@
         case 24:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap64", value, 0ULL));
                 readAttributeBitmap64DefaultValue = value;
@@ -57228,7 +57228,7 @@
         case 26:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap64DefaultValue));
             }
@@ -57239,7 +57239,7 @@
         case 28:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+                chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("bitmap64", value, readAttributeBitmap64DefaultValue));
             }
@@ -57805,10 +57805,10 @@
         case 1: {
             LogStep(1, "Send Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = 3U;
             value.arg2 = 17U;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
@@ -57816,10 +57816,10 @@
         case 2: {
             LogStep(2, "Send Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = 3U;
             value.arg2 = 17U;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
@@ -57827,17 +57827,17 @@
         case 3: {
             LogStep(3, "Send Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = 3U;
             value.arg2 = TestAddArgumentDefaultValue;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
         }
         case 4: {
             LogStep(4, "Read attribute BOOLEAN Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 5: {
@@ -57845,12 +57845,12 @@
             ListFreer listFreer;
             bool value;
             value = 1;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 6: {
             LogStep(6, "Read attribute BOOLEAN Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 7: {
@@ -57858,141 +57858,141 @@
             ListFreer listFreer;
             bool value;
             value = readAttributeBooleanDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 8: {
             LogStep(8, "Read attribute BOOLEAN False");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Boolean::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true,
                                  chip::NullOptional);
         }
         case 9: {
             LogStep(9, "Read attribute BITMAP8 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true,
                                  chip::NullOptional);
         }
         case 10: {
             LogStep(10, "Write attribute BITMAP8 Not Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap>>(1U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap>>(1U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 11: {
             LogStep(11, "Read attribute BITMAP8 Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true,
                                  chip::NullOptional);
         }
         case 12: {
             LogStep(12, "Write attribute BITMAP8 Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap8MaskMap> value;
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap8MaskMap> value;
             value = readAttributeBitmap8DefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 13: {
             LogStep(13, "Read attribute BITMAP8 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true,
                                  chip::NullOptional);
         }
         case 14: {
             LogStep(14, "Read attribute BITMAP16 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true,
                                  chip::NullOptional);
         }
         case 15: {
             LogStep(15, "Write attribute BITMAP16 Not Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap>>(1U);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap>>(1U);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 16: {
             LogStep(16, "Read attribute BITMAP16 Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true,
                                  chip::NullOptional);
         }
         case 17: {
             LogStep(17, "Write attribute BITMAP16 Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap16MaskMap> value;
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap16MaskMap> value;
             value = readAttributeBitmap16DefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 18: {
             LogStep(18, "Read attribute BITMAP16 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true,
                                  chip::NullOptional);
         }
         case 19: {
             LogStep(19, "Read attribute BITMAP32 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 20: {
             LogStep(20, "Write attribute BITMAP32 Not Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap>>(1UL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap>>(1UL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 21: {
             LogStep(21, "Read attribute BITMAP32 Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 22: {
             LogStep(22, "Write attribute BITMAP32 Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap32MaskMap> value;
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap32MaskMap> value;
             value = readAttributeBitmap32DefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 23: {
             LogStep(23, "Read attribute BITMAP32 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true,
                                  chip::NullOptional);
         }
         case 24: {
             LogStep(24, "Read attribute BITMAP64 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true,
                                  chip::NullOptional);
         }
         case 25: {
             LogStep(25, "Write attribute BITMAP64 Not Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
-            value = static_cast<chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap>>(1ULL);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value,
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
+            value = static_cast<chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap>>(1ULL);
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 26: {
             LogStep(26, "Read attribute BITMAP64 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true,
                                  chip::NullOptional);
         }
         case 27: {
             LogStep(27, "Write attribute BITMAP64 Default Value");
             ListFreer listFreer;
-            chip::BitMask<chip::app::Clusters::TestCluster::Bitmap64MaskMap> value;
+            chip::BitMask<chip::app::Clusters::UnitTesting::Bitmap64MaskMap> value;
             value = readAttributeBitmap64DefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 28: {
             LogStep(28, "Read attribute BITMAP64 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true,
                                  chip::NullOptional);
         }
         case 29: {
             LogStep(29, "Read attribute INT8U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true,
                                  chip::NullOptional);
         }
         case 30: {
@@ -58000,12 +58000,12 @@
             ListFreer listFreer;
             uint8_t value;
             value = 1U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 31: {
             LogStep(31, "Read attribute INT8U Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true,
                                  chip::NullOptional);
         }
         case 32: {
@@ -58013,17 +58013,17 @@
             ListFreer listFreer;
             uint8_t value;
             value = readAttributeInt8uDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 33: {
             LogStep(33, "Read attribute INT8U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true,
                                  chip::NullOptional);
         }
         case 34: {
             LogStep(34, "Read attribute INT16U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true,
                                  chip::NullOptional);
         }
         case 35: {
@@ -58031,12 +58031,12 @@
             ListFreer listFreer;
             uint16_t value;
             value = 1U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 36: {
             LogStep(36, "Read attribute INT16U Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true,
                                  chip::NullOptional);
         }
         case 37: {
@@ -58044,17 +58044,17 @@
             ListFreer listFreer;
             uint16_t value;
             value = readAttributeInt16uDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 38: {
             LogStep(38, "Read attribute INT16U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true,
                                  chip::NullOptional);
         }
         case 39: {
             LogStep(39, "Read attribute INT32U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 40: {
@@ -58062,12 +58062,12 @@
             ListFreer listFreer;
             uint32_t value;
             value = 1UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 41: {
             LogStep(41, "Read attribute INT32U Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 42: {
@@ -58075,17 +58075,17 @@
             ListFreer listFreer;
             uint32_t value;
             value = readAttributeInt32uDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 43: {
             LogStep(43, "Read attribute INT32U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true,
                                  chip::NullOptional);
         }
         case 44: {
             LogStep(44, "Read attribute INT64U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true,
                                  chip::NullOptional);
         }
         case 45: {
@@ -58093,12 +58093,12 @@
             ListFreer listFreer;
             uint64_t value;
             value = 1ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 46: {
             LogStep(46, "Read attribute INT64U Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true,
                                  chip::NullOptional);
         }
         case 47: {
@@ -58106,17 +58106,17 @@
             ListFreer listFreer;
             uint64_t value;
             value = readAttributeInt64uDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 48: {
             LogStep(48, "Read attribute INT64U Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64u::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true,
                                  chip::NullOptional);
         }
         case 49: {
             LogStep(49, "Read attribute INT8S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 50: {
@@ -58124,12 +58124,12 @@
             ListFreer listFreer;
             int8_t value;
             value = 1;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 51: {
             LogStep(51, "Read attribute INT8S Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 52: {
@@ -58137,17 +58137,17 @@
             ListFreer listFreer;
             int8_t value;
             value = readAttributeInt8sDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 53: {
             LogStep(53, "Read attribute INT8S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true,
                                  chip::NullOptional);
         }
         case 54: {
             LogStep(54, "Read attribute INT16S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 55: {
@@ -58155,12 +58155,12 @@
             ListFreer listFreer;
             int16_t value;
             value = 1;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 56: {
             LogStep(56, "Read attribute INT16S Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 57: {
@@ -58168,17 +58168,17 @@
             ListFreer listFreer;
             int16_t value;
             value = readAttributeInt16sDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 58: {
             LogStep(58, "Read attribute INT16S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int16s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true,
                                  chip::NullOptional);
         }
         case 59: {
             LogStep(59, "Read attribute INT32S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 60: {
@@ -58186,12 +58186,12 @@
             ListFreer listFreer;
             int32_t value;
             value = 1L;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 61: {
             LogStep(61, "Read attribute INT32S Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 62: {
@@ -58199,17 +58199,17 @@
             ListFreer listFreer;
             int32_t value;
             value = readAttributeInt32sDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 63: {
             LogStep(63, "Read attribute INT32S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true,
                                  chip::NullOptional);
         }
         case 64: {
             LogStep(64, "Read attribute INT64S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 65: {
@@ -58217,12 +58217,12 @@
             ListFreer listFreer;
             int64_t value;
             value = 1LL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 66: {
             LogStep(66, "Read attribute INT64S Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 67: {
@@ -58230,17 +58230,17 @@
             ListFreer listFreer;
             int64_t value;
             value = readAttributeInt64sDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 68: {
             LogStep(68, "Read attribute INT64S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int64s::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true,
                                  chip::NullOptional);
         }
         case 69: {
             LogStep(69, "Read attribute ENUM8 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true,
                                  chip::NullOptional);
         }
         case 70: {
@@ -58248,12 +58248,12 @@
             ListFreer listFreer;
             uint8_t value;
             value = 1U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 71: {
             LogStep(71, "Read attribute ENUM8 Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true,
                                  chip::NullOptional);
         }
         case 72: {
@@ -58261,17 +58261,17 @@
             ListFreer listFreer;
             uint8_t value;
             value = readAttributeEnum8DefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 73: {
             LogStep(73, "Read attribute ENUM8 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true,
                                  chip::NullOptional);
         }
         case 74: {
             LogStep(74, "Read attribute ENUM16 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true,
                                  chip::NullOptional);
         }
         case 75: {
@@ -58279,12 +58279,12 @@
             ListFreer listFreer;
             uint16_t value;
             value = 1U;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 76: {
             LogStep(76, "Read attribute ENUM16 Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true,
                                  chip::NullOptional);
         }
         case 77: {
@@ -58292,17 +58292,17 @@
             ListFreer listFreer;
             uint16_t value;
             value = readAttributeEnum16DefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 78: {
             LogStep(78, "Read attribute ENUM16 Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum16::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true,
                                  chip::NullOptional);
         }
         case 79: {
             LogStep(79, "Read attribute EPOCH_US Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true,
                                  chip::NullOptional);
         }
         case 80: {
@@ -58310,12 +58310,12 @@
             ListFreer listFreer;
             uint64_t value;
             value = 1ULL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 81: {
             LogStep(81, "Read attribute EPOCH_US Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true,
                                  chip::NullOptional);
         }
         case 82: {
@@ -58323,17 +58323,17 @@
             ListFreer listFreer;
             uint64_t value;
             value = readAttributeEpochUSDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 83: {
             LogStep(83, "Read attribute EPOCH_US Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochUs::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true,
                                  chip::NullOptional);
         }
         case 84: {
             LogStep(84, "Read attribute EPOCH_S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true,
                                  chip::NullOptional);
         }
         case 85: {
@@ -58341,12 +58341,12 @@
             ListFreer listFreer;
             uint32_t value;
             value = 1UL;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 86: {
             LogStep(86, "Read attribute EPOCH_S Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true,
                                  chip::NullOptional);
         }
         case 87: {
@@ -58354,17 +58354,17 @@
             ListFreer listFreer;
             uint32_t value;
             value = readAttributeEpochSDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 88: {
             LogStep(88, "Read attribute EPOCH_S Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::EpochS::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true,
                                  chip::NullOptional);
         }
         case 89: {
             LogStep(89, "Read attribute vendor_id Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true,
                                  chip::NullOptional);
         }
         case 90: {
@@ -58372,12 +58372,12 @@
             ListFreer listFreer;
             chip::VendorId value;
             value = static_cast<chip::VendorId>(1);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 91: {
             LogStep(91, "Read attribute vendor_id Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true,
                                  chip::NullOptional);
         }
         case 92: {
@@ -58385,22 +58385,22 @@
             ListFreer listFreer;
             chip::VendorId value;
             value = readAttributeVendorIdDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 93: {
             LogStep(93, "Read attribute vendor_id Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::VendorId::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true,
                                  chip::NullOptional);
         }
         case 94: {
             LogStep(94, "Read attribute char_string Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 95: {
             LogStep(95, "Read attribute char_string Default Value and compare to saved value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 96: {
@@ -58408,17 +58408,17 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = chip::Span<const char>("NotDefaultgarbage: not in length on purpose", 10);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 97: {
             LogStep(97, "Read attribute char_string Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 98: {
             LogStep(98, "Read attribute char_string Not Default Value and compare to saved value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 99: {
@@ -58426,12 +58426,12 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = readAttributeCharStringNotDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 100: {
             LogStep(100, "Read attribute char_string Not Default Value and compare to expected value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true,
                                  chip::NullOptional);
         }
         case 101: {
@@ -58439,17 +58439,17 @@
             ListFreer listFreer;
             chip::CharSpan value;
             value = readAttributeCharStringDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 102: {
             LogStep(102, "Read attribute octet_string Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 103: {
             LogStep(103, "Read attribute octet_string Default Value and compare to saved value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 104: {
@@ -58457,17 +58457,17 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = chip::ByteSpan(chip::Uint8::from_const_char("NotDefaultgarbage: not in length on purpose"), 10);
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 105: {
             LogStep(105, "Read attribute octet_string Not Default Value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 106: {
             LogStep(106, "Read attribute octet_string Not Default Value and compare to saved value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 107: {
@@ -58475,12 +58475,12 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = readAttributeOctetStringNotDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         case 108: {
             LogStep(108, "Read attribute octet_string Not Default Value and compare to expected value");
-            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, true,
+            return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true,
                                  chip::NullOptional);
         }
         case 109: {
@@ -58488,7 +58488,7 @@
             ListFreer listFreer;
             chip::ByteSpan value;
             value = readAttributeOctetStringDefaultValue;
-            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::OctetString::Id, value,
+            return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value,
                                   chip::NullOptional, chip::NullOptional);
         }
         }
@@ -58546,7 +58546,7 @@
         case 1:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U));
                 TestAddArgumentDefaultValue = value.returnValue;
@@ -58555,7 +58555,7 @@
         case 2:
             VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
             {
-                chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value;
+                chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value;
                 VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
                 VerifyOrReturn(CheckValue("returnValue", value.returnValue,
                                           mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U));
@@ -58586,10 +58586,10 @@
         case 1: {
             LogStep(1, "Send Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = 3U;
             value.arg2 = 17U;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
@@ -58597,10 +58597,10 @@
         case 2: {
             LogStep(2, "Send Test Add Arguments Command");
             ListFreer listFreer;
-            chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value;
+            chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value;
             value.arg1 = mArg1.HasValue() ? mArg1.Value() : 5U;
             value.arg2 = TestAddArgumentDefaultValue;
-            return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value,
+            return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value,
                                chip::NullOptional
 
             );
diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h
index 53892ff..683602c 100644
--- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h
+++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h
@@ -496,26 +496,26 @@
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & data);
 typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::AttributeId> & data);
-typedef void (*TestClusterListInt8uListAttributeCallback)(void * context,
+typedef void (*UnitTestingListInt8uListAttributeCallback)(void * context,
                                                           const chip::app::DataModel::DecodableList<uint8_t> & data);
-typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context,
+typedef void (*UnitTestingListOctetStringListAttributeCallback)(void * context,
                                                                 const chip::app::DataModel::DecodableList<chip::ByteSpan> & data);
-typedef void (*TestClusterListStructOctetStringListAttributeCallback)(
+typedef void (*UnitTestingListStructOctetStringListAttributeCallback)(
     void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType> &
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType> &
         data);
-typedef void (*TestClusterListNullablesAndOptionalsStructListAttributeCallback)(
+typedef void (*UnitTestingListNullablesAndOptionalsStructListAttributeCallback)(
     void * context,
     const chip::app::DataModel::DecodableList<
-        chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & data);
-typedef void (*TestClusterListLongOctetStringListAttributeCallback)(
+        chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & data);
+typedef void (*UnitTestingListLongOctetStringListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::ByteSpan> & data);
-typedef void (*TestClusterListFabricScopedListAttributeCallback)(
+typedef void (*UnitTestingListFabricScopedListAttributeCallback)(
     void * context,
-    const chip::app::DataModel::DecodableList<chip::app::Clusters::TestCluster::Structs::TestFabricScoped::DecodableType> & data);
-typedef void (*TestClusterGeneratedCommandListListAttributeCallback)(
+    const chip::app::DataModel::DecodableList<chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType> & data);
+typedef void (*UnitTestingGeneratedCommandListListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & data);
-typedef void (*TestClusterAcceptedCommandListListAttributeCallback)(
+typedef void (*UnitTestingAcceptedCommandListListAttributeCallback)(
     void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & data);
-typedef void (*TestClusterAttributeListListAttributeCallback)(void * context,
+typedef void (*UnitTestingAttributeListListAttributeCallback)(void * context,
                                                               const chip::app::DataModel::DecodableList<chip::AttributeId> & data);
diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h
index 96283a0..14e8616 100644
--- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h
+++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h
@@ -622,13 +622,13 @@
     ~ElectricalMeasurementCluster() {}
 };
 
-class DLL_EXPORT TestClusterCluster : public ClusterBase
+class DLL_EXPORT UnitTestingCluster : public ClusterBase
 {
 public:
-    TestClusterCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
-        ClusterBase(exchangeManager, session, app::Clusters::TestCluster::Id, endpoint)
+    UnitTestingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
+        ClusterBase(exchangeManager, session, app::Clusters::UnitTesting::Id, endpoint)
     {}
-    ~TestClusterCluster() {}
+    ~UnitTestingCluster() {}
 };
 
 } // namespace Controller
diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp
index f35c36f..9e61976 100644
--- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp
+++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp
@@ -194,9 +194,6 @@
     case ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID:
         emberAfTemperatureMeasurementClusterInitCallback(endpoint);
         break;
-    case ZCL_TEST_CLUSTER_ID:
-        emberAfTestClusterClusterInitCallback(endpoint);
-        break;
     case ZCL_THERMOSTAT_CLUSTER_ID:
         emberAfThermostatClusterInitCallback(endpoint);
         break;
@@ -212,6 +209,9 @@
     case ZCL_UNIT_LOCALIZATION_CLUSTER_ID:
         emberAfUnitLocalizationClusterInitCallback(endpoint);
         break;
+    case ZCL_UNIT_TESTING_CLUSTER_ID:
+        emberAfUnitTestingClusterInitCallback(endpoint);
+        break;
     case ZCL_USER_LABEL_CLUSTER_ID:
         emberAfUserLabelClusterInitCallback(endpoint);
         break;
@@ -505,11 +505,6 @@
     // To prevent warning
     (void) endpoint;
 }
-void __attribute__((weak)) emberAfTestClusterClusterInitCallback(EndpointId endpoint)
-{
-    // To prevent warning
-    (void) endpoint;
-}
 void __attribute__((weak)) emberAfThermostatClusterInitCallback(EndpointId endpoint)
 {
     // To prevent warning
@@ -535,6 +530,11 @@
     // To prevent warning
     (void) endpoint;
 }
+void __attribute__((weak)) emberAfUnitTestingClusterInitCallback(EndpointId endpoint)
+{
+    // To prevent warning
+    (void) endpoint;
+}
 void __attribute__((weak)) emberAfUserLabelClusterInitCallback(EndpointId endpoint)
 {
     // To prevent warning
diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h
index 02e8566..3fc3769 100644
--- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h
+++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h
@@ -788,7 +788,7 @@
       .generatedCommandList = nullptr ,\
     },\
   { \
-      /* Endpoint: 1, Cluster: Test Cluster (client) */ \
+      /* Endpoint: 1, Cluster: Unit Testing (client) */ \
       .clusterId = 0xFFF1FC05,  \
       .attributes = ZAP_ATTRIBUTE_INDEX(0), \
       .attributeCount = 0, \
diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h
index d73f3e5..1e3b379 100644
--- a/zzz_generated/controller-clusters/zap-generated/gen_config.h
+++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h
@@ -93,7 +93,7 @@
 #define EMBER_AF_APPLICATION_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1)
 #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_CLIENT_ENDPOINT_COUNT (1)
 #define EMBER_AF_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1)
-#define EMBER_AF_TEST_CLUSTER_CLIENT_ENDPOINT_COUNT (1)
+#define EMBER_AF_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (1)
 
 /**** Cluster Plugins ****/
 
@@ -353,6 +353,6 @@
 #define ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT
 #define EMBER_AF_PLUGIN_ELECTRICAL_MEASUREMENT_CLIENT
 
-// Use this macro to check if the client side of the Test Cluster cluster is included
-#define ZCL_USING_TEST_CLUSTER_CLIENT
-#define EMBER_AF_PLUGIN_TEST_CLUSTER_CLIENT
+// Use this macro to check if the client side of the Unit Testing cluster is included
+#define ZCL_USING_UNIT_TESTING_CLUSTER_CLIENT
+#define EMBER_AF_PLUGIN_UNIT_TESTING_CLIENT
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index 847b385..1d5d8e6 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -104,7 +104,7 @@
 | ApplicationBasic                                                    | 0x050D |
 | AccountLogin                                                        | 0x050E |
 | ElectricalMeasurement                                               | 0x0B04 |
-| TestCluster                                                         | 0xFFF1FC05|
+| UnitTesting                                                         | 0xFFF1FC05|
 | FaultInjection                                                      | 0xFFF1FC06|
 \*----------------------------------------------------------------------------*/
 
@@ -86254,7 +86254,7 @@
 };
 
 /*----------------------------------------------------------------------------*\
-| Cluster TestCluster                                                 | 0xFFF1FC05|
+| Cluster UnitTesting                                                 | 0xFFF1FC05|
 |------------------------------------------------------------------------------|
 | Commands:                                                           |        |
 | * Test                                                              |   0x00 |
@@ -86377,9 +86377,9 @@
 /*
  * Command Test
  */
-class TestClusterTest : public ClusterCommand {
+class UnitTestingTest : public ClusterCommand {
 public:
-    TestClusterTest()
+    UnitTestingTest()
         : ClusterCommand("test")
     {
         ClusterCommand::AddArguments();
@@ -86390,10 +86390,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         uint16_t repeatCount = mRepeatCount.ValueOr(1);
@@ -86420,9 +86420,9 @@
 /*
  * Command TestNotHandled
  */
-class TestClusterTestNotHandled : public ClusterCommand {
+class UnitTestingTestNotHandled : public ClusterCommand {
 public:
-    TestClusterTestNotHandled()
+    UnitTestingTestNotHandled()
         : ClusterCommand("test-not-handled")
     {
         ClusterCommand::AddArguments();
@@ -86433,10 +86433,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestNotHandledParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestNotHandledParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         uint16_t repeatCount = mRepeatCount.ValueOr(1);
@@ -86463,9 +86463,9 @@
 /*
  * Command TestSpecific
  */
-class TestClusterTestSpecific : public ClusterCommand {
+class UnitTestingTestSpecific : public ClusterCommand {
 public:
-    TestClusterTestSpecific()
+    UnitTestingTestSpecific()
         : ClusterCommand("test-specific")
     {
         ClusterCommand::AddArguments();
@@ -86476,17 +86476,17 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestSpecificParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestSpecificParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         uint16_t repeatCount = mRepeatCount.ValueOr(1);
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testSpecificWithParams:params
-                                 completion:^(MTRTestClusterClusterTestSpecificResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable values,
                                      NSError * _Nullable error) {
                                      NSLog(@"Values: %@", values);
                                      responsesNeeded--;
@@ -86508,9 +86508,9 @@
 /*
  * Command TestUnknownCommand
  */
-class TestClusterTestUnknownCommand : public ClusterCommand {
+class UnitTestingTestUnknownCommand : public ClusterCommand {
 public:
-    TestClusterTestUnknownCommand()
+    UnitTestingTestUnknownCommand()
         : ClusterCommand("test-unknown-command")
     {
         ClusterCommand::AddArguments();
@@ -86521,10 +86521,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestUnknownCommandParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         uint16_t repeatCount = mRepeatCount.ValueOr(1);
@@ -86551,9 +86551,9 @@
 /*
  * Command TestAddArguments
  */
-class TestClusterTestAddArguments : public ClusterCommand {
+class UnitTestingTestAddArguments : public ClusterCommand {
 public:
-    TestClusterTestAddArguments()
+    UnitTestingTestAddArguments()
         : ClusterCommand("test-add-arguments")
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -86566,10 +86566,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.arg1 = [NSNumber numberWithUnsignedChar:mRequest.arg1];
@@ -86578,7 +86578,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testAddArgumentsWithParams:params
-                                     completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                     completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                          NSError * _Nullable error) {
                                          NSLog(@"Values: %@", values);
                                          responsesNeeded--;
@@ -86595,15 +86595,15 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type mRequest;
 };
 
 /*
  * Command TestSimpleArgumentRequest
  */
-class TestClusterTestSimpleArgumentRequest : public ClusterCommand {
+class UnitTestingTestSimpleArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestSimpleArgumentRequest()
+    UnitTestingTestSimpleArgumentRequest()
         : ClusterCommand("test-simple-argument-request")
     {
         AddArgument("Arg1", 0, 1, &mRequest.arg1);
@@ -86615,10 +86615,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestSimpleArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.arg1 = [NSNumber numberWithBool:mRequest.arg1];
@@ -86626,7 +86626,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testSimpleArgumentRequestWithParams:params
-                                              completion:^(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable values,
+                                              completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable values,
                                                   NSError * _Nullable error) {
                                                   NSLog(@"Values: %@", values);
                                                   responsesNeeded--;
@@ -86643,15 +86643,15 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type mRequest;
 };
 
 /*
  * Command TestStructArrayArgumentRequest
  */
-class TestClusterTestStructArrayArgumentRequest : public ClusterCommand {
+class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestStructArrayArgumentRequest()
+    UnitTestingTestStructArrayArgumentRequest()
         : ClusterCommand("test-struct-array-argument-request")
         , mComplex_Arg1(&mRequest.arg1)
         , mComplex_Arg2(&mRequest.arg2)
@@ -86672,20 +86672,20 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestStructArrayArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mRequest.arg1) {
-                MTRTestClusterClusterNestedStructList * newElement_0;
-                newElement_0 = [MTRTestClusterClusterNestedStructList new];
+                MTRUnitTestingClusterNestedStructList * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterNestedStructList new];
                 newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
                 newElement_0.b = [NSNumber numberWithBool:entry_0.b];
-                newElement_0.c = [MTRTestClusterClusterSimpleStruct new];
+                newElement_0.c = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a];
                 newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b];
                 newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)];
@@ -86699,8 +86699,8 @@
                 { // Scope for our temporary variables
                     auto * array_2 = [NSMutableArray new];
                     for (auto & entry_2 : entry_0.d) {
-                        MTRTestClusterClusterSimpleStruct * newElement_2;
-                        newElement_2 = [MTRTestClusterClusterSimpleStruct new];
+                        MTRUnitTestingClusterSimpleStruct * newElement_2;
+                        newElement_2 = [MTRUnitTestingClusterSimpleStruct new];
                         newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a];
                         newElement_2.b = [NSNumber numberWithBool:entry_2.b];
                         newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)];
@@ -86749,8 +86749,8 @@
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mRequest.arg2) {
-                MTRTestClusterClusterSimpleStruct * newElement_0;
-                newElement_0 = [MTRTestClusterClusterSimpleStruct new];
+                MTRUnitTestingClusterSimpleStruct * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
                 newElement_0.b = [NSNumber numberWithBool:entry_0.b];
                 newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)];
@@ -86791,7 +86791,7 @@
             [cluster
                 testStructArrayArgumentRequestWithParams:params
                                               completion:^(
-                                                  MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable values,
+                                                  MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable values,
                                                   NSError * _Nullable error) {
                                                   NSLog(@"Values: %@", values);
                                                   responsesNeeded--;
@@ -86808,21 +86808,21 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>>
         mComplex_Arg1;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>
         mComplex_Arg2;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>> mComplex_Arg3;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>> mComplex_Arg3;
     TypedComplexArgument<chip::app::DataModel::List<const bool>> mComplex_Arg4;
 };
 
 /*
  * Command TestStructArgumentRequest
  */
-class TestClusterTestStructArgumentRequest : public ClusterCommand {
+class UnitTestingTestStructArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestStructArgumentRequest()
+    UnitTestingTestStructArgumentRequest()
         : ClusterCommand("test-struct-argument-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -86835,13 +86835,13 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestStructArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
-        params.arg1 = [MTRTestClusterClusterSimpleStruct new];
+        params.arg1 = [MTRUnitTestingClusterSimpleStruct new];
         params.arg1.a = [NSNumber numberWithUnsignedChar:mRequest.arg1.a];
         params.arg1.b = [NSNumber numberWithBool:mRequest.arg1.b];
         params.arg1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.arg1.c)];
@@ -86856,7 +86856,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testStructArgumentRequestWithParams:params
-                                              completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                              completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                   NSError * _Nullable error) {
                                                   NSLog(@"Values: %@", values);
                                                   responsesNeeded--;
@@ -86873,16 +86873,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type> mComplex_Arg1;
 };
 
 /*
  * Command TestNestedStructArgumentRequest
  */
-class TestClusterTestNestedStructArgumentRequest : public ClusterCommand {
+class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestNestedStructArgumentRequest()
+    UnitTestingTestNestedStructArgumentRequest()
         : ClusterCommand("test-nested-struct-argument-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -86895,16 +86895,16 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestNestedStructArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
-        params.arg1 = [MTRTestClusterClusterNestedStruct new];
+        params.arg1 = [MTRUnitTestingClusterNestedStruct new];
         params.arg1.a = [NSNumber numberWithUnsignedChar:mRequest.arg1.a];
         params.arg1.b = [NSNumber numberWithBool:mRequest.arg1.b];
-        params.arg1.c = [MTRTestClusterClusterSimpleStruct new];
+        params.arg1.c = [MTRUnitTestingClusterSimpleStruct new];
         params.arg1.c.a = [NSNumber numberWithUnsignedChar:mRequest.arg1.c.a];
         params.arg1.c.b = [NSNumber numberWithBool:mRequest.arg1.c.b];
         params.arg1.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.arg1.c.c)];
@@ -86919,7 +86919,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testNestedStructArgumentRequestWithParams:params
-                                                    completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                    completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                         NSError * _Nullable error) {
                                                         NSLog(@"Values: %@", values);
                                                         responsesNeeded--;
@@ -86936,16 +86936,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::NestedStruct::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::NestedStruct::Type> mComplex_Arg1;
 };
 
 /*
  * Command TestListStructArgumentRequest
  */
-class TestClusterTestListStructArgumentRequest : public ClusterCommand {
+class UnitTestingTestListStructArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestListStructArgumentRequest()
+    UnitTestingTestListStructArgumentRequest()
         : ClusterCommand("test-list-struct-argument-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -86958,17 +86958,17 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListStructArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mRequest.arg1) {
-                MTRTestClusterClusterSimpleStruct * newElement_0;
-                newElement_0 = [MTRTestClusterClusterSimpleStruct new];
+                MTRUnitTestingClusterSimpleStruct * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
                 newElement_0.b = [NSNumber numberWithBool:entry_0.b];
                 newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)];
@@ -86987,7 +86987,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testListStructArgumentRequestWithParams:params
-                                                  completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                  completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                       NSError * _Nullable error) {
                                                       NSLog(@"Values: %@", values);
                                                       responsesNeeded--;
@@ -87004,17 +87004,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>
         mComplex_Arg1;
 };
 
 /*
  * Command TestListInt8UArgumentRequest
  */
-class TestClusterTestListInt8UArgumentRequest : public ClusterCommand {
+class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestListInt8UArgumentRequest()
+    UnitTestingTestListInt8UArgumentRequest()
         : ClusterCommand("test-list-int8uargument-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -87027,10 +87027,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListInt8UArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         { // Scope for our temporary variables
@@ -87046,7 +87046,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testListInt8UArgumentRequestWithParams:params
-                                                 completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                 completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                      NSError * _Nullable error) {
                                                      NSLog(@"Values: %@", values);
                                                      responsesNeeded--;
@@ -87063,16 +87063,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type mRequest;
     TypedComplexArgument<chip::app::DataModel::List<const uint8_t>> mComplex_Arg1;
 };
 
 /*
  * Command TestNestedStructListArgumentRequest
  */
-class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand {
+class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestNestedStructListArgumentRequest()
+    UnitTestingTestNestedStructListArgumentRequest()
         : ClusterCommand("test-nested-struct-list-argument-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -87085,16 +87085,16 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestNestedStructListArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
-        params.arg1 = [MTRTestClusterClusterNestedStructList new];
+        params.arg1 = [MTRUnitTestingClusterNestedStructList new];
         params.arg1.a = [NSNumber numberWithUnsignedChar:mRequest.arg1.a];
         params.arg1.b = [NSNumber numberWithBool:mRequest.arg1.b];
-        params.arg1.c = [MTRTestClusterClusterSimpleStruct new];
+        params.arg1.c = [MTRUnitTestingClusterSimpleStruct new];
         params.arg1.c.a = [NSNumber numberWithUnsignedChar:mRequest.arg1.c.a];
         params.arg1.c.b = [NSNumber numberWithBool:mRequest.arg1.c.b];
         params.arg1.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.arg1.c.c)];
@@ -87108,8 +87108,8 @@
         { // Scope for our temporary variables
             auto * array_1 = [NSMutableArray new];
             for (auto & entry_1 : mRequest.arg1.d) {
-                MTRTestClusterClusterSimpleStruct * newElement_1;
-                newElement_1 = [MTRTestClusterClusterSimpleStruct new];
+                MTRUnitTestingClusterSimpleStruct * newElement_1;
+                newElement_1 = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_1.a = [NSNumber numberWithUnsignedChar:entry_1.a];
                 newElement_1.b = [NSNumber numberWithBool:entry_1.b];
                 newElement_1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.c)];
@@ -87155,7 +87155,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testNestedStructListArgumentRequestWithParams:params
-                                                        completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                        completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                             NSError * _Nullable error) {
                                                             NSLog(@"Values: %@", values);
                                                             responsesNeeded--;
@@ -87172,16 +87172,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::NestedStructList::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type> mComplex_Arg1;
 };
 
 /*
  * Command TestListNestedStructListArgumentRequest
  */
-class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand {
+class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestListNestedStructListArgumentRequest()
+    UnitTestingTestListNestedStructListArgumentRequest()
         : ClusterCommand("test-list-nested-struct-list-argument-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -87194,20 +87194,20 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mRequest.arg1) {
-                MTRTestClusterClusterNestedStructList * newElement_0;
-                newElement_0 = [MTRTestClusterClusterNestedStructList new];
+                MTRUnitTestingClusterNestedStructList * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterNestedStructList new];
                 newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a];
                 newElement_0.b = [NSNumber numberWithBool:entry_0.b];
-                newElement_0.c = [MTRTestClusterClusterSimpleStruct new];
+                newElement_0.c = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a];
                 newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b];
                 newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)];
@@ -87221,8 +87221,8 @@
                 { // Scope for our temporary variables
                     auto * array_2 = [NSMutableArray new];
                     for (auto & entry_2 : entry_0.d) {
-                        MTRTestClusterClusterSimpleStruct * newElement_2;
-                        newElement_2 = [MTRTestClusterClusterSimpleStruct new];
+                        MTRUnitTestingClusterSimpleStruct * newElement_2;
+                        newElement_2 = [MTRUnitTestingClusterSimpleStruct new];
                         newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a];
                         newElement_2.b = [NSNumber numberWithBool:entry_2.b];
                         newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)];
@@ -87273,7 +87273,7 @@
         while (repeatCount--) {
             [cluster
                 testListNestedStructListArgumentRequestWithParams:params
-                                                       completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                       completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                            NSError * _Nullable error) {
                                                            NSLog(@"Values: %@", values);
                                                            responsesNeeded--;
@@ -87290,17 +87290,17 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NestedStructList::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NestedStructList::Type>>
         mComplex_Arg1;
 };
 
 /*
  * Command TestListInt8UReverseRequest
  */
-class TestClusterTestListInt8UReverseRequest : public ClusterCommand {
+class UnitTestingTestListInt8UReverseRequest : public ClusterCommand {
 public:
-    TestClusterTestListInt8UReverseRequest()
+    UnitTestingTestListInt8UReverseRequest()
         : ClusterCommand("test-list-int8ureverse-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -87313,10 +87313,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListInt8UReverseRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         { // Scope for our temporary variables
@@ -87333,7 +87333,7 @@
         while (repeatCount--) {
             [cluster
                 testListInt8UReverseRequestWithParams:params
-                                           completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values,
+                                           completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable values,
                                                NSError * _Nullable error) {
                                                NSLog(@"Values: %@", values);
                                                responsesNeeded--;
@@ -87350,16 +87350,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type mRequest;
     TypedComplexArgument<chip::app::DataModel::List<const uint8_t>> mComplex_Arg1;
 };
 
 /*
  * Command TestEnumsRequest
  */
-class TestClusterTestEnumsRequest : public ClusterCommand {
+class UnitTestingTestEnumsRequest : public ClusterCommand {
 public:
-    TestClusterTestEnumsRequest()
+    UnitTestingTestEnumsRequest()
         : ClusterCommand("test-enums-request")
     {
         AddArgument("Arg1", 0, UINT16_MAX, &mRequest.arg1);
@@ -87372,10 +87372,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestEnumsRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.arg1 = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.arg1)];
@@ -87384,7 +87384,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testEnumsRequestWithParams:params
-                                     completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values,
+                                     completion:^(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values,
                                          NSError * _Nullable error) {
                                          NSLog(@"Values: %@", values);
                                          responsesNeeded--;
@@ -87401,15 +87401,15 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type mRequest;
 };
 
 /*
  * Command TestNullableOptionalRequest
  */
-class TestClusterTestNullableOptionalRequest : public ClusterCommand {
+class UnitTestingTestNullableOptionalRequest : public ClusterCommand {
 public:
-    TestClusterTestNullableOptionalRequest()
+    UnitTestingTestNullableOptionalRequest()
         : ClusterCommand("test-nullable-optional-request")
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -87421,10 +87421,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestNullableOptionalRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         if (mRequest.arg1.HasValue()) {
@@ -87441,7 +87441,7 @@
         while (repeatCount--) {
             [cluster
                 testNullableOptionalRequestWithParams:params
-                                           completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values,
+                                           completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable values,
                                                NSError * _Nullable error) {
                                                NSLog(@"Values: %@", values);
                                                responsesNeeded--;
@@ -87458,15 +87458,15 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type mRequest;
 };
 
 /*
  * Command TestComplexNullableOptionalRequest
  */
-class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand {
+class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand {
 public:
-    TestClusterTestComplexNullableOptionalRequest()
+    UnitTestingTestComplexNullableOptionalRequest()
         : ClusterCommand("test-complex-nullable-optional-request")
         , mComplex_NullableStruct(&mRequest.nullableStruct)
         , mComplex_OptionalStruct(&mRequest.optionalStruct)
@@ -87495,10 +87495,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestComplexNullableOptionalRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         if (mRequest.nullableInt.IsNull()) {
@@ -87549,7 +87549,7 @@
         if (mRequest.nullableStruct.IsNull()) {
             params.nullableStruct = nil;
         } else {
-            params.nullableStruct = [MTRTestClusterClusterSimpleStruct new];
+            params.nullableStruct = [MTRUnitTestingClusterSimpleStruct new];
             params.nullableStruct.a = [NSNumber numberWithUnsignedChar:mRequest.nullableStruct.Value().a];
             params.nullableStruct.b = [NSNumber numberWithBool:mRequest.nullableStruct.Value().b];
             params.nullableStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.nullableStruct.Value().c)];
@@ -87563,7 +87563,7 @@
             params.nullableStruct.h = [NSNumber numberWithDouble:mRequest.nullableStruct.Value().h];
         }
         if (mRequest.optionalStruct.HasValue()) {
-            params.optionalStruct = [MTRTestClusterClusterSimpleStruct new];
+            params.optionalStruct = [MTRUnitTestingClusterSimpleStruct new];
             params.optionalStruct.a = [NSNumber numberWithUnsignedChar:mRequest.optionalStruct.Value().a];
             params.optionalStruct.b = [NSNumber numberWithBool:mRequest.optionalStruct.Value().b];
             params.optionalStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.optionalStruct.Value().c)];
@@ -87582,7 +87582,7 @@
             if (mRequest.nullableOptionalStruct.Value().IsNull()) {
                 params.nullableOptionalStruct = nil;
             } else {
-                params.nullableOptionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                params.nullableOptionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                 params.nullableOptionalStruct.a =
                     [NSNumber numberWithUnsignedChar:mRequest.nullableOptionalStruct.Value().Value().a];
                 params.nullableOptionalStruct.b = [NSNumber numberWithBool:mRequest.nullableOptionalStruct.Value().Value().b];
@@ -87651,7 +87651,7 @@
             [cluster
                 testComplexNullableOptionalRequestWithParams:params
                                                   completion:^(
-                                                      MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable values,
+                                                      MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable values,
                                                       NSError * _Nullable error) {
                                                       NSLog(@"Values: %@", values);
                                                       responsesNeeded--;
@@ -87668,29 +87668,29 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalRequest::Type mRequest;
-    TypedComplexArgument<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>
+    chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Type mRequest;
+    TypedComplexArgument<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>
         mComplex_NullableStruct;
-    TypedComplexArgument<chip::Optional<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>> mComplex_OptionalStruct;
+    TypedComplexArgument<chip::Optional<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>> mComplex_OptionalStruct;
     TypedComplexArgument<
-        chip::Optional<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>>>
+        chip::Optional<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>>>
         mComplex_NullableOptionalStruct;
     TypedComplexArgument<
-        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>>>
+        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>>>
         mComplex_NullableList;
-    TypedComplexArgument<chip::Optional<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>>>
+    TypedComplexArgument<chip::Optional<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>>>
         mComplex_OptionalList;
     TypedComplexArgument<chip::Optional<
-        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::SimpleEnum>>>>
+        chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum>>>>
         mComplex_NullableOptionalList;
 };
 
 /*
  * Command SimpleStructEchoRequest
  */
-class TestClusterSimpleStructEchoRequest : public ClusterCommand {
+class UnitTestingSimpleStructEchoRequest : public ClusterCommand {
 public:
-    TestClusterSimpleStructEchoRequest()
+    UnitTestingSimpleStructEchoRequest()
         : ClusterCommand("simple-struct-echo-request")
         , mComplex_Arg1(&mRequest.arg1)
     {
@@ -87703,13 +87703,13 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterSimpleStructEchoRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
-        params.arg1 = [MTRTestClusterClusterSimpleStruct new];
+        params.arg1 = [MTRUnitTestingClusterSimpleStruct new];
         params.arg1.a = [NSNumber numberWithUnsignedChar:mRequest.arg1.a];
         params.arg1.b = [NSNumber numberWithBool:mRequest.arg1.b];
         params.arg1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.arg1.c)];
@@ -87724,7 +87724,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster simpleStructEchoRequestWithParams:params
-                                            completion:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values,
+                                            completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable values,
                                                 NSError * _Nullable error) {
                                                 NSLog(@"Values: %@", values);
                                                 responsesNeeded--;
@@ -87741,16 +87741,16 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type mRequest;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type> mComplex_Arg1;
+    chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Type mRequest;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type> mComplex_Arg1;
 };
 
 /*
  * Command TimedInvokeRequest
  */
-class TestClusterTimedInvokeRequest : public ClusterCommand {
+class UnitTestingTimedInvokeRequest : public ClusterCommand {
 public:
-    TestClusterTimedInvokeRequest()
+    UnitTestingTimedInvokeRequest()
         : ClusterCommand("timed-invoke-request")
     {
         ClusterCommand::AddArguments();
@@ -87761,10 +87761,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTimedInvokeRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         uint16_t repeatCount = mRepeatCount.ValueOr(1);
@@ -87791,9 +87791,9 @@
 /*
  * Command TestSimpleOptionalArgumentRequest
  */
-class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand {
+class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand {
 public:
-    TestClusterTestSimpleOptionalArgumentRequest()
+    UnitTestingTestSimpleOptionalArgumentRequest()
         : ClusterCommand("test-simple-optional-argument-request")
     {
         AddArgument("Arg1", 0, 1, &mRequest.arg1);
@@ -87805,10 +87805,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         if (mRequest.arg1.HasValue()) {
@@ -87835,15 +87835,15 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type mRequest;
 };
 
 /*
  * Command TestEmitTestEventRequest
  */
-class TestClusterTestEmitTestEventRequest : public ClusterCommand {
+class UnitTestingTestEmitTestEventRequest : public ClusterCommand {
 public:
-    TestClusterTestEmitTestEventRequest()
+    UnitTestingTestEmitTestEventRequest()
         : ClusterCommand("test-emit-test-event-request")
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -87857,10 +87857,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestEmitTestEventRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.arg1 = [NSNumber numberWithUnsignedChar:mRequest.arg1];
@@ -87870,7 +87870,7 @@
         uint16_t __block responsesNeeded = repeatCount;
         while (repeatCount--) {
             [cluster testEmitTestEventRequestWithParams:params
-                                             completion:^(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable values,
+                                             completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable values,
                                                  NSError * _Nullable error) {
                                                  NSLog(@"Values: %@", values);
                                                  responsesNeeded--;
@@ -87887,15 +87887,15 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type mRequest;
 };
 
 /*
  * Command TestEmitTestFabricScopedEventRequest
  */
-class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand {
+class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand {
 public:
-    TestClusterTestEmitTestFabricScopedEventRequest()
+    UnitTestingTestEmitTestFabricScopedEventRequest()
         : ClusterCommand("test-emit-test-fabric-scoped-event-request")
     {
         AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1);
@@ -87907,10 +87907,10 @@
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
-        __auto_type * params = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams alloc] init];
         params.timedInvokeTimeoutMs
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.arg1 = [NSNumber numberWithUnsignedChar:mRequest.arg1];
@@ -87920,7 +87920,7 @@
             [cluster
                 testEmitTestFabricScopedEventRequestWithParams:params
                                                     completion:^(
-                                                        MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values,
+                                                        MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values,
                                                         NSError * _Nullable error) {
                                                         NSLog(@"Values: %@", values);
                                                         responsesNeeded--;
@@ -87937,33 +87937,33 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest;
+    chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest;
 };
 
 /*
  * Attribute Boolean
  */
-class ReadTestClusterBoolean : public ReadAttribute {
+class ReadUnitTestingBoolean : public ReadAttribute {
 public:
-    ReadTestClusterBoolean()
+    ReadUnitTestingBoolean()
         : ReadAttribute("boolean")
     {
     }
 
-    ~ReadTestClusterBoolean() {}
+    ~ReadUnitTestingBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000000) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Boolean response %@", [value description]);
+            NSLog(@"UnitTesting.Boolean response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Boolean read Error", error);
+                LogNSError("UnitTesting Boolean read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -87971,9 +87971,9 @@
     }
 };
 
-class WriteTestClusterBoolean : public WriteAttribute {
+class WriteUnitTestingBoolean : public WriteAttribute {
 public:
-    WriteTestClusterBoolean()
+    WriteUnitTestingBoolean()
         : WriteAttribute("boolean")
     {
         AddArgument("attr-name", "boolean");
@@ -87981,13 +87981,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterBoolean() {}
+    ~WriteUnitTestingBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000000) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88000,7 +88000,7 @@
                                          params:params
                                      completion:^(NSError * _Nullable error) {
                                          if (error != nil) {
-                                             LogNSError("TestCluster Boolean write Error", error);
+                                             LogNSError("UnitTesting Boolean write Error", error);
                                          }
                                          SetCommandExitStatus(error);
                                      }];
@@ -88011,20 +88011,20 @@
     bool mValue;
 };
 
-class SubscribeAttributeTestClusterBoolean : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingBoolean : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterBoolean()
+    SubscribeAttributeUnitTestingBoolean()
         : SubscribeAttribute("boolean")
     {
     }
 
-    ~SubscribeAttributeTestClusterBoolean() {}
+    ~SubscribeAttributeUnitTestingBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000000) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88042,7 +88042,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Boolean response %@", [value description]);
+                NSLog(@"UnitTesting.Boolean response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88053,27 +88053,27 @@
 /*
  * Attribute Bitmap8
  */
-class ReadTestClusterBitmap8 : public ReadAttribute {
+class ReadUnitTestingBitmap8 : public ReadAttribute {
 public:
-    ReadTestClusterBitmap8()
+    ReadUnitTestingBitmap8()
         : ReadAttribute("bitmap8")
     {
     }
 
-    ~ReadTestClusterBitmap8() {}
+    ~ReadUnitTestingBitmap8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000001) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Bitmap8 response %@", [value description]);
+            NSLog(@"UnitTesting.Bitmap8 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Bitmap8 read Error", error);
+                LogNSError("UnitTesting Bitmap8 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88081,9 +88081,9 @@
     }
 };
 
-class WriteTestClusterBitmap8 : public WriteAttribute {
+class WriteUnitTestingBitmap8 : public WriteAttribute {
 public:
-    WriteTestClusterBitmap8()
+    WriteUnitTestingBitmap8()
         : WriteAttribute("bitmap8")
     {
         AddArgument("attr-name", "bitmap8");
@@ -88091,13 +88091,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterBitmap8() {}
+    ~WriteUnitTestingBitmap8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000001) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88110,7 +88110,7 @@
                                          params:params
                                      completion:^(NSError * _Nullable error) {
                                          if (error != nil) {
-                                             LogNSError("TestCluster Bitmap8 write Error", error);
+                                             LogNSError("UnitTesting Bitmap8 write Error", error);
                                          }
                                          SetCommandExitStatus(error);
                                      }];
@@ -88121,20 +88121,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterBitmap8 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingBitmap8 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterBitmap8()
+    SubscribeAttributeUnitTestingBitmap8()
         : SubscribeAttribute("bitmap8")
     {
     }
 
-    ~SubscribeAttributeTestClusterBitmap8() {}
+    ~SubscribeAttributeUnitTestingBitmap8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000001) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88152,7 +88152,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Bitmap8 response %@", [value description]);
+                NSLog(@"UnitTesting.Bitmap8 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88163,27 +88163,27 @@
 /*
  * Attribute Bitmap16
  */
-class ReadTestClusterBitmap16 : public ReadAttribute {
+class ReadUnitTestingBitmap16 : public ReadAttribute {
 public:
-    ReadTestClusterBitmap16()
+    ReadUnitTestingBitmap16()
         : ReadAttribute("bitmap16")
     {
     }
 
-    ~ReadTestClusterBitmap16() {}
+    ~ReadUnitTestingBitmap16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000002) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Bitmap16 response %@", [value description]);
+            NSLog(@"UnitTesting.Bitmap16 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Bitmap16 read Error", error);
+                LogNSError("UnitTesting Bitmap16 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88191,9 +88191,9 @@
     }
 };
 
-class WriteTestClusterBitmap16 : public WriteAttribute {
+class WriteUnitTestingBitmap16 : public WriteAttribute {
 public:
-    WriteTestClusterBitmap16()
+    WriteUnitTestingBitmap16()
         : WriteAttribute("bitmap16")
     {
         AddArgument("attr-name", "bitmap16");
@@ -88201,13 +88201,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterBitmap16() {}
+    ~WriteUnitTestingBitmap16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000002) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88220,7 +88220,7 @@
                                           params:params
                                       completion:^(NSError * _Nullable error) {
                                           if (error != nil) {
-                                              LogNSError("TestCluster Bitmap16 write Error", error);
+                                              LogNSError("UnitTesting Bitmap16 write Error", error);
                                           }
                                           SetCommandExitStatus(error);
                                       }];
@@ -88231,20 +88231,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterBitmap16 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingBitmap16 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterBitmap16()
+    SubscribeAttributeUnitTestingBitmap16()
         : SubscribeAttribute("bitmap16")
     {
     }
 
-    ~SubscribeAttributeTestClusterBitmap16() {}
+    ~SubscribeAttributeUnitTestingBitmap16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000002) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88262,7 +88262,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Bitmap16 response %@", [value description]);
+                NSLog(@"UnitTesting.Bitmap16 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88273,27 +88273,27 @@
 /*
  * Attribute Bitmap32
  */
-class ReadTestClusterBitmap32 : public ReadAttribute {
+class ReadUnitTestingBitmap32 : public ReadAttribute {
 public:
-    ReadTestClusterBitmap32()
+    ReadUnitTestingBitmap32()
         : ReadAttribute("bitmap32")
     {
     }
 
-    ~ReadTestClusterBitmap32() {}
+    ~ReadUnitTestingBitmap32() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000003) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Bitmap32 response %@", [value description]);
+            NSLog(@"UnitTesting.Bitmap32 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Bitmap32 read Error", error);
+                LogNSError("UnitTesting Bitmap32 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88301,9 +88301,9 @@
     }
 };
 
-class WriteTestClusterBitmap32 : public WriteAttribute {
+class WriteUnitTestingBitmap32 : public WriteAttribute {
 public:
-    WriteTestClusterBitmap32()
+    WriteUnitTestingBitmap32()
         : WriteAttribute("bitmap32")
     {
         AddArgument("attr-name", "bitmap32");
@@ -88311,13 +88311,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterBitmap32() {}
+    ~WriteUnitTestingBitmap32() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000003) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88330,7 +88330,7 @@
                                           params:params
                                       completion:^(NSError * _Nullable error) {
                                           if (error != nil) {
-                                              LogNSError("TestCluster Bitmap32 write Error", error);
+                                              LogNSError("UnitTesting Bitmap32 write Error", error);
                                           }
                                           SetCommandExitStatus(error);
                                       }];
@@ -88341,20 +88341,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterBitmap32 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingBitmap32 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterBitmap32()
+    SubscribeAttributeUnitTestingBitmap32()
         : SubscribeAttribute("bitmap32")
     {
     }
 
-    ~SubscribeAttributeTestClusterBitmap32() {}
+    ~SubscribeAttributeUnitTestingBitmap32() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000003) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88372,7 +88372,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Bitmap32 response %@", [value description]);
+                NSLog(@"UnitTesting.Bitmap32 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88383,27 +88383,27 @@
 /*
  * Attribute Bitmap64
  */
-class ReadTestClusterBitmap64 : public ReadAttribute {
+class ReadUnitTestingBitmap64 : public ReadAttribute {
 public:
-    ReadTestClusterBitmap64()
+    ReadUnitTestingBitmap64()
         : ReadAttribute("bitmap64")
     {
     }
 
-    ~ReadTestClusterBitmap64() {}
+    ~ReadUnitTestingBitmap64() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000004) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Bitmap64 response %@", [value description]);
+            NSLog(@"UnitTesting.Bitmap64 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Bitmap64 read Error", error);
+                LogNSError("UnitTesting Bitmap64 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88411,9 +88411,9 @@
     }
 };
 
-class WriteTestClusterBitmap64 : public WriteAttribute {
+class WriteUnitTestingBitmap64 : public WriteAttribute {
 public:
-    WriteTestClusterBitmap64()
+    WriteUnitTestingBitmap64()
         : WriteAttribute("bitmap64")
     {
         AddArgument("attr-name", "bitmap64");
@@ -88421,13 +88421,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterBitmap64() {}
+    ~WriteUnitTestingBitmap64() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000004) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88440,7 +88440,7 @@
                                           params:params
                                       completion:^(NSError * _Nullable error) {
                                           if (error != nil) {
-                                              LogNSError("TestCluster Bitmap64 write Error", error);
+                                              LogNSError("UnitTesting Bitmap64 write Error", error);
                                           }
                                           SetCommandExitStatus(error);
                                       }];
@@ -88451,20 +88451,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterBitmap64 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingBitmap64 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterBitmap64()
+    SubscribeAttributeUnitTestingBitmap64()
         : SubscribeAttribute("bitmap64")
     {
     }
 
-    ~SubscribeAttributeTestClusterBitmap64() {}
+    ~SubscribeAttributeUnitTestingBitmap64() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000004) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88482,7 +88482,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Bitmap64 response %@", [value description]);
+                NSLog(@"UnitTesting.Bitmap64 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88493,27 +88493,27 @@
 /*
  * Attribute Int8u
  */
-class ReadTestClusterInt8u : public ReadAttribute {
+class ReadUnitTestingInt8u : public ReadAttribute {
 public:
-    ReadTestClusterInt8u()
+    ReadUnitTestingInt8u()
         : ReadAttribute("int8u")
     {
     }
 
-    ~ReadTestClusterInt8u() {}
+    ~ReadUnitTestingInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000005) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int8u response %@", [value description]);
+            NSLog(@"UnitTesting.Int8u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int8u read Error", error);
+                LogNSError("UnitTesting Int8u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88521,9 +88521,9 @@
     }
 };
 
-class WriteTestClusterInt8u : public WriteAttribute {
+class WriteUnitTestingInt8u : public WriteAttribute {
 public:
-    WriteTestClusterInt8u()
+    WriteUnitTestingInt8u()
         : WriteAttribute("int8u")
     {
         AddArgument("attr-name", "int8u");
@@ -88531,13 +88531,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt8u() {}
+    ~WriteUnitTestingInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000005) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88550,7 +88550,7 @@
                                        params:params
                                    completion:^(NSError * _Nullable error) {
                                        if (error != nil) {
-                                           LogNSError("TestCluster Int8u write Error", error);
+                                           LogNSError("UnitTesting Int8u write Error", error);
                                        }
                                        SetCommandExitStatus(error);
                                    }];
@@ -88561,20 +88561,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt8u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt8u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt8u()
+    SubscribeAttributeUnitTestingInt8u()
         : SubscribeAttribute("int8u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt8u() {}
+    ~SubscribeAttributeUnitTestingInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000005) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88592,7 +88592,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int8u response %@", [value description]);
+                NSLog(@"UnitTesting.Int8u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88603,27 +88603,27 @@
 /*
  * Attribute Int16u
  */
-class ReadTestClusterInt16u : public ReadAttribute {
+class ReadUnitTestingInt16u : public ReadAttribute {
 public:
-    ReadTestClusterInt16u()
+    ReadUnitTestingInt16u()
         : ReadAttribute("int16u")
     {
     }
 
-    ~ReadTestClusterInt16u() {}
+    ~ReadUnitTestingInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000006) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int16u response %@", [value description]);
+            NSLog(@"UnitTesting.Int16u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int16u read Error", error);
+                LogNSError("UnitTesting Int16u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88631,9 +88631,9 @@
     }
 };
 
-class WriteTestClusterInt16u : public WriteAttribute {
+class WriteUnitTestingInt16u : public WriteAttribute {
 public:
-    WriteTestClusterInt16u()
+    WriteUnitTestingInt16u()
         : WriteAttribute("int16u")
     {
         AddArgument("attr-name", "int16u");
@@ -88641,13 +88641,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt16u() {}
+    ~WriteUnitTestingInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000006) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88660,7 +88660,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int16u write Error", error);
+                                            LogNSError("UnitTesting Int16u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -88671,20 +88671,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt16u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt16u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt16u()
+    SubscribeAttributeUnitTestingInt16u()
         : SubscribeAttribute("int16u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt16u() {}
+    ~SubscribeAttributeUnitTestingInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000006) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88702,7 +88702,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int16u response %@", [value description]);
+                NSLog(@"UnitTesting.Int16u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88713,27 +88713,27 @@
 /*
  * Attribute Int24u
  */
-class ReadTestClusterInt24u : public ReadAttribute {
+class ReadUnitTestingInt24u : public ReadAttribute {
 public:
-    ReadTestClusterInt24u()
+    ReadUnitTestingInt24u()
         : ReadAttribute("int24u")
     {
     }
 
-    ~ReadTestClusterInt24u() {}
+    ~ReadUnitTestingInt24u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000007) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int24u response %@", [value description]);
+            NSLog(@"UnitTesting.Int24u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int24u read Error", error);
+                LogNSError("UnitTesting Int24u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88741,9 +88741,9 @@
     }
 };
 
-class WriteTestClusterInt24u : public WriteAttribute {
+class WriteUnitTestingInt24u : public WriteAttribute {
 public:
-    WriteTestClusterInt24u()
+    WriteUnitTestingInt24u()
         : WriteAttribute("int24u")
     {
         AddArgument("attr-name", "int24u");
@@ -88751,13 +88751,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt24u() {}
+    ~WriteUnitTestingInt24u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000007) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88770,7 +88770,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int24u write Error", error);
+                                            LogNSError("UnitTesting Int24u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -88781,20 +88781,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt24u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt24u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt24u()
+    SubscribeAttributeUnitTestingInt24u()
         : SubscribeAttribute("int24u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt24u() {}
+    ~SubscribeAttributeUnitTestingInt24u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000007) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88812,7 +88812,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int24u response %@", [value description]);
+                NSLog(@"UnitTesting.Int24u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88823,27 +88823,27 @@
 /*
  * Attribute Int32u
  */
-class ReadTestClusterInt32u : public ReadAttribute {
+class ReadUnitTestingInt32u : public ReadAttribute {
 public:
-    ReadTestClusterInt32u()
+    ReadUnitTestingInt32u()
         : ReadAttribute("int32u")
     {
     }
 
-    ~ReadTestClusterInt32u() {}
+    ~ReadUnitTestingInt32u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000008) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int32u response %@", [value description]);
+            NSLog(@"UnitTesting.Int32u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int32u read Error", error);
+                LogNSError("UnitTesting Int32u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88851,9 +88851,9 @@
     }
 };
 
-class WriteTestClusterInt32u : public WriteAttribute {
+class WriteUnitTestingInt32u : public WriteAttribute {
 public:
-    WriteTestClusterInt32u()
+    WriteUnitTestingInt32u()
         : WriteAttribute("int32u")
     {
         AddArgument("attr-name", "int32u");
@@ -88861,13 +88861,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt32u() {}
+    ~WriteUnitTestingInt32u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000008) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88880,7 +88880,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int32u write Error", error);
+                                            LogNSError("UnitTesting Int32u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -88891,20 +88891,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt32u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt32u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt32u()
+    SubscribeAttributeUnitTestingInt32u()
         : SubscribeAttribute("int32u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt32u() {}
+    ~SubscribeAttributeUnitTestingInt32u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000008) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -88922,7 +88922,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int32u response %@", [value description]);
+                NSLog(@"UnitTesting.Int32u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -88933,27 +88933,27 @@
 /*
  * Attribute Int40u
  */
-class ReadTestClusterInt40u : public ReadAttribute {
+class ReadUnitTestingInt40u : public ReadAttribute {
 public:
-    ReadTestClusterInt40u()
+    ReadUnitTestingInt40u()
         : ReadAttribute("int40u")
     {
     }
 
-    ~ReadTestClusterInt40u() {}
+    ~ReadUnitTestingInt40u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000009) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int40u response %@", [value description]);
+            NSLog(@"UnitTesting.Int40u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int40u read Error", error);
+                LogNSError("UnitTesting Int40u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -88961,9 +88961,9 @@
     }
 };
 
-class WriteTestClusterInt40u : public WriteAttribute {
+class WriteUnitTestingInt40u : public WriteAttribute {
 public:
-    WriteTestClusterInt40u()
+    WriteUnitTestingInt40u()
         : WriteAttribute("int40u")
     {
         AddArgument("attr-name", "int40u");
@@ -88971,13 +88971,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt40u() {}
+    ~WriteUnitTestingInt40u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000009) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -88990,7 +88990,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int40u write Error", error);
+                                            LogNSError("UnitTesting Int40u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89001,20 +89001,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt40u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt40u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt40u()
+    SubscribeAttributeUnitTestingInt40u()
         : SubscribeAttribute("int40u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt40u() {}
+    ~SubscribeAttributeUnitTestingInt40u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000009) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89032,7 +89032,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int40u response %@", [value description]);
+                NSLog(@"UnitTesting.Int40u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89043,27 +89043,27 @@
 /*
  * Attribute Int48u
  */
-class ReadTestClusterInt48u : public ReadAttribute {
+class ReadUnitTestingInt48u : public ReadAttribute {
 public:
-    ReadTestClusterInt48u()
+    ReadUnitTestingInt48u()
         : ReadAttribute("int48u")
     {
     }
 
-    ~ReadTestClusterInt48u() {}
+    ~ReadUnitTestingInt48u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000A) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int48u response %@", [value description]);
+            NSLog(@"UnitTesting.Int48u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int48u read Error", error);
+                LogNSError("UnitTesting Int48u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89071,9 +89071,9 @@
     }
 };
 
-class WriteTestClusterInt48u : public WriteAttribute {
+class WriteUnitTestingInt48u : public WriteAttribute {
 public:
-    WriteTestClusterInt48u()
+    WriteUnitTestingInt48u()
         : WriteAttribute("int48u")
     {
         AddArgument("attr-name", "int48u");
@@ -89081,13 +89081,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt48u() {}
+    ~WriteUnitTestingInt48u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89100,7 +89100,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int48u write Error", error);
+                                            LogNSError("UnitTesting Int48u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89111,20 +89111,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt48u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt48u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt48u()
+    SubscribeAttributeUnitTestingInt48u()
         : SubscribeAttribute("int48u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt48u() {}
+    ~SubscribeAttributeUnitTestingInt48u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89142,7 +89142,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int48u response %@", [value description]);
+                NSLog(@"UnitTesting.Int48u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89153,27 +89153,27 @@
 /*
  * Attribute Int56u
  */
-class ReadTestClusterInt56u : public ReadAttribute {
+class ReadUnitTestingInt56u : public ReadAttribute {
 public:
-    ReadTestClusterInt56u()
+    ReadUnitTestingInt56u()
         : ReadAttribute("int56u")
     {
     }
 
-    ~ReadTestClusterInt56u() {}
+    ~ReadUnitTestingInt56u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000B) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int56u response %@", [value description]);
+            NSLog(@"UnitTesting.Int56u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int56u read Error", error);
+                LogNSError("UnitTesting Int56u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89181,9 +89181,9 @@
     }
 };
 
-class WriteTestClusterInt56u : public WriteAttribute {
+class WriteUnitTestingInt56u : public WriteAttribute {
 public:
-    WriteTestClusterInt56u()
+    WriteUnitTestingInt56u()
         : WriteAttribute("int56u")
     {
         AddArgument("attr-name", "int56u");
@@ -89191,13 +89191,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt56u() {}
+    ~WriteUnitTestingInt56u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89210,7 +89210,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int56u write Error", error);
+                                            LogNSError("UnitTesting Int56u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89221,20 +89221,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt56u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt56u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt56u()
+    SubscribeAttributeUnitTestingInt56u()
         : SubscribeAttribute("int56u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt56u() {}
+    ~SubscribeAttributeUnitTestingInt56u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89252,7 +89252,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int56u response %@", [value description]);
+                NSLog(@"UnitTesting.Int56u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89263,27 +89263,27 @@
 /*
  * Attribute Int64u
  */
-class ReadTestClusterInt64u : public ReadAttribute {
+class ReadUnitTestingInt64u : public ReadAttribute {
 public:
-    ReadTestClusterInt64u()
+    ReadUnitTestingInt64u()
         : ReadAttribute("int64u")
     {
     }
 
-    ~ReadTestClusterInt64u() {}
+    ~ReadUnitTestingInt64u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000C) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int64u response %@", [value description]);
+            NSLog(@"UnitTesting.Int64u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int64u read Error", error);
+                LogNSError("UnitTesting Int64u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89291,9 +89291,9 @@
     }
 };
 
-class WriteTestClusterInt64u : public WriteAttribute {
+class WriteUnitTestingInt64u : public WriteAttribute {
 public:
-    WriteTestClusterInt64u()
+    WriteUnitTestingInt64u()
         : WriteAttribute("int64u")
     {
         AddArgument("attr-name", "int64u");
@@ -89301,13 +89301,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt64u() {}
+    ~WriteUnitTestingInt64u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000C) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89320,7 +89320,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int64u write Error", error);
+                                            LogNSError("UnitTesting Int64u write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89331,20 +89331,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt64u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt64u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt64u()
+    SubscribeAttributeUnitTestingInt64u()
         : SubscribeAttribute("int64u")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt64u() {}
+    ~SubscribeAttributeUnitTestingInt64u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000C) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89362,7 +89362,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int64u response %@", [value description]);
+                NSLog(@"UnitTesting.Int64u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89373,27 +89373,27 @@
 /*
  * Attribute Int8s
  */
-class ReadTestClusterInt8s : public ReadAttribute {
+class ReadUnitTestingInt8s : public ReadAttribute {
 public:
-    ReadTestClusterInt8s()
+    ReadUnitTestingInt8s()
         : ReadAttribute("int8s")
     {
     }
 
-    ~ReadTestClusterInt8s() {}
+    ~ReadUnitTestingInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000D) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int8s response %@", [value description]);
+            NSLog(@"UnitTesting.Int8s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int8s read Error", error);
+                LogNSError("UnitTesting Int8s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89401,9 +89401,9 @@
     }
 };
 
-class WriteTestClusterInt8s : public WriteAttribute {
+class WriteUnitTestingInt8s : public WriteAttribute {
 public:
-    WriteTestClusterInt8s()
+    WriteUnitTestingInt8s()
         : WriteAttribute("int8s")
     {
         AddArgument("attr-name", "int8s");
@@ -89411,13 +89411,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt8s() {}
+    ~WriteUnitTestingInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000D) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89430,7 +89430,7 @@
                                        params:params
                                    completion:^(NSError * _Nullable error) {
                                        if (error != nil) {
-                                           LogNSError("TestCluster Int8s write Error", error);
+                                           LogNSError("UnitTesting Int8s write Error", error);
                                        }
                                        SetCommandExitStatus(error);
                                    }];
@@ -89441,20 +89441,20 @@
     int8_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt8s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt8s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt8s()
+    SubscribeAttributeUnitTestingInt8s()
         : SubscribeAttribute("int8s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt8s() {}
+    ~SubscribeAttributeUnitTestingInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000D) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89472,7 +89472,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int8s response %@", [value description]);
+                NSLog(@"UnitTesting.Int8s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89483,27 +89483,27 @@
 /*
  * Attribute Int16s
  */
-class ReadTestClusterInt16s : public ReadAttribute {
+class ReadUnitTestingInt16s : public ReadAttribute {
 public:
-    ReadTestClusterInt16s()
+    ReadUnitTestingInt16s()
         : ReadAttribute("int16s")
     {
     }
 
-    ~ReadTestClusterInt16s() {}
+    ~ReadUnitTestingInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000E) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int16s response %@", [value description]);
+            NSLog(@"UnitTesting.Int16s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int16s read Error", error);
+                LogNSError("UnitTesting Int16s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89511,9 +89511,9 @@
     }
 };
 
-class WriteTestClusterInt16s : public WriteAttribute {
+class WriteUnitTestingInt16s : public WriteAttribute {
 public:
-    WriteTestClusterInt16s()
+    WriteUnitTestingInt16s()
         : WriteAttribute("int16s")
     {
         AddArgument("attr-name", "int16s");
@@ -89521,13 +89521,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt16s() {}
+    ~WriteUnitTestingInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89540,7 +89540,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int16s write Error", error);
+                                            LogNSError("UnitTesting Int16s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89551,20 +89551,20 @@
     int16_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt16s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt16s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt16s()
+    SubscribeAttributeUnitTestingInt16s()
         : SubscribeAttribute("int16s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt16s() {}
+    ~SubscribeAttributeUnitTestingInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89582,7 +89582,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int16s response %@", [value description]);
+                NSLog(@"UnitTesting.Int16s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89593,27 +89593,27 @@
 /*
  * Attribute Int24s
  */
-class ReadTestClusterInt24s : public ReadAttribute {
+class ReadUnitTestingInt24s : public ReadAttribute {
 public:
-    ReadTestClusterInt24s()
+    ReadUnitTestingInt24s()
         : ReadAttribute("int24s")
     {
     }
 
-    ~ReadTestClusterInt24s() {}
+    ~ReadUnitTestingInt24s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000F) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int24s response %@", [value description]);
+            NSLog(@"UnitTesting.Int24s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int24s read Error", error);
+                LogNSError("UnitTesting Int24s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89621,9 +89621,9 @@
     }
 };
 
-class WriteTestClusterInt24s : public WriteAttribute {
+class WriteUnitTestingInt24s : public WriteAttribute {
 public:
-    WriteTestClusterInt24s()
+    WriteUnitTestingInt24s()
         : WriteAttribute("int24s")
     {
         AddArgument("attr-name", "int24s");
@@ -89631,13 +89631,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt24s() {}
+    ~WriteUnitTestingInt24s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000F) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89650,7 +89650,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int24s write Error", error);
+                                            LogNSError("UnitTesting Int24s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89661,20 +89661,20 @@
     int32_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt24s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt24s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt24s()
+    SubscribeAttributeUnitTestingInt24s()
         : SubscribeAttribute("int24s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt24s() {}
+    ~SubscribeAttributeUnitTestingInt24s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000F) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89692,7 +89692,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int24s response %@", [value description]);
+                NSLog(@"UnitTesting.Int24s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89703,27 +89703,27 @@
 /*
  * Attribute Int32s
  */
-class ReadTestClusterInt32s : public ReadAttribute {
+class ReadUnitTestingInt32s : public ReadAttribute {
 public:
-    ReadTestClusterInt32s()
+    ReadUnitTestingInt32s()
         : ReadAttribute("int32s")
     {
     }
 
-    ~ReadTestClusterInt32s() {}
+    ~ReadUnitTestingInt32s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000010) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int32s response %@", [value description]);
+            NSLog(@"UnitTesting.Int32s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int32s read Error", error);
+                LogNSError("UnitTesting Int32s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89731,9 +89731,9 @@
     }
 };
 
-class WriteTestClusterInt32s : public WriteAttribute {
+class WriteUnitTestingInt32s : public WriteAttribute {
 public:
-    WriteTestClusterInt32s()
+    WriteUnitTestingInt32s()
         : WriteAttribute("int32s")
     {
         AddArgument("attr-name", "int32s");
@@ -89741,13 +89741,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt32s() {}
+    ~WriteUnitTestingInt32s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000010) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89760,7 +89760,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int32s write Error", error);
+                                            LogNSError("UnitTesting Int32s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89771,20 +89771,20 @@
     int32_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt32s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt32s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt32s()
+    SubscribeAttributeUnitTestingInt32s()
         : SubscribeAttribute("int32s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt32s() {}
+    ~SubscribeAttributeUnitTestingInt32s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000010) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89802,7 +89802,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int32s response %@", [value description]);
+                NSLog(@"UnitTesting.Int32s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89813,27 +89813,27 @@
 /*
  * Attribute Int40s
  */
-class ReadTestClusterInt40s : public ReadAttribute {
+class ReadUnitTestingInt40s : public ReadAttribute {
 public:
-    ReadTestClusterInt40s()
+    ReadUnitTestingInt40s()
         : ReadAttribute("int40s")
     {
     }
 
-    ~ReadTestClusterInt40s() {}
+    ~ReadUnitTestingInt40s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000011) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int40s response %@", [value description]);
+            NSLog(@"UnitTesting.Int40s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int40s read Error", error);
+                LogNSError("UnitTesting Int40s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89841,9 +89841,9 @@
     }
 };
 
-class WriteTestClusterInt40s : public WriteAttribute {
+class WriteUnitTestingInt40s : public WriteAttribute {
 public:
-    WriteTestClusterInt40s()
+    WriteUnitTestingInt40s()
         : WriteAttribute("int40s")
     {
         AddArgument("attr-name", "int40s");
@@ -89851,13 +89851,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt40s() {}
+    ~WriteUnitTestingInt40s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000011) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89870,7 +89870,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int40s write Error", error);
+                                            LogNSError("UnitTesting Int40s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89881,20 +89881,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt40s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt40s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt40s()
+    SubscribeAttributeUnitTestingInt40s()
         : SubscribeAttribute("int40s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt40s() {}
+    ~SubscribeAttributeUnitTestingInt40s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000011) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -89912,7 +89912,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int40s response %@", [value description]);
+                NSLog(@"UnitTesting.Int40s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -89923,27 +89923,27 @@
 /*
  * Attribute Int48s
  */
-class ReadTestClusterInt48s : public ReadAttribute {
+class ReadUnitTestingInt48s : public ReadAttribute {
 public:
-    ReadTestClusterInt48s()
+    ReadUnitTestingInt48s()
         : ReadAttribute("int48s")
     {
     }
 
-    ~ReadTestClusterInt48s() {}
+    ~ReadUnitTestingInt48s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000012) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int48s response %@", [value description]);
+            NSLog(@"UnitTesting.Int48s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int48s read Error", error);
+                LogNSError("UnitTesting Int48s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -89951,9 +89951,9 @@
     }
 };
 
-class WriteTestClusterInt48s : public WriteAttribute {
+class WriteUnitTestingInt48s : public WriteAttribute {
 public:
-    WriteTestClusterInt48s()
+    WriteUnitTestingInt48s()
         : WriteAttribute("int48s")
     {
         AddArgument("attr-name", "int48s");
@@ -89961,13 +89961,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt48s() {}
+    ~WriteUnitTestingInt48s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000012) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -89980,7 +89980,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int48s write Error", error);
+                                            LogNSError("UnitTesting Int48s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -89991,20 +89991,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt48s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt48s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt48s()
+    SubscribeAttributeUnitTestingInt48s()
         : SubscribeAttribute("int48s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt48s() {}
+    ~SubscribeAttributeUnitTestingInt48s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000012) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90022,7 +90022,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int48s response %@", [value description]);
+                NSLog(@"UnitTesting.Int48s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90033,27 +90033,27 @@
 /*
  * Attribute Int56s
  */
-class ReadTestClusterInt56s : public ReadAttribute {
+class ReadUnitTestingInt56s : public ReadAttribute {
 public:
-    ReadTestClusterInt56s()
+    ReadUnitTestingInt56s()
         : ReadAttribute("int56s")
     {
     }
 
-    ~ReadTestClusterInt56s() {}
+    ~ReadUnitTestingInt56s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000013) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int56s response %@", [value description]);
+            NSLog(@"UnitTesting.Int56s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int56s read Error", error);
+                LogNSError("UnitTesting Int56s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90061,9 +90061,9 @@
     }
 };
 
-class WriteTestClusterInt56s : public WriteAttribute {
+class WriteUnitTestingInt56s : public WriteAttribute {
 public:
-    WriteTestClusterInt56s()
+    WriteUnitTestingInt56s()
         : WriteAttribute("int56s")
     {
         AddArgument("attr-name", "int56s");
@@ -90071,13 +90071,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt56s() {}
+    ~WriteUnitTestingInt56s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000013) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90090,7 +90090,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int56s write Error", error);
+                                            LogNSError("UnitTesting Int56s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -90101,20 +90101,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt56s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt56s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt56s()
+    SubscribeAttributeUnitTestingInt56s()
         : SubscribeAttribute("int56s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt56s() {}
+    ~SubscribeAttributeUnitTestingInt56s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000013) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90132,7 +90132,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int56s response %@", [value description]);
+                NSLog(@"UnitTesting.Int56s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90143,27 +90143,27 @@
 /*
  * Attribute Int64s
  */
-class ReadTestClusterInt64s : public ReadAttribute {
+class ReadUnitTestingInt64s : public ReadAttribute {
 public:
-    ReadTestClusterInt64s()
+    ReadUnitTestingInt64s()
         : ReadAttribute("int64s")
     {
     }
 
-    ~ReadTestClusterInt64s() {}
+    ~ReadUnitTestingInt64s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000014) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Int64s response %@", [value description]);
+            NSLog(@"UnitTesting.Int64s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Int64s read Error", error);
+                LogNSError("UnitTesting Int64s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90171,9 +90171,9 @@
     }
 };
 
-class WriteTestClusterInt64s : public WriteAttribute {
+class WriteUnitTestingInt64s : public WriteAttribute {
 public:
-    WriteTestClusterInt64s()
+    WriteUnitTestingInt64s()
         : WriteAttribute("int64s")
     {
         AddArgument("attr-name", "int64s");
@@ -90181,13 +90181,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterInt64s() {}
+    ~WriteUnitTestingInt64s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000014) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90200,7 +90200,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Int64s write Error", error);
+                                            LogNSError("UnitTesting Int64s write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -90211,20 +90211,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterInt64s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingInt64s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterInt64s()
+    SubscribeAttributeUnitTestingInt64s()
         : SubscribeAttribute("int64s")
     {
     }
 
-    ~SubscribeAttributeTestClusterInt64s() {}
+    ~SubscribeAttributeUnitTestingInt64s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000014) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90242,7 +90242,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Int64s response %@", [value description]);
+                NSLog(@"UnitTesting.Int64s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90253,27 +90253,27 @@
 /*
  * Attribute Enum8
  */
-class ReadTestClusterEnum8 : public ReadAttribute {
+class ReadUnitTestingEnum8 : public ReadAttribute {
 public:
-    ReadTestClusterEnum8()
+    ReadUnitTestingEnum8()
         : ReadAttribute("enum8")
     {
     }
 
-    ~ReadTestClusterEnum8() {}
+    ~ReadUnitTestingEnum8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000015) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Enum8 response %@", [value description]);
+            NSLog(@"UnitTesting.Enum8 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Enum8 read Error", error);
+                LogNSError("UnitTesting Enum8 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90281,9 +90281,9 @@
     }
 };
 
-class WriteTestClusterEnum8 : public WriteAttribute {
+class WriteUnitTestingEnum8 : public WriteAttribute {
 public:
-    WriteTestClusterEnum8()
+    WriteUnitTestingEnum8()
         : WriteAttribute("enum8")
     {
         AddArgument("attr-name", "enum8");
@@ -90291,13 +90291,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterEnum8() {}
+    ~WriteUnitTestingEnum8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000015) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90310,7 +90310,7 @@
                                        params:params
                                    completion:^(NSError * _Nullable error) {
                                        if (error != nil) {
-                                           LogNSError("TestCluster Enum8 write Error", error);
+                                           LogNSError("UnitTesting Enum8 write Error", error);
                                        }
                                        SetCommandExitStatus(error);
                                    }];
@@ -90321,20 +90321,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterEnum8 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingEnum8 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterEnum8()
+    SubscribeAttributeUnitTestingEnum8()
         : SubscribeAttribute("enum8")
     {
     }
 
-    ~SubscribeAttributeTestClusterEnum8() {}
+    ~SubscribeAttributeUnitTestingEnum8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000015) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90352,7 +90352,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Enum8 response %@", [value description]);
+                NSLog(@"UnitTesting.Enum8 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90363,27 +90363,27 @@
 /*
  * Attribute Enum16
  */
-class ReadTestClusterEnum16 : public ReadAttribute {
+class ReadUnitTestingEnum16 : public ReadAttribute {
 public:
-    ReadTestClusterEnum16()
+    ReadUnitTestingEnum16()
         : ReadAttribute("enum16")
     {
     }
 
-    ~ReadTestClusterEnum16() {}
+    ~ReadUnitTestingEnum16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000016) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Enum16 response %@", [value description]);
+            NSLog(@"UnitTesting.Enum16 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Enum16 read Error", error);
+                LogNSError("UnitTesting Enum16 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90391,9 +90391,9 @@
     }
 };
 
-class WriteTestClusterEnum16 : public WriteAttribute {
+class WriteUnitTestingEnum16 : public WriteAttribute {
 public:
-    WriteTestClusterEnum16()
+    WriteUnitTestingEnum16()
         : WriteAttribute("enum16")
     {
         AddArgument("attr-name", "enum16");
@@ -90401,13 +90401,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterEnum16() {}
+    ~WriteUnitTestingEnum16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000016) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90420,7 +90420,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster Enum16 write Error", error);
+                                            LogNSError("UnitTesting Enum16 write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -90431,20 +90431,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterEnum16 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingEnum16 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterEnum16()
+    SubscribeAttributeUnitTestingEnum16()
         : SubscribeAttribute("enum16")
     {
     }
 
-    ~SubscribeAttributeTestClusterEnum16() {}
+    ~SubscribeAttributeUnitTestingEnum16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000016) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90462,7 +90462,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Enum16 response %@", [value description]);
+                NSLog(@"UnitTesting.Enum16 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90473,27 +90473,27 @@
 /*
  * Attribute FloatSingle
  */
-class ReadTestClusterFloatSingle : public ReadAttribute {
+class ReadUnitTestingFloatSingle : public ReadAttribute {
 public:
-    ReadTestClusterFloatSingle()
+    ReadUnitTestingFloatSingle()
         : ReadAttribute("float-single")
     {
     }
 
-    ~ReadTestClusterFloatSingle() {}
+    ~ReadUnitTestingFloatSingle() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000017) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.FloatSingle response %@", [value description]);
+            NSLog(@"UnitTesting.FloatSingle response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster FloatSingle read Error", error);
+                LogNSError("UnitTesting FloatSingle read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90501,9 +90501,9 @@
     }
 };
 
-class WriteTestClusterFloatSingle : public WriteAttribute {
+class WriteUnitTestingFloatSingle : public WriteAttribute {
 public:
-    WriteTestClusterFloatSingle()
+    WriteUnitTestingFloatSingle()
         : WriteAttribute("float-single")
     {
         AddArgument("attr-name", "float-single");
@@ -90511,13 +90511,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterFloatSingle() {}
+    ~WriteUnitTestingFloatSingle() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000017) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90530,7 +90530,7 @@
                                              params:params
                                          completion:^(NSError * _Nullable error) {
                                              if (error != nil) {
-                                                 LogNSError("TestCluster FloatSingle write Error", error);
+                                                 LogNSError("UnitTesting FloatSingle write Error", error);
                                              }
                                              SetCommandExitStatus(error);
                                          }];
@@ -90541,20 +90541,20 @@
     float mValue;
 };
 
-class SubscribeAttributeTestClusterFloatSingle : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingFloatSingle : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterFloatSingle()
+    SubscribeAttributeUnitTestingFloatSingle()
         : SubscribeAttribute("float-single")
     {
     }
 
-    ~SubscribeAttributeTestClusterFloatSingle() {}
+    ~SubscribeAttributeUnitTestingFloatSingle() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000017) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90572,7 +90572,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.FloatSingle response %@", [value description]);
+                NSLog(@"UnitTesting.FloatSingle response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90583,27 +90583,27 @@
 /*
  * Attribute FloatDouble
  */
-class ReadTestClusterFloatDouble : public ReadAttribute {
+class ReadUnitTestingFloatDouble : public ReadAttribute {
 public:
-    ReadTestClusterFloatDouble()
+    ReadUnitTestingFloatDouble()
         : ReadAttribute("float-double")
     {
     }
 
-    ~ReadTestClusterFloatDouble() {}
+    ~ReadUnitTestingFloatDouble() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000018) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.FloatDouble response %@", [value description]);
+            NSLog(@"UnitTesting.FloatDouble response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster FloatDouble read Error", error);
+                LogNSError("UnitTesting FloatDouble read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90611,9 +90611,9 @@
     }
 };
 
-class WriteTestClusterFloatDouble : public WriteAttribute {
+class WriteUnitTestingFloatDouble : public WriteAttribute {
 public:
-    WriteTestClusterFloatDouble()
+    WriteUnitTestingFloatDouble()
         : WriteAttribute("float-double")
     {
         AddArgument("attr-name", "float-double");
@@ -90621,13 +90621,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterFloatDouble() {}
+    ~WriteUnitTestingFloatDouble() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000018) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90640,7 +90640,7 @@
                                              params:params
                                          completion:^(NSError * _Nullable error) {
                                              if (error != nil) {
-                                                 LogNSError("TestCluster FloatDouble write Error", error);
+                                                 LogNSError("UnitTesting FloatDouble write Error", error);
                                              }
                                              SetCommandExitStatus(error);
                                          }];
@@ -90651,20 +90651,20 @@
     double mValue;
 };
 
-class SubscribeAttributeTestClusterFloatDouble : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingFloatDouble : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterFloatDouble()
+    SubscribeAttributeUnitTestingFloatDouble()
         : SubscribeAttribute("float-double")
     {
     }
 
-    ~SubscribeAttributeTestClusterFloatDouble() {}
+    ~SubscribeAttributeUnitTestingFloatDouble() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000018) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90682,7 +90682,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.FloatDouble response %@", [value description]);
+                NSLog(@"UnitTesting.FloatDouble response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90693,27 +90693,27 @@
 /*
  * Attribute OctetString
  */
-class ReadTestClusterOctetString : public ReadAttribute {
+class ReadUnitTestingOctetString : public ReadAttribute {
 public:
-    ReadTestClusterOctetString()
+    ReadUnitTestingOctetString()
         : ReadAttribute("octet-string")
     {
     }
 
-    ~ReadTestClusterOctetString() {}
+    ~ReadUnitTestingOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000019) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.OctetString response %@", [value description]);
+            NSLog(@"UnitTesting.OctetString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster OctetString read Error", error);
+                LogNSError("UnitTesting OctetString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90721,9 +90721,9 @@
     }
 };
 
-class WriteTestClusterOctetString : public WriteAttribute {
+class WriteUnitTestingOctetString : public WriteAttribute {
 public:
-    WriteTestClusterOctetString()
+    WriteUnitTestingOctetString()
         : WriteAttribute("octet-string")
     {
         AddArgument("attr-name", "octet-string");
@@ -90731,13 +90731,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterOctetString() {}
+    ~WriteUnitTestingOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000019) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90750,7 +90750,7 @@
                                              params:params
                                          completion:^(NSError * _Nullable error) {
                                              if (error != nil) {
-                                                 LogNSError("TestCluster OctetString write Error", error);
+                                                 LogNSError("UnitTesting OctetString write Error", error);
                                              }
                                              SetCommandExitStatus(error);
                                          }];
@@ -90761,20 +90761,20 @@
     chip::ByteSpan mValue;
 };
 
-class SubscribeAttributeTestClusterOctetString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingOctetString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterOctetString()
+    SubscribeAttributeUnitTestingOctetString()
         : SubscribeAttribute("octet-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterOctetString() {}
+    ~SubscribeAttributeUnitTestingOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000019) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90792,7 +90792,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.OctetString response %@", [value description]);
+                NSLog(@"UnitTesting.OctetString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90803,27 +90803,27 @@
 /*
  * Attribute ListInt8u
  */
-class ReadTestClusterListInt8u : public ReadAttribute {
+class ReadUnitTestingListInt8u : public ReadAttribute {
 public:
-    ReadTestClusterListInt8u()
+    ReadUnitTestingListInt8u()
         : ReadAttribute("list-int8u")
     {
     }
 
-    ~ReadTestClusterListInt8u() {}
+    ~ReadUnitTestingListInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001A) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.ListInt8u response %@", [value description]);
+            NSLog(@"UnitTesting.ListInt8u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster ListInt8u read Error", error);
+                LogNSError("UnitTesting ListInt8u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90831,9 +90831,9 @@
     }
 };
 
-class WriteTestClusterListInt8u : public WriteAttribute {
+class WriteUnitTestingListInt8u : public WriteAttribute {
 public:
-    WriteTestClusterListInt8u()
+    WriteUnitTestingListInt8u()
         : WriteAttribute("list-int8u")
         , mComplex(&mValue)
     {
@@ -90842,13 +90842,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterListInt8u() {}
+    ~WriteUnitTestingListInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90870,7 +90870,7 @@
                                            params:params
                                        completion:^(NSError * _Nullable error) {
                                            if (error != nil) {
-                                               LogNSError("TestCluster ListInt8u write Error", error);
+                                               LogNSError("UnitTesting ListInt8u write Error", error);
                                            }
                                            SetCommandExitStatus(error);
                                        }];
@@ -90882,20 +90882,20 @@
     TypedComplexArgument<chip::app::DataModel::List<const uint8_t>> mComplex;
 };
 
-class SubscribeAttributeTestClusterListInt8u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingListInt8u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterListInt8u()
+    SubscribeAttributeUnitTestingListInt8u()
         : SubscribeAttribute("list-int8u")
     {
     }
 
-    ~SubscribeAttributeTestClusterListInt8u() {}
+    ~SubscribeAttributeUnitTestingListInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -90913,7 +90913,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListInt8u response %@", [value description]);
+                NSLog(@"UnitTesting.ListInt8u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -90924,27 +90924,27 @@
 /*
  * Attribute ListOctetString
  */
-class ReadTestClusterListOctetString : public ReadAttribute {
+class ReadUnitTestingListOctetString : public ReadAttribute {
 public:
-    ReadTestClusterListOctetString()
+    ReadUnitTestingListOctetString()
         : ReadAttribute("list-octet-string")
     {
     }
 
-    ~ReadTestClusterListOctetString() {}
+    ~ReadUnitTestingListOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001B) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.ListOctetString response %@", [value description]);
+            NSLog(@"UnitTesting.ListOctetString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster ListOctetString read Error", error);
+                LogNSError("UnitTesting ListOctetString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -90952,9 +90952,9 @@
     }
 };
 
-class WriteTestClusterListOctetString : public WriteAttribute {
+class WriteUnitTestingListOctetString : public WriteAttribute {
 public:
-    WriteTestClusterListOctetString()
+    WriteUnitTestingListOctetString()
         : WriteAttribute("list-octet-string")
         , mComplex(&mValue)
     {
@@ -90963,13 +90963,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterListOctetString() {}
+    ~WriteUnitTestingListOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -90991,7 +90991,7 @@
                                                  params:params
                                              completion:^(NSError * _Nullable error) {
                                                  if (error != nil) {
-                                                     LogNSError("TestCluster ListOctetString write Error", error);
+                                                     LogNSError("UnitTesting ListOctetString write Error", error);
                                                  }
                                                  SetCommandExitStatus(error);
                                              }];
@@ -91003,20 +91003,20 @@
     TypedComplexArgument<chip::app::DataModel::List<const chip::ByteSpan>> mComplex;
 };
 
-class SubscribeAttributeTestClusterListOctetString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingListOctetString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterListOctetString()
+    SubscribeAttributeUnitTestingListOctetString()
         : SubscribeAttribute("list-octet-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterListOctetString() {}
+    ~SubscribeAttributeUnitTestingListOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91034,7 +91034,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListOctetString response %@", [value description]);
+                NSLog(@"UnitTesting.ListOctetString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91045,27 +91045,27 @@
 /*
  * Attribute ListStructOctetString
  */
-class ReadTestClusterListStructOctetString : public ReadAttribute {
+class ReadUnitTestingListStructOctetString : public ReadAttribute {
 public:
-    ReadTestClusterListStructOctetString()
+    ReadUnitTestingListStructOctetString()
         : ReadAttribute("list-struct-octet-string")
     {
     }
 
-    ~ReadTestClusterListStructOctetString() {}
+    ~ReadUnitTestingListStructOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001C) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.ListStructOctetString response %@", [value description]);
+            NSLog(@"UnitTesting.ListStructOctetString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster ListStructOctetString read Error", error);
+                LogNSError("UnitTesting ListStructOctetString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91073,9 +91073,9 @@
     }
 };
 
-class WriteTestClusterListStructOctetString : public WriteAttribute {
+class WriteUnitTestingListStructOctetString : public WriteAttribute {
 public:
-    WriteTestClusterListStructOctetString()
+    WriteUnitTestingListStructOctetString()
         : WriteAttribute("list-struct-octet-string")
         , mComplex(&mValue)
     {
@@ -91084,13 +91084,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterListStructOctetString() {}
+    ~WriteUnitTestingListStructOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001C) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91101,8 +91101,8 @@
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mValue) {
-                MTRTestClusterClusterTestListStructOctet * newElement_0;
-                newElement_0 = [MTRTestClusterClusterTestListStructOctet new];
+                MTRUnitTestingClusterTestListStructOctet * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterTestListStructOctet new];
                 newElement_0.member1 = [NSNumber numberWithUnsignedLongLong:entry_0.member1];
                 newElement_0.member2 = [NSData dataWithBytes:entry_0.member2.data() length:entry_0.member2.size()];
                 [array_0 addObject:newElement_0];
@@ -91114,7 +91114,7 @@
                                                        params:params
                                                    completion:^(NSError * _Nullable error) {
                                                        if (error != nil) {
-                                                           LogNSError("TestCluster ListStructOctetString write Error", error);
+                                                           LogNSError("UnitTesting ListStructOctetString write Error", error);
                                                        }
                                                        SetCommandExitStatus(error);
                                                    }];
@@ -91122,25 +91122,25 @@
     }
 
 private:
-    chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type> mValue;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type>>
+    chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type> mValue;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::Type>>
         mComplex;
 };
 
-class SubscribeAttributeTestClusterListStructOctetString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingListStructOctetString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterListStructOctetString()
+    SubscribeAttributeUnitTestingListStructOctetString()
         : SubscribeAttribute("list-struct-octet-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterListStructOctetString() {}
+    ~SubscribeAttributeUnitTestingListStructOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001C) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91158,7 +91158,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListStructOctetString response %@", [value description]);
+                NSLog(@"UnitTesting.ListStructOctetString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91169,27 +91169,27 @@
 /*
  * Attribute LongOctetString
  */
-class ReadTestClusterLongOctetString : public ReadAttribute {
+class ReadUnitTestingLongOctetString : public ReadAttribute {
 public:
-    ReadTestClusterLongOctetString()
+    ReadUnitTestingLongOctetString()
         : ReadAttribute("long-octet-string")
     {
     }
 
-    ~ReadTestClusterLongOctetString() {}
+    ~ReadUnitTestingLongOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001D) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.LongOctetString response %@", [value description]);
+            NSLog(@"UnitTesting.LongOctetString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster LongOctetString read Error", error);
+                LogNSError("UnitTesting LongOctetString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91197,9 +91197,9 @@
     }
 };
 
-class WriteTestClusterLongOctetString : public WriteAttribute {
+class WriteUnitTestingLongOctetString : public WriteAttribute {
 public:
-    WriteTestClusterLongOctetString()
+    WriteUnitTestingLongOctetString()
         : WriteAttribute("long-octet-string")
     {
         AddArgument("attr-name", "long-octet-string");
@@ -91207,13 +91207,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterLongOctetString() {}
+    ~WriteUnitTestingLongOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001D) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91226,7 +91226,7 @@
                                                  params:params
                                              completion:^(NSError * _Nullable error) {
                                                  if (error != nil) {
-                                                     LogNSError("TestCluster LongOctetString write Error", error);
+                                                     LogNSError("UnitTesting LongOctetString write Error", error);
                                                  }
                                                  SetCommandExitStatus(error);
                                              }];
@@ -91237,20 +91237,20 @@
     chip::ByteSpan mValue;
 };
 
-class SubscribeAttributeTestClusterLongOctetString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingLongOctetString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterLongOctetString()
+    SubscribeAttributeUnitTestingLongOctetString()
         : SubscribeAttribute("long-octet-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterLongOctetString() {}
+    ~SubscribeAttributeUnitTestingLongOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001D) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91268,7 +91268,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.LongOctetString response %@", [value description]);
+                NSLog(@"UnitTesting.LongOctetString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91279,27 +91279,27 @@
 /*
  * Attribute CharString
  */
-class ReadTestClusterCharString : public ReadAttribute {
+class ReadUnitTestingCharString : public ReadAttribute {
 public:
-    ReadTestClusterCharString()
+    ReadUnitTestingCharString()
         : ReadAttribute("char-string")
     {
     }
 
-    ~ReadTestClusterCharString() {}
+    ~ReadUnitTestingCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001E) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.CharString response %@", [value description]);
+            NSLog(@"UnitTesting.CharString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster CharString read Error", error);
+                LogNSError("UnitTesting CharString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91307,9 +91307,9 @@
     }
 };
 
-class WriteTestClusterCharString : public WriteAttribute {
+class WriteUnitTestingCharString : public WriteAttribute {
 public:
-    WriteTestClusterCharString()
+    WriteUnitTestingCharString()
         : WriteAttribute("char-string")
     {
         AddArgument("attr-name", "char-string");
@@ -91317,13 +91317,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterCharString() {}
+    ~WriteUnitTestingCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91338,7 +91338,7 @@
                                             params:params
                                         completion:^(NSError * _Nullable error) {
                                             if (error != nil) {
-                                                LogNSError("TestCluster CharString write Error", error);
+                                                LogNSError("UnitTesting CharString write Error", error);
                                             }
                                             SetCommandExitStatus(error);
                                         }];
@@ -91349,20 +91349,20 @@
     chip::ByteSpan mValue;
 };
 
-class SubscribeAttributeTestClusterCharString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingCharString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterCharString()
+    SubscribeAttributeUnitTestingCharString()
         : SubscribeAttribute("char-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterCharString() {}
+    ~SubscribeAttributeUnitTestingCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91380,7 +91380,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.CharString response %@", [value description]);
+                NSLog(@"UnitTesting.CharString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91391,27 +91391,27 @@
 /*
  * Attribute LongCharString
  */
-class ReadTestClusterLongCharString : public ReadAttribute {
+class ReadUnitTestingLongCharString : public ReadAttribute {
 public:
-    ReadTestClusterLongCharString()
+    ReadUnitTestingLongCharString()
         : ReadAttribute("long-char-string")
     {
     }
 
-    ~ReadTestClusterLongCharString() {}
+    ~ReadUnitTestingLongCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001F) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.LongCharString response %@", [value description]);
+            NSLog(@"UnitTesting.LongCharString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster LongCharString read Error", error);
+                LogNSError("UnitTesting LongCharString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91419,9 +91419,9 @@
     }
 };
 
-class WriteTestClusterLongCharString : public WriteAttribute {
+class WriteUnitTestingLongCharString : public WriteAttribute {
 public:
-    WriteTestClusterLongCharString()
+    WriteUnitTestingLongCharString()
         : WriteAttribute("long-char-string")
     {
         AddArgument("attr-name", "long-char-string");
@@ -91429,13 +91429,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterLongCharString() {}
+    ~WriteUnitTestingLongCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001F) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91450,7 +91450,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster LongCharString write Error", error);
+                                                    LogNSError("UnitTesting LongCharString write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -91461,20 +91461,20 @@
     chip::ByteSpan mValue;
 };
 
-class SubscribeAttributeTestClusterLongCharString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingLongCharString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterLongCharString()
+    SubscribeAttributeUnitTestingLongCharString()
         : SubscribeAttribute("long-char-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterLongCharString() {}
+    ~SubscribeAttributeUnitTestingLongCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001F) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91492,7 +91492,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.LongCharString response %@", [value description]);
+                NSLog(@"UnitTesting.LongCharString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91503,27 +91503,27 @@
 /*
  * Attribute EpochUs
  */
-class ReadTestClusterEpochUs : public ReadAttribute {
+class ReadUnitTestingEpochUs : public ReadAttribute {
 public:
-    ReadTestClusterEpochUs()
+    ReadUnitTestingEpochUs()
         : ReadAttribute("epoch-us")
     {
     }
 
-    ~ReadTestClusterEpochUs() {}
+    ~ReadUnitTestingEpochUs() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000020) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.EpochUs response %@", [value description]);
+            NSLog(@"UnitTesting.EpochUs response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster EpochUs read Error", error);
+                LogNSError("UnitTesting EpochUs read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91531,9 +91531,9 @@
     }
 };
 
-class WriteTestClusterEpochUs : public WriteAttribute {
+class WriteUnitTestingEpochUs : public WriteAttribute {
 public:
-    WriteTestClusterEpochUs()
+    WriteUnitTestingEpochUs()
         : WriteAttribute("epoch-us")
     {
         AddArgument("attr-name", "epoch-us");
@@ -91541,13 +91541,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterEpochUs() {}
+    ~WriteUnitTestingEpochUs() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000020) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91560,7 +91560,7 @@
                                          params:params
                                      completion:^(NSError * _Nullable error) {
                                          if (error != nil) {
-                                             LogNSError("TestCluster EpochUs write Error", error);
+                                             LogNSError("UnitTesting EpochUs write Error", error);
                                          }
                                          SetCommandExitStatus(error);
                                      }];
@@ -91571,20 +91571,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterEpochUs : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingEpochUs : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterEpochUs()
+    SubscribeAttributeUnitTestingEpochUs()
         : SubscribeAttribute("epoch-us")
     {
     }
 
-    ~SubscribeAttributeTestClusterEpochUs() {}
+    ~SubscribeAttributeUnitTestingEpochUs() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000020) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91602,7 +91602,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.EpochUs response %@", [value description]);
+                NSLog(@"UnitTesting.EpochUs response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91613,27 +91613,27 @@
 /*
  * Attribute EpochS
  */
-class ReadTestClusterEpochS : public ReadAttribute {
+class ReadUnitTestingEpochS : public ReadAttribute {
 public:
-    ReadTestClusterEpochS()
+    ReadUnitTestingEpochS()
         : ReadAttribute("epoch-s")
     {
     }
 
-    ~ReadTestClusterEpochS() {}
+    ~ReadUnitTestingEpochS() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000021) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.EpochS response %@", [value description]);
+            NSLog(@"UnitTesting.EpochS response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster EpochS read Error", error);
+                LogNSError("UnitTesting EpochS read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91641,9 +91641,9 @@
     }
 };
 
-class WriteTestClusterEpochS : public WriteAttribute {
+class WriteUnitTestingEpochS : public WriteAttribute {
 public:
-    WriteTestClusterEpochS()
+    WriteUnitTestingEpochS()
         : WriteAttribute("epoch-s")
     {
         AddArgument("attr-name", "epoch-s");
@@ -91651,13 +91651,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterEpochS() {}
+    ~WriteUnitTestingEpochS() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000021) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91670,7 +91670,7 @@
                                         params:params
                                     completion:^(NSError * _Nullable error) {
                                         if (error != nil) {
-                                            LogNSError("TestCluster EpochS write Error", error);
+                                            LogNSError("UnitTesting EpochS write Error", error);
                                         }
                                         SetCommandExitStatus(error);
                                     }];
@@ -91681,20 +91681,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterEpochS : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingEpochS : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterEpochS()
+    SubscribeAttributeUnitTestingEpochS()
         : SubscribeAttribute("epoch-s")
     {
     }
 
-    ~SubscribeAttributeTestClusterEpochS() {}
+    ~SubscribeAttributeUnitTestingEpochS() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000021) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91712,7 +91712,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.EpochS response %@", [value description]);
+                NSLog(@"UnitTesting.EpochS response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91723,27 +91723,27 @@
 /*
  * Attribute VendorId
  */
-class ReadTestClusterVendorId : public ReadAttribute {
+class ReadUnitTestingVendorId : public ReadAttribute {
 public:
-    ReadTestClusterVendorId()
+    ReadUnitTestingVendorId()
         : ReadAttribute("vendor-id")
     {
     }
 
-    ~ReadTestClusterVendorId() {}
+    ~ReadUnitTestingVendorId() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000022) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.VendorId response %@", [value description]);
+            NSLog(@"UnitTesting.VendorId response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster VendorId read Error", error);
+                LogNSError("UnitTesting VendorId read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -91751,9 +91751,9 @@
     }
 };
 
-class WriteTestClusterVendorId : public WriteAttribute {
+class WriteUnitTestingVendorId : public WriteAttribute {
 public:
-    WriteTestClusterVendorId()
+    WriteUnitTestingVendorId()
         : WriteAttribute("vendor-id")
     {
         AddArgument("attr-name", "vendor-id");
@@ -91761,13 +91761,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterVendorId() {}
+    ~WriteUnitTestingVendorId() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000022) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91780,7 +91780,7 @@
                                           params:params
                                       completion:^(NSError * _Nullable error) {
                                           if (error != nil) {
-                                              LogNSError("TestCluster VendorId write Error", error);
+                                              LogNSError("UnitTesting VendorId write Error", error);
                                           }
                                           SetCommandExitStatus(error);
                                       }];
@@ -91791,20 +91791,20 @@
     chip::VendorId mValue;
 };
 
-class SubscribeAttributeTestClusterVendorId : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingVendorId : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterVendorId()
+    SubscribeAttributeUnitTestingVendorId()
         : SubscribeAttribute("vendor-id")
     {
     }
 
-    ~SubscribeAttributeTestClusterVendorId() {}
+    ~SubscribeAttributeUnitTestingVendorId() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000022) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -91822,7 +91822,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.VendorId response %@", [value description]);
+                NSLog(@"UnitTesting.VendorId response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -91833,28 +91833,28 @@
 /*
  * Attribute ListNullablesAndOptionalsStruct
  */
-class ReadTestClusterListNullablesAndOptionalsStruct : public ReadAttribute {
+class ReadUnitTestingListNullablesAndOptionalsStruct : public ReadAttribute {
 public:
-    ReadTestClusterListNullablesAndOptionalsStruct()
+    ReadUnitTestingListNullablesAndOptionalsStruct()
         : ReadAttribute("list-nullables-and-optionals-struct")
     {
     }
 
-    ~ReadTestClusterListNullablesAndOptionalsStruct() {}
+    ~ReadUnitTestingListNullablesAndOptionalsStruct() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000023) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster
             readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListNullablesAndOptionalsStruct response %@", [value description]);
+                NSLog(@"UnitTesting.ListNullablesAndOptionalsStruct response %@", [value description]);
                 if (error != nil) {
-                    LogNSError("TestCluster ListNullablesAndOptionalsStruct read Error", error);
+                    LogNSError("UnitTesting ListNullablesAndOptionalsStruct read Error", error);
                 }
                 SetCommandExitStatus(error);
             }];
@@ -91862,9 +91862,9 @@
     }
 };
 
-class WriteTestClusterListNullablesAndOptionalsStruct : public WriteAttribute {
+class WriteUnitTestingListNullablesAndOptionalsStruct : public WriteAttribute {
 public:
-    WriteTestClusterListNullablesAndOptionalsStruct()
+    WriteUnitTestingListNullablesAndOptionalsStruct()
         : WriteAttribute("list-nullables-and-optionals-struct")
         , mComplex(&mValue)
     {
@@ -91873,13 +91873,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterListNullablesAndOptionalsStruct() {}
+    ~WriteUnitTestingListNullablesAndOptionalsStruct() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000023) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -91890,8 +91890,8 @@
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mValue) {
-                MTRTestClusterClusterNullablesAndOptionalsStruct * newElement_0;
-                newElement_0 = [MTRTestClusterClusterNullablesAndOptionalsStruct new];
+                MTRUnitTestingClusterNullablesAndOptionalsStruct * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterNullablesAndOptionalsStruct new];
                 if (entry_0.nullableInt.IsNull()) {
                     newElement_0.nullableInt = nil;
                 } else {
@@ -91941,7 +91941,7 @@
                 if (entry_0.nullableStruct.IsNull()) {
                     newElement_0.nullableStruct = nil;
                 } else {
-                    newElement_0.nullableStruct = [MTRTestClusterClusterSimpleStruct new];
+                    newElement_0.nullableStruct = [MTRUnitTestingClusterSimpleStruct new];
                     newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a];
                     newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b];
                     newElement_0.nullableStruct.c =
@@ -91956,7 +91956,7 @@
                     newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h];
                 }
                 if (entry_0.optionalStruct.HasValue()) {
-                    newElement_0.optionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                    newElement_0.optionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                     newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a];
                     newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b];
                     newElement_0.optionalStruct.c =
@@ -91976,7 +91976,7 @@
                     if (entry_0.nullableOptionalStruct.Value().IsNull()) {
                         newElement_0.nullableOptionalStruct = nil;
                     } else {
-                        newElement_0.nullableOptionalStruct = [MTRTestClusterClusterSimpleStruct new];
+                        newElement_0.nullableOptionalStruct = [MTRUnitTestingClusterSimpleStruct new];
                         newElement_0.nullableOptionalStruct.a =
                             [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a];
                         newElement_0.nullableOptionalStruct.b =
@@ -92053,7 +92053,7 @@
                                                              completion:^(NSError * _Nullable error) {
                                                                  if (error != nil) {
                                                                      LogNSError(
-                                                                         "TestCluster ListNullablesAndOptionalsStruct write Error",
+                                                                         "UnitTesting ListNullablesAndOptionalsStruct write Error",
                                                                          error);
                                                                  }
                                                                  SetCommandExitStatus(error);
@@ -92062,26 +92062,26 @@
     }
 
 private:
-    chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type> mValue;
+    chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type> mValue;
     TypedComplexArgument<
-        chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type>>
+        chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::Type>>
         mComplex;
 };
 
-class SubscribeAttributeTestClusterListNullablesAndOptionalsStruct : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterListNullablesAndOptionalsStruct()
+    SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct()
         : SubscribeAttribute("list-nullables-and-optionals-struct")
     {
     }
 
-    ~SubscribeAttributeTestClusterListNullablesAndOptionalsStruct() {}
+    ~SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000023) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92099,7 +92099,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListNullablesAndOptionalsStruct response %@", [value description]);
+                NSLog(@"UnitTesting.ListNullablesAndOptionalsStruct response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92110,27 +92110,27 @@
 /*
  * Attribute EnumAttr
  */
-class ReadTestClusterEnumAttr : public ReadAttribute {
+class ReadUnitTestingEnumAttr : public ReadAttribute {
 public:
-    ReadTestClusterEnumAttr()
+    ReadUnitTestingEnumAttr()
         : ReadAttribute("enum-attr")
     {
     }
 
-    ~ReadTestClusterEnumAttr() {}
+    ~ReadUnitTestingEnumAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000024) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.EnumAttr response %@", [value description]);
+            NSLog(@"UnitTesting.EnumAttr response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster EnumAttr read Error", error);
+                LogNSError("UnitTesting EnumAttr read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92138,9 +92138,9 @@
     }
 };
 
-class WriteTestClusterEnumAttr : public WriteAttribute {
+class WriteUnitTestingEnumAttr : public WriteAttribute {
 public:
-    WriteTestClusterEnumAttr()
+    WriteUnitTestingEnumAttr()
         : WriteAttribute("enum-attr")
     {
         AddArgument("attr-name", "enum-attr");
@@ -92148,13 +92148,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterEnumAttr() {}
+    ~WriteUnitTestingEnumAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000024) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92167,7 +92167,7 @@
                                           params:params
                                       completion:^(NSError * _Nullable error) {
                                           if (error != nil) {
-                                              LogNSError("TestCluster EnumAttr write Error", error);
+                                              LogNSError("UnitTesting EnumAttr write Error", error);
                                           }
                                           SetCommandExitStatus(error);
                                       }];
@@ -92178,20 +92178,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterEnumAttr : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingEnumAttr : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterEnumAttr()
+    SubscribeAttributeUnitTestingEnumAttr()
         : SubscribeAttribute("enum-attr")
     {
     }
 
-    ~SubscribeAttributeTestClusterEnumAttr() {}
+    ~SubscribeAttributeUnitTestingEnumAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000024) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92209,7 +92209,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.EnumAttr response %@", [value description]);
+                NSLog(@"UnitTesting.EnumAttr response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92220,28 +92220,28 @@
 /*
  * Attribute StructAttr
  */
-class ReadTestClusterStructAttr : public ReadAttribute {
+class ReadUnitTestingStructAttr : public ReadAttribute {
 public:
-    ReadTestClusterStructAttr()
+    ReadUnitTestingStructAttr()
         : ReadAttribute("struct-attr")
     {
     }
 
-    ~ReadTestClusterStructAttr() {}
+    ~ReadUnitTestingStructAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000025) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeStructAttrWithCompletion:^(
-            MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.StructAttr response %@", [value description]);
+            MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
+            NSLog(@"UnitTesting.StructAttr response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster StructAttr read Error", error);
+                LogNSError("UnitTesting StructAttr read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92249,9 +92249,9 @@
     }
 };
 
-class WriteTestClusterStructAttr : public WriteAttribute {
+class WriteUnitTestingStructAttr : public WriteAttribute {
 public:
-    WriteTestClusterStructAttr()
+    WriteUnitTestingStructAttr()
         : WriteAttribute("struct-attr")
         , mComplex(&mValue)
     {
@@ -92260,21 +92260,21 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterStructAttr() {}
+    ~WriteUnitTestingStructAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000025) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
         params.timedWriteTimeout
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil;
-        MTRTestClusterClusterSimpleStruct * _Nonnull value;
-        value = [MTRTestClusterClusterSimpleStruct new];
+        MTRUnitTestingClusterSimpleStruct * _Nonnull value;
+        value = [MTRUnitTestingClusterSimpleStruct new];
         value.a = [NSNumber numberWithUnsignedChar:mValue.a];
         value.b = [NSNumber numberWithBool:mValue.b];
         value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mValue.c)];
@@ -92288,7 +92288,7 @@
                                             params:params
                                         completion:^(NSError * _Nullable error) {
                                             if (error != nil) {
-                                                LogNSError("TestCluster StructAttr write Error", error);
+                                                LogNSError("UnitTesting StructAttr write Error", error);
                                             }
                                             SetCommandExitStatus(error);
                                         }];
@@ -92296,24 +92296,24 @@
     }
 
 private:
-    chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type mValue;
-    TypedComplexArgument<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type> mComplex;
+    chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type mValue;
+    TypedComplexArgument<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type> mComplex;
 };
 
-class SubscribeAttributeTestClusterStructAttr : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingStructAttr : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterStructAttr()
+    SubscribeAttributeUnitTestingStructAttr()
         : SubscribeAttribute("struct-attr")
     {
     }
 
-    ~SubscribeAttributeTestClusterStructAttr() {}
+    ~SubscribeAttributeUnitTestingStructAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000025) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92330,8 +92330,8 @@
             subscriptionEstablished:^() {
                 mSubscriptionEstablished = YES;
             }
-            reportHandler:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.StructAttr response %@", [value description]);
+            reportHandler:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
+                NSLog(@"UnitTesting.StructAttr response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92342,27 +92342,27 @@
 /*
  * Attribute RangeRestrictedInt8u
  */
-class ReadTestClusterRangeRestrictedInt8u : public ReadAttribute {
+class ReadUnitTestingRangeRestrictedInt8u : public ReadAttribute {
 public:
-    ReadTestClusterRangeRestrictedInt8u()
+    ReadUnitTestingRangeRestrictedInt8u()
         : ReadAttribute("range-restricted-int8u")
     {
     }
 
-    ~ReadTestClusterRangeRestrictedInt8u() {}
+    ~ReadUnitTestingRangeRestrictedInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000026) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.RangeRestrictedInt8u response %@", [value description]);
+            NSLog(@"UnitTesting.RangeRestrictedInt8u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster RangeRestrictedInt8u read Error", error);
+                LogNSError("UnitTesting RangeRestrictedInt8u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92370,9 +92370,9 @@
     }
 };
 
-class WriteTestClusterRangeRestrictedInt8u : public WriteAttribute {
+class WriteUnitTestingRangeRestrictedInt8u : public WriteAttribute {
 public:
-    WriteTestClusterRangeRestrictedInt8u()
+    WriteUnitTestingRangeRestrictedInt8u()
         : WriteAttribute("range-restricted-int8u")
     {
         AddArgument("attr-name", "range-restricted-int8u");
@@ -92380,13 +92380,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterRangeRestrictedInt8u() {}
+    ~WriteUnitTestingRangeRestrictedInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000026) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92399,7 +92399,7 @@
                                                       params:params
                                                   completion:^(NSError * _Nullable error) {
                                                       if (error != nil) {
-                                                          LogNSError("TestCluster RangeRestrictedInt8u write Error", error);
+                                                          LogNSError("UnitTesting RangeRestrictedInt8u write Error", error);
                                                       }
                                                       SetCommandExitStatus(error);
                                                   }];
@@ -92410,20 +92410,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterRangeRestrictedInt8u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingRangeRestrictedInt8u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterRangeRestrictedInt8u()
+    SubscribeAttributeUnitTestingRangeRestrictedInt8u()
         : SubscribeAttribute("range-restricted-int8u")
     {
     }
 
-    ~SubscribeAttributeTestClusterRangeRestrictedInt8u() {}
+    ~SubscribeAttributeUnitTestingRangeRestrictedInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000026) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92441,7 +92441,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.RangeRestrictedInt8u response %@", [value description]);
+                NSLog(@"UnitTesting.RangeRestrictedInt8u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92452,27 +92452,27 @@
 /*
  * Attribute RangeRestrictedInt8s
  */
-class ReadTestClusterRangeRestrictedInt8s : public ReadAttribute {
+class ReadUnitTestingRangeRestrictedInt8s : public ReadAttribute {
 public:
-    ReadTestClusterRangeRestrictedInt8s()
+    ReadUnitTestingRangeRestrictedInt8s()
         : ReadAttribute("range-restricted-int8s")
     {
     }
 
-    ~ReadTestClusterRangeRestrictedInt8s() {}
+    ~ReadUnitTestingRangeRestrictedInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000027) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.RangeRestrictedInt8s response %@", [value description]);
+            NSLog(@"UnitTesting.RangeRestrictedInt8s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster RangeRestrictedInt8s read Error", error);
+                LogNSError("UnitTesting RangeRestrictedInt8s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92480,9 +92480,9 @@
     }
 };
 
-class WriteTestClusterRangeRestrictedInt8s : public WriteAttribute {
+class WriteUnitTestingRangeRestrictedInt8s : public WriteAttribute {
 public:
-    WriteTestClusterRangeRestrictedInt8s()
+    WriteUnitTestingRangeRestrictedInt8s()
         : WriteAttribute("range-restricted-int8s")
     {
         AddArgument("attr-name", "range-restricted-int8s");
@@ -92490,13 +92490,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterRangeRestrictedInt8s() {}
+    ~WriteUnitTestingRangeRestrictedInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000027) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92509,7 +92509,7 @@
                                                       params:params
                                                   completion:^(NSError * _Nullable error) {
                                                       if (error != nil) {
-                                                          LogNSError("TestCluster RangeRestrictedInt8s write Error", error);
+                                                          LogNSError("UnitTesting RangeRestrictedInt8s write Error", error);
                                                       }
                                                       SetCommandExitStatus(error);
                                                   }];
@@ -92520,20 +92520,20 @@
     int8_t mValue;
 };
 
-class SubscribeAttributeTestClusterRangeRestrictedInt8s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingRangeRestrictedInt8s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterRangeRestrictedInt8s()
+    SubscribeAttributeUnitTestingRangeRestrictedInt8s()
         : SubscribeAttribute("range-restricted-int8s")
     {
     }
 
-    ~SubscribeAttributeTestClusterRangeRestrictedInt8s() {}
+    ~SubscribeAttributeUnitTestingRangeRestrictedInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000027) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92551,7 +92551,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.RangeRestrictedInt8s response %@", [value description]);
+                NSLog(@"UnitTesting.RangeRestrictedInt8s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92562,27 +92562,27 @@
 /*
  * Attribute RangeRestrictedInt16u
  */
-class ReadTestClusterRangeRestrictedInt16u : public ReadAttribute {
+class ReadUnitTestingRangeRestrictedInt16u : public ReadAttribute {
 public:
-    ReadTestClusterRangeRestrictedInt16u()
+    ReadUnitTestingRangeRestrictedInt16u()
         : ReadAttribute("range-restricted-int16u")
     {
     }
 
-    ~ReadTestClusterRangeRestrictedInt16u() {}
+    ~ReadUnitTestingRangeRestrictedInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000028) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.RangeRestrictedInt16u response %@", [value description]);
+            NSLog(@"UnitTesting.RangeRestrictedInt16u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster RangeRestrictedInt16u read Error", error);
+                LogNSError("UnitTesting RangeRestrictedInt16u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92590,9 +92590,9 @@
     }
 };
 
-class WriteTestClusterRangeRestrictedInt16u : public WriteAttribute {
+class WriteUnitTestingRangeRestrictedInt16u : public WriteAttribute {
 public:
-    WriteTestClusterRangeRestrictedInt16u()
+    WriteUnitTestingRangeRestrictedInt16u()
         : WriteAttribute("range-restricted-int16u")
     {
         AddArgument("attr-name", "range-restricted-int16u");
@@ -92600,13 +92600,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterRangeRestrictedInt16u() {}
+    ~WriteUnitTestingRangeRestrictedInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000028) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92619,7 +92619,7 @@
                                                        params:params
                                                    completion:^(NSError * _Nullable error) {
                                                        if (error != nil) {
-                                                           LogNSError("TestCluster RangeRestrictedInt16u write Error", error);
+                                                           LogNSError("UnitTesting RangeRestrictedInt16u write Error", error);
                                                        }
                                                        SetCommandExitStatus(error);
                                                    }];
@@ -92630,20 +92630,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterRangeRestrictedInt16u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingRangeRestrictedInt16u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterRangeRestrictedInt16u()
+    SubscribeAttributeUnitTestingRangeRestrictedInt16u()
         : SubscribeAttribute("range-restricted-int16u")
     {
     }
 
-    ~SubscribeAttributeTestClusterRangeRestrictedInt16u() {}
+    ~SubscribeAttributeUnitTestingRangeRestrictedInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000028) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92661,7 +92661,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.RangeRestrictedInt16u response %@", [value description]);
+                NSLog(@"UnitTesting.RangeRestrictedInt16u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92672,27 +92672,27 @@
 /*
  * Attribute RangeRestrictedInt16s
  */
-class ReadTestClusterRangeRestrictedInt16s : public ReadAttribute {
+class ReadUnitTestingRangeRestrictedInt16s : public ReadAttribute {
 public:
-    ReadTestClusterRangeRestrictedInt16s()
+    ReadUnitTestingRangeRestrictedInt16s()
         : ReadAttribute("range-restricted-int16s")
     {
     }
 
-    ~ReadTestClusterRangeRestrictedInt16s() {}
+    ~ReadUnitTestingRangeRestrictedInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000029) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.RangeRestrictedInt16s response %@", [value description]);
+            NSLog(@"UnitTesting.RangeRestrictedInt16s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster RangeRestrictedInt16s read Error", error);
+                LogNSError("UnitTesting RangeRestrictedInt16s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92700,9 +92700,9 @@
     }
 };
 
-class WriteTestClusterRangeRestrictedInt16s : public WriteAttribute {
+class WriteUnitTestingRangeRestrictedInt16s : public WriteAttribute {
 public:
-    WriteTestClusterRangeRestrictedInt16s()
+    WriteUnitTestingRangeRestrictedInt16s()
         : WriteAttribute("range-restricted-int16s")
     {
         AddArgument("attr-name", "range-restricted-int16s");
@@ -92710,13 +92710,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterRangeRestrictedInt16s() {}
+    ~WriteUnitTestingRangeRestrictedInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000029) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92729,7 +92729,7 @@
                                                        params:params
                                                    completion:^(NSError * _Nullable error) {
                                                        if (error != nil) {
-                                                           LogNSError("TestCluster RangeRestrictedInt16s write Error", error);
+                                                           LogNSError("UnitTesting RangeRestrictedInt16s write Error", error);
                                                        }
                                                        SetCommandExitStatus(error);
                                                    }];
@@ -92740,20 +92740,20 @@
     int16_t mValue;
 };
 
-class SubscribeAttributeTestClusterRangeRestrictedInt16s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingRangeRestrictedInt16s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterRangeRestrictedInt16s()
+    SubscribeAttributeUnitTestingRangeRestrictedInt16s()
         : SubscribeAttribute("range-restricted-int16s")
     {
     }
 
-    ~SubscribeAttributeTestClusterRangeRestrictedInt16s() {}
+    ~SubscribeAttributeUnitTestingRangeRestrictedInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000029) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92771,7 +92771,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.RangeRestrictedInt16s response %@", [value description]);
+                NSLog(@"UnitTesting.RangeRestrictedInt16s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92782,27 +92782,27 @@
 /*
  * Attribute ListLongOctetString
  */
-class ReadTestClusterListLongOctetString : public ReadAttribute {
+class ReadUnitTestingListLongOctetString : public ReadAttribute {
 public:
-    ReadTestClusterListLongOctetString()
+    ReadUnitTestingListLongOctetString()
         : ReadAttribute("list-long-octet-string")
     {
     }
 
-    ~ReadTestClusterListLongOctetString() {}
+    ~ReadUnitTestingListLongOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000002A) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.ListLongOctetString response %@", [value description]);
+            NSLog(@"UnitTesting.ListLongOctetString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster ListLongOctetString read Error", error);
+                LogNSError("UnitTesting ListLongOctetString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -92810,9 +92810,9 @@
     }
 };
 
-class WriteTestClusterListLongOctetString : public WriteAttribute {
+class WriteUnitTestingListLongOctetString : public WriteAttribute {
 public:
-    WriteTestClusterListLongOctetString()
+    WriteUnitTestingListLongOctetString()
         : WriteAttribute("list-long-octet-string")
         , mComplex(&mValue)
     {
@@ -92821,13 +92821,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterListLongOctetString() {}
+    ~WriteUnitTestingListLongOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000002A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92849,7 +92849,7 @@
                                                      params:params
                                                  completion:^(NSError * _Nullable error) {
                                                      if (error != nil) {
-                                                         LogNSError("TestCluster ListLongOctetString write Error", error);
+                                                         LogNSError("UnitTesting ListLongOctetString write Error", error);
                                                      }
                                                      SetCommandExitStatus(error);
                                                  }];
@@ -92861,20 +92861,20 @@
     TypedComplexArgument<chip::app::DataModel::List<const chip::ByteSpan>> mComplex;
 };
 
-class SubscribeAttributeTestClusterListLongOctetString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingListLongOctetString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterListLongOctetString()
+    SubscribeAttributeUnitTestingListLongOctetString()
         : SubscribeAttribute("list-long-octet-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterListLongOctetString() {}
+    ~SubscribeAttributeUnitTestingListLongOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000002A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -92892,7 +92892,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListLongOctetString response %@", [value description]);
+                NSLog(@"UnitTesting.ListLongOctetString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -92903,21 +92903,21 @@
 /*
  * Attribute ListFabricScoped
  */
-class ReadTestClusterListFabricScoped : public ReadAttribute {
+class ReadUnitTestingListFabricScoped : public ReadAttribute {
 public:
-    ReadTestClusterListFabricScoped()
+    ReadUnitTestingListFabricScoped()
         : ReadAttribute("list-fabric-scoped")
     {
     }
 
-    ~ReadTestClusterListFabricScoped() {}
+    ~ReadUnitTestingListFabricScoped() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000002B) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRReadParams * params = [[MTRReadParams alloc] init];
@@ -92926,9 +92926,9 @@
         }
         [cluster readAttributeListFabricScopedWithParams:params
                                               completion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                                                  NSLog(@"TestCluster.ListFabricScoped response %@", [value description]);
+                                                  NSLog(@"UnitTesting.ListFabricScoped response %@", [value description]);
                                                   if (error != nil) {
-                                                      LogNSError("TestCluster ListFabricScoped read Error", error);
+                                                      LogNSError("UnitTesting ListFabricScoped read Error", error);
                                                   }
                                                   SetCommandExitStatus(error);
                                               }];
@@ -92936,9 +92936,9 @@
     }
 };
 
-class WriteTestClusterListFabricScoped : public WriteAttribute {
+class WriteUnitTestingListFabricScoped : public WriteAttribute {
 public:
-    WriteTestClusterListFabricScoped()
+    WriteUnitTestingListFabricScoped()
         : WriteAttribute("list-fabric-scoped")
         , mComplex(&mValue)
     {
@@ -92947,13 +92947,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterListFabricScoped() {}
+    ~WriteUnitTestingListFabricScoped() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000002B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -92964,8 +92964,8 @@
         { // Scope for our temporary variables
             auto * array_0 = [NSMutableArray new];
             for (auto & entry_0 : mValue) {
-                MTRTestClusterClusterTestFabricScoped * newElement_0;
-                newElement_0 = [MTRTestClusterClusterTestFabricScoped new];
+                MTRUnitTestingClusterTestFabricScoped * newElement_0;
+                newElement_0 = [MTRUnitTestingClusterTestFabricScoped new];
                 newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u];
                 if (entry_0.optionalFabricSensitiveInt8u.HasValue()) {
                     newElement_0.optionalFabricSensitiveInt8u =
@@ -92992,7 +92992,7 @@
                 newElement_0.fabricSensitiveCharString = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data()
                                                                                   length:entry_0.fabricSensitiveCharString.size()
                                                                                 encoding:NSUTF8StringEncoding];
-                newElement_0.fabricSensitiveStruct = [MTRTestClusterClusterSimpleStruct new];
+                newElement_0.fabricSensitiveStruct = [MTRUnitTestingClusterSimpleStruct new];
                 newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a];
                 newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b];
                 newElement_0.fabricSensitiveStruct.c =
@@ -93024,7 +93024,7 @@
                                                   params:params
                                               completion:^(NSError * _Nullable error) {
                                                   if (error != nil) {
-                                                      LogNSError("TestCluster ListFabricScoped write Error", error);
+                                                      LogNSError("UnitTesting ListFabricScoped write Error", error);
                                                   }
                                                   SetCommandExitStatus(error);
                                               }];
@@ -93032,25 +93032,25 @@
     }
 
 private:
-    chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type> mValue;
-    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::TestCluster::Structs::TestFabricScoped::Type>>
+    chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type> mValue;
+    TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::Type>>
         mComplex;
 };
 
-class SubscribeAttributeTestClusterListFabricScoped : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingListFabricScoped : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterListFabricScoped()
+    SubscribeAttributeUnitTestingListFabricScoped()
         : SubscribeAttribute("list-fabric-scoped")
     {
     }
 
-    ~SubscribeAttributeTestClusterListFabricScoped() {}
+    ~SubscribeAttributeUnitTestingListFabricScoped() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000002B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93068,7 +93068,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ListFabricScoped response %@", [value description]);
+                NSLog(@"UnitTesting.ListFabricScoped response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93079,27 +93079,27 @@
 /*
  * Attribute TimedWriteBoolean
  */
-class ReadTestClusterTimedWriteBoolean : public ReadAttribute {
+class ReadUnitTestingTimedWriteBoolean : public ReadAttribute {
 public:
-    ReadTestClusterTimedWriteBoolean()
+    ReadUnitTestingTimedWriteBoolean()
         : ReadAttribute("timed-write-boolean")
     {
     }
 
-    ~ReadTestClusterTimedWriteBoolean() {}
+    ~ReadUnitTestingTimedWriteBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000030) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeTimedWriteBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.TimedWriteBoolean response %@", [value description]);
+            NSLog(@"UnitTesting.TimedWriteBoolean response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster TimedWriteBoolean read Error", error);
+                LogNSError("UnitTesting TimedWriteBoolean read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93107,9 +93107,9 @@
     }
 };
 
-class WriteTestClusterTimedWriteBoolean : public WriteAttribute {
+class WriteUnitTestingTimedWriteBoolean : public WriteAttribute {
 public:
-    WriteTestClusterTimedWriteBoolean()
+    WriteUnitTestingTimedWriteBoolean()
         : WriteAttribute("timed-write-boolean")
     {
         AddArgument("attr-name", "timed-write-boolean");
@@ -93117,13 +93117,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterTimedWriteBoolean() {}
+    ~WriteUnitTestingTimedWriteBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000030) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93136,7 +93136,7 @@
                                                    params:params
                                                completion:^(NSError * _Nullable error) {
                                                    if (error != nil) {
-                                                       LogNSError("TestCluster TimedWriteBoolean write Error", error);
+                                                       LogNSError("UnitTesting TimedWriteBoolean write Error", error);
                                                    }
                                                    SetCommandExitStatus(error);
                                                }];
@@ -93147,20 +93147,20 @@
     bool mValue;
 };
 
-class SubscribeAttributeTestClusterTimedWriteBoolean : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingTimedWriteBoolean : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterTimedWriteBoolean()
+    SubscribeAttributeUnitTestingTimedWriteBoolean()
         : SubscribeAttribute("timed-write-boolean")
     {
     }
 
-    ~SubscribeAttributeTestClusterTimedWriteBoolean() {}
+    ~SubscribeAttributeUnitTestingTimedWriteBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000030) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93178,7 +93178,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.TimedWriteBoolean response %@", [value description]);
+                NSLog(@"UnitTesting.TimedWriteBoolean response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93189,27 +93189,27 @@
 /*
  * Attribute GeneralErrorBoolean
  */
-class ReadTestClusterGeneralErrorBoolean : public ReadAttribute {
+class ReadUnitTestingGeneralErrorBoolean : public ReadAttribute {
 public:
-    ReadTestClusterGeneralErrorBoolean()
+    ReadUnitTestingGeneralErrorBoolean()
         : ReadAttribute("general-error-boolean")
     {
     }
 
-    ~ReadTestClusterGeneralErrorBoolean() {}
+    ~ReadUnitTestingGeneralErrorBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000031) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.GeneralErrorBoolean response %@", [value description]);
+            NSLog(@"UnitTesting.GeneralErrorBoolean response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster GeneralErrorBoolean read Error", error);
+                LogNSError("UnitTesting GeneralErrorBoolean read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93217,9 +93217,9 @@
     }
 };
 
-class WriteTestClusterGeneralErrorBoolean : public WriteAttribute {
+class WriteUnitTestingGeneralErrorBoolean : public WriteAttribute {
 public:
-    WriteTestClusterGeneralErrorBoolean()
+    WriteUnitTestingGeneralErrorBoolean()
         : WriteAttribute("general-error-boolean")
     {
         AddArgument("attr-name", "general-error-boolean");
@@ -93227,13 +93227,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterGeneralErrorBoolean() {}
+    ~WriteUnitTestingGeneralErrorBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000031) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93246,7 +93246,7 @@
                                                      params:params
                                                  completion:^(NSError * _Nullable error) {
                                                      if (error != nil) {
-                                                         LogNSError("TestCluster GeneralErrorBoolean write Error", error);
+                                                         LogNSError("UnitTesting GeneralErrorBoolean write Error", error);
                                                      }
                                                      SetCommandExitStatus(error);
                                                  }];
@@ -93257,20 +93257,20 @@
     bool mValue;
 };
 
-class SubscribeAttributeTestClusterGeneralErrorBoolean : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingGeneralErrorBoolean : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterGeneralErrorBoolean()
+    SubscribeAttributeUnitTestingGeneralErrorBoolean()
         : SubscribeAttribute("general-error-boolean")
     {
     }
 
-    ~SubscribeAttributeTestClusterGeneralErrorBoolean() {}
+    ~SubscribeAttributeUnitTestingGeneralErrorBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000031) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93288,7 +93288,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.GeneralErrorBoolean response %@", [value description]);
+                NSLog(@"UnitTesting.GeneralErrorBoolean response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93299,27 +93299,27 @@
 /*
  * Attribute ClusterErrorBoolean
  */
-class ReadTestClusterClusterErrorBoolean : public ReadAttribute {
+class ReadUnitTestingClusterErrorBoolean : public ReadAttribute {
 public:
-    ReadTestClusterClusterErrorBoolean()
+    ReadUnitTestingClusterErrorBoolean()
         : ReadAttribute("cluster-error-boolean")
     {
     }
 
-    ~ReadTestClusterClusterErrorBoolean() {}
+    ~ReadUnitTestingClusterErrorBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000032) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.ClusterErrorBoolean response %@", [value description]);
+            NSLog(@"UnitTesting.ClusterErrorBoolean response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster ClusterErrorBoolean read Error", error);
+                LogNSError("UnitTesting ClusterErrorBoolean read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93327,9 +93327,9 @@
     }
 };
 
-class WriteTestClusterClusterErrorBoolean : public WriteAttribute {
+class WriteUnitTestingClusterErrorBoolean : public WriteAttribute {
 public:
-    WriteTestClusterClusterErrorBoolean()
+    WriteUnitTestingClusterErrorBoolean()
         : WriteAttribute("cluster-error-boolean")
     {
         AddArgument("attr-name", "cluster-error-boolean");
@@ -93337,13 +93337,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterClusterErrorBoolean() {}
+    ~WriteUnitTestingClusterErrorBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000032) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93356,7 +93356,7 @@
                                                      params:params
                                                  completion:^(NSError * _Nullable error) {
                                                      if (error != nil) {
-                                                         LogNSError("TestCluster ClusterErrorBoolean write Error", error);
+                                                         LogNSError("UnitTesting ClusterErrorBoolean write Error", error);
                                                      }
                                                      SetCommandExitStatus(error);
                                                  }];
@@ -93367,20 +93367,20 @@
     bool mValue;
 };
 
-class SubscribeAttributeTestClusterClusterErrorBoolean : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingClusterErrorBoolean : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterClusterErrorBoolean()
+    SubscribeAttributeUnitTestingClusterErrorBoolean()
         : SubscribeAttribute("cluster-error-boolean")
     {
     }
 
-    ~SubscribeAttributeTestClusterClusterErrorBoolean() {}
+    ~SubscribeAttributeUnitTestingClusterErrorBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000032) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93398,7 +93398,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ClusterErrorBoolean response %@", [value description]);
+                NSLog(@"UnitTesting.ClusterErrorBoolean response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93409,27 +93409,27 @@
 /*
  * Attribute Unsupported
  */
-class ReadTestClusterUnsupported : public ReadAttribute {
+class ReadUnitTestingUnsupported : public ReadAttribute {
 public:
-    ReadTestClusterUnsupported()
+    ReadUnitTestingUnsupported()
         : ReadAttribute("unsupported")
     {
     }
 
-    ~ReadTestClusterUnsupported() {}
+    ~ReadUnitTestingUnsupported() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x000000FF) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.Unsupported response %@", [value description]);
+            NSLog(@"UnitTesting.Unsupported response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster Unsupported read Error", error);
+                LogNSError("UnitTesting Unsupported read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93437,9 +93437,9 @@
     }
 };
 
-class WriteTestClusterUnsupported : public WriteAttribute {
+class WriteUnitTestingUnsupported : public WriteAttribute {
 public:
-    WriteTestClusterUnsupported()
+    WriteUnitTestingUnsupported()
         : WriteAttribute("unsupported")
     {
         AddArgument("attr-name", "unsupported");
@@ -93447,13 +93447,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterUnsupported() {}
+    ~WriteUnitTestingUnsupported() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x000000FF) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93466,7 +93466,7 @@
                                              params:params
                                          completion:^(NSError * _Nullable error) {
                                              if (error != nil) {
-                                                 LogNSError("TestCluster Unsupported write Error", error);
+                                                 LogNSError("UnitTesting Unsupported write Error", error);
                                              }
                                              SetCommandExitStatus(error);
                                          }];
@@ -93477,20 +93477,20 @@
     bool mValue;
 };
 
-class SubscribeAttributeTestClusterUnsupported : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingUnsupported : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterUnsupported()
+    SubscribeAttributeUnitTestingUnsupported()
         : SubscribeAttribute("unsupported")
     {
     }
 
-    ~SubscribeAttributeTestClusterUnsupported() {}
+    ~SubscribeAttributeUnitTestingUnsupported() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x000000FF) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93508,7 +93508,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.Unsupported response %@", [value description]);
+                NSLog(@"UnitTesting.Unsupported response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93519,27 +93519,27 @@
 /*
  * Attribute NullableBoolean
  */
-class ReadTestClusterNullableBoolean : public ReadAttribute {
+class ReadUnitTestingNullableBoolean : public ReadAttribute {
 public:
-    ReadTestClusterNullableBoolean()
+    ReadUnitTestingNullableBoolean()
         : ReadAttribute("nullable-boolean")
     {
     }
 
-    ~ReadTestClusterNullableBoolean() {}
+    ~ReadUnitTestingNullableBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004000) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableBoolean response %@", [value description]);
+            NSLog(@"UnitTesting.NullableBoolean response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableBoolean read Error", error);
+                LogNSError("UnitTesting NullableBoolean read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93547,9 +93547,9 @@
     }
 };
 
-class WriteTestClusterNullableBoolean : public WriteAttribute {
+class WriteUnitTestingNullableBoolean : public WriteAttribute {
 public:
-    WriteTestClusterNullableBoolean()
+    WriteUnitTestingNullableBoolean()
         : WriteAttribute("nullable-boolean")
     {
         AddArgument("attr-name", "nullable-boolean");
@@ -93557,13 +93557,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableBoolean() {}
+    ~WriteUnitTestingNullableBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004000) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93576,7 +93576,7 @@
                                                  params:params
                                              completion:^(NSError * _Nullable error) {
                                                  if (error != nil) {
-                                                     LogNSError("TestCluster NullableBoolean write Error", error);
+                                                     LogNSError("UnitTesting NullableBoolean write Error", error);
                                                  }
                                                  SetCommandExitStatus(error);
                                              }];
@@ -93587,20 +93587,20 @@
     bool mValue;
 };
 
-class SubscribeAttributeTestClusterNullableBoolean : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableBoolean : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableBoolean()
+    SubscribeAttributeUnitTestingNullableBoolean()
         : SubscribeAttribute("nullable-boolean")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableBoolean() {}
+    ~SubscribeAttributeUnitTestingNullableBoolean() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004000) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93618,7 +93618,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableBoolean response %@", [value description]);
+                NSLog(@"UnitTesting.NullableBoolean response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93629,27 +93629,27 @@
 /*
  * Attribute NullableBitmap8
  */
-class ReadTestClusterNullableBitmap8 : public ReadAttribute {
+class ReadUnitTestingNullableBitmap8 : public ReadAttribute {
 public:
-    ReadTestClusterNullableBitmap8()
+    ReadUnitTestingNullableBitmap8()
         : ReadAttribute("nullable-bitmap8")
     {
     }
 
-    ~ReadTestClusterNullableBitmap8() {}
+    ~ReadUnitTestingNullableBitmap8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004001) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableBitmap8 response %@", [value description]);
+            NSLog(@"UnitTesting.NullableBitmap8 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableBitmap8 read Error", error);
+                LogNSError("UnitTesting NullableBitmap8 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93657,9 +93657,9 @@
     }
 };
 
-class WriteTestClusterNullableBitmap8 : public WriteAttribute {
+class WriteUnitTestingNullableBitmap8 : public WriteAttribute {
 public:
-    WriteTestClusterNullableBitmap8()
+    WriteUnitTestingNullableBitmap8()
         : WriteAttribute("nullable-bitmap8")
     {
         AddArgument("attr-name", "nullable-bitmap8");
@@ -93667,13 +93667,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableBitmap8() {}
+    ~WriteUnitTestingNullableBitmap8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004001) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93686,7 +93686,7 @@
                                                  params:params
                                              completion:^(NSError * _Nullable error) {
                                                  if (error != nil) {
-                                                     LogNSError("TestCluster NullableBitmap8 write Error", error);
+                                                     LogNSError("UnitTesting NullableBitmap8 write Error", error);
                                                  }
                                                  SetCommandExitStatus(error);
                                              }];
@@ -93697,20 +93697,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableBitmap8 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableBitmap8 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableBitmap8()
+    SubscribeAttributeUnitTestingNullableBitmap8()
         : SubscribeAttribute("nullable-bitmap8")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableBitmap8() {}
+    ~SubscribeAttributeUnitTestingNullableBitmap8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004001) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93728,7 +93728,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableBitmap8 response %@", [value description]);
+                NSLog(@"UnitTesting.NullableBitmap8 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93739,27 +93739,27 @@
 /*
  * Attribute NullableBitmap16
  */
-class ReadTestClusterNullableBitmap16 : public ReadAttribute {
+class ReadUnitTestingNullableBitmap16 : public ReadAttribute {
 public:
-    ReadTestClusterNullableBitmap16()
+    ReadUnitTestingNullableBitmap16()
         : ReadAttribute("nullable-bitmap16")
     {
     }
 
-    ~ReadTestClusterNullableBitmap16() {}
+    ~ReadUnitTestingNullableBitmap16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004002) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableBitmap16 response %@", [value description]);
+            NSLog(@"UnitTesting.NullableBitmap16 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableBitmap16 read Error", error);
+                LogNSError("UnitTesting NullableBitmap16 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93767,9 +93767,9 @@
     }
 };
 
-class WriteTestClusterNullableBitmap16 : public WriteAttribute {
+class WriteUnitTestingNullableBitmap16 : public WriteAttribute {
 public:
-    WriteTestClusterNullableBitmap16()
+    WriteUnitTestingNullableBitmap16()
         : WriteAttribute("nullable-bitmap16")
     {
         AddArgument("attr-name", "nullable-bitmap16");
@@ -93777,13 +93777,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableBitmap16() {}
+    ~WriteUnitTestingNullableBitmap16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004002) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93796,7 +93796,7 @@
                                                   params:params
                                               completion:^(NSError * _Nullable error) {
                                                   if (error != nil) {
-                                                      LogNSError("TestCluster NullableBitmap16 write Error", error);
+                                                      LogNSError("UnitTesting NullableBitmap16 write Error", error);
                                                   }
                                                   SetCommandExitStatus(error);
                                               }];
@@ -93807,20 +93807,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableBitmap16 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableBitmap16 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableBitmap16()
+    SubscribeAttributeUnitTestingNullableBitmap16()
         : SubscribeAttribute("nullable-bitmap16")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableBitmap16() {}
+    ~SubscribeAttributeUnitTestingNullableBitmap16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004002) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93838,7 +93838,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableBitmap16 response %@", [value description]);
+                NSLog(@"UnitTesting.NullableBitmap16 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93849,27 +93849,27 @@
 /*
  * Attribute NullableBitmap32
  */
-class ReadTestClusterNullableBitmap32 : public ReadAttribute {
+class ReadUnitTestingNullableBitmap32 : public ReadAttribute {
 public:
-    ReadTestClusterNullableBitmap32()
+    ReadUnitTestingNullableBitmap32()
         : ReadAttribute("nullable-bitmap32")
     {
     }
 
-    ~ReadTestClusterNullableBitmap32() {}
+    ~ReadUnitTestingNullableBitmap32() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004003) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableBitmap32 response %@", [value description]);
+            NSLog(@"UnitTesting.NullableBitmap32 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableBitmap32 read Error", error);
+                LogNSError("UnitTesting NullableBitmap32 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93877,9 +93877,9 @@
     }
 };
 
-class WriteTestClusterNullableBitmap32 : public WriteAttribute {
+class WriteUnitTestingNullableBitmap32 : public WriteAttribute {
 public:
-    WriteTestClusterNullableBitmap32()
+    WriteUnitTestingNullableBitmap32()
         : WriteAttribute("nullable-bitmap32")
     {
         AddArgument("attr-name", "nullable-bitmap32");
@@ -93887,13 +93887,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableBitmap32() {}
+    ~WriteUnitTestingNullableBitmap32() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004003) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -93906,7 +93906,7 @@
                                                   params:params
                                               completion:^(NSError * _Nullable error) {
                                                   if (error != nil) {
-                                                      LogNSError("TestCluster NullableBitmap32 write Error", error);
+                                                      LogNSError("UnitTesting NullableBitmap32 write Error", error);
                                                   }
                                                   SetCommandExitStatus(error);
                                               }];
@@ -93917,20 +93917,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableBitmap32 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableBitmap32 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableBitmap32()
+    SubscribeAttributeUnitTestingNullableBitmap32()
         : SubscribeAttribute("nullable-bitmap32")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableBitmap32() {}
+    ~SubscribeAttributeUnitTestingNullableBitmap32() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004003) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -93948,7 +93948,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableBitmap32 response %@", [value description]);
+                NSLog(@"UnitTesting.NullableBitmap32 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -93959,27 +93959,27 @@
 /*
  * Attribute NullableBitmap64
  */
-class ReadTestClusterNullableBitmap64 : public ReadAttribute {
+class ReadUnitTestingNullableBitmap64 : public ReadAttribute {
 public:
-    ReadTestClusterNullableBitmap64()
+    ReadUnitTestingNullableBitmap64()
         : ReadAttribute("nullable-bitmap64")
     {
     }
 
-    ~ReadTestClusterNullableBitmap64() {}
+    ~ReadUnitTestingNullableBitmap64() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004004) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableBitmap64 response %@", [value description]);
+            NSLog(@"UnitTesting.NullableBitmap64 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableBitmap64 read Error", error);
+                LogNSError("UnitTesting NullableBitmap64 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -93987,9 +93987,9 @@
     }
 };
 
-class WriteTestClusterNullableBitmap64 : public WriteAttribute {
+class WriteUnitTestingNullableBitmap64 : public WriteAttribute {
 public:
-    WriteTestClusterNullableBitmap64()
+    WriteUnitTestingNullableBitmap64()
         : WriteAttribute("nullable-bitmap64")
     {
         AddArgument("attr-name", "nullable-bitmap64");
@@ -93997,13 +93997,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableBitmap64() {}
+    ~WriteUnitTestingNullableBitmap64() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004004) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94016,7 +94016,7 @@
                                                   params:params
                                               completion:^(NSError * _Nullable error) {
                                                   if (error != nil) {
-                                                      LogNSError("TestCluster NullableBitmap64 write Error", error);
+                                                      LogNSError("UnitTesting NullableBitmap64 write Error", error);
                                                   }
                                                   SetCommandExitStatus(error);
                                               }];
@@ -94027,20 +94027,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableBitmap64 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableBitmap64 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableBitmap64()
+    SubscribeAttributeUnitTestingNullableBitmap64()
         : SubscribeAttribute("nullable-bitmap64")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableBitmap64() {}
+    ~SubscribeAttributeUnitTestingNullableBitmap64() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004004) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94058,7 +94058,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableBitmap64 response %@", [value description]);
+                NSLog(@"UnitTesting.NullableBitmap64 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94069,27 +94069,27 @@
 /*
  * Attribute NullableInt8u
  */
-class ReadTestClusterNullableInt8u : public ReadAttribute {
+class ReadUnitTestingNullableInt8u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt8u()
+    ReadUnitTestingNullableInt8u()
         : ReadAttribute("nullable-int8u")
     {
     }
 
-    ~ReadTestClusterNullableInt8u() {}
+    ~ReadUnitTestingNullableInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004005) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt8u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt8u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt8u read Error", error);
+                LogNSError("UnitTesting NullableInt8u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94097,9 +94097,9 @@
     }
 };
 
-class WriteTestClusterNullableInt8u : public WriteAttribute {
+class WriteUnitTestingNullableInt8u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt8u()
+    WriteUnitTestingNullableInt8u()
         : WriteAttribute("nullable-int8u")
     {
         AddArgument("attr-name", "nullable-int8u");
@@ -94107,13 +94107,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt8u() {}
+    ~WriteUnitTestingNullableInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004005) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94126,7 +94126,7 @@
                                                params:params
                                            completion:^(NSError * _Nullable error) {
                                                if (error != nil) {
-                                                   LogNSError("TestCluster NullableInt8u write Error", error);
+                                                   LogNSError("UnitTesting NullableInt8u write Error", error);
                                                }
                                                SetCommandExitStatus(error);
                                            }];
@@ -94137,20 +94137,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt8u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt8u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt8u()
+    SubscribeAttributeUnitTestingNullableInt8u()
         : SubscribeAttribute("nullable-int8u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt8u() {}
+    ~SubscribeAttributeUnitTestingNullableInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004005) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94168,7 +94168,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt8u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt8u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94179,27 +94179,27 @@
 /*
  * Attribute NullableInt16u
  */
-class ReadTestClusterNullableInt16u : public ReadAttribute {
+class ReadUnitTestingNullableInt16u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt16u()
+    ReadUnitTestingNullableInt16u()
         : ReadAttribute("nullable-int16u")
     {
     }
 
-    ~ReadTestClusterNullableInt16u() {}
+    ~ReadUnitTestingNullableInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004006) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt16u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt16u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt16u read Error", error);
+                LogNSError("UnitTesting NullableInt16u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94207,9 +94207,9 @@
     }
 };
 
-class WriteTestClusterNullableInt16u : public WriteAttribute {
+class WriteUnitTestingNullableInt16u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt16u()
+    WriteUnitTestingNullableInt16u()
         : WriteAttribute("nullable-int16u")
     {
         AddArgument("attr-name", "nullable-int16u");
@@ -94217,13 +94217,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt16u() {}
+    ~WriteUnitTestingNullableInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004006) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94236,7 +94236,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt16u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt16u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94247,20 +94247,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt16u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt16u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt16u()
+    SubscribeAttributeUnitTestingNullableInt16u()
         : SubscribeAttribute("nullable-int16u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt16u() {}
+    ~SubscribeAttributeUnitTestingNullableInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004006) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94278,7 +94278,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt16u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt16u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94289,27 +94289,27 @@
 /*
  * Attribute NullableInt24u
  */
-class ReadTestClusterNullableInt24u : public ReadAttribute {
+class ReadUnitTestingNullableInt24u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt24u()
+    ReadUnitTestingNullableInt24u()
         : ReadAttribute("nullable-int24u")
     {
     }
 
-    ~ReadTestClusterNullableInt24u() {}
+    ~ReadUnitTestingNullableInt24u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004007) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt24u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt24u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt24u read Error", error);
+                LogNSError("UnitTesting NullableInt24u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94317,9 +94317,9 @@
     }
 };
 
-class WriteTestClusterNullableInt24u : public WriteAttribute {
+class WriteUnitTestingNullableInt24u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt24u()
+    WriteUnitTestingNullableInt24u()
         : WriteAttribute("nullable-int24u")
     {
         AddArgument("attr-name", "nullable-int24u");
@@ -94327,13 +94327,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt24u() {}
+    ~WriteUnitTestingNullableInt24u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004007) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94346,7 +94346,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt24u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt24u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94357,20 +94357,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt24u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt24u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt24u()
+    SubscribeAttributeUnitTestingNullableInt24u()
         : SubscribeAttribute("nullable-int24u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt24u() {}
+    ~SubscribeAttributeUnitTestingNullableInt24u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004007) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94388,7 +94388,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt24u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt24u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94399,27 +94399,27 @@
 /*
  * Attribute NullableInt32u
  */
-class ReadTestClusterNullableInt32u : public ReadAttribute {
+class ReadUnitTestingNullableInt32u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt32u()
+    ReadUnitTestingNullableInt32u()
         : ReadAttribute("nullable-int32u")
     {
     }
 
-    ~ReadTestClusterNullableInt32u() {}
+    ~ReadUnitTestingNullableInt32u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004008) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt32u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt32u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt32u read Error", error);
+                LogNSError("UnitTesting NullableInt32u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94427,9 +94427,9 @@
     }
 };
 
-class WriteTestClusterNullableInt32u : public WriteAttribute {
+class WriteUnitTestingNullableInt32u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt32u()
+    WriteUnitTestingNullableInt32u()
         : WriteAttribute("nullable-int32u")
     {
         AddArgument("attr-name", "nullable-int32u");
@@ -94437,13 +94437,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt32u() {}
+    ~WriteUnitTestingNullableInt32u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004008) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94456,7 +94456,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt32u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt32u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94467,20 +94467,20 @@
     uint32_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt32u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt32u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt32u()
+    SubscribeAttributeUnitTestingNullableInt32u()
         : SubscribeAttribute("nullable-int32u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt32u() {}
+    ~SubscribeAttributeUnitTestingNullableInt32u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004008) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94498,7 +94498,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt32u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt32u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94509,27 +94509,27 @@
 /*
  * Attribute NullableInt40u
  */
-class ReadTestClusterNullableInt40u : public ReadAttribute {
+class ReadUnitTestingNullableInt40u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt40u()
+    ReadUnitTestingNullableInt40u()
         : ReadAttribute("nullable-int40u")
     {
     }
 
-    ~ReadTestClusterNullableInt40u() {}
+    ~ReadUnitTestingNullableInt40u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004009) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt40u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt40u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt40u read Error", error);
+                LogNSError("UnitTesting NullableInt40u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94537,9 +94537,9 @@
     }
 };
 
-class WriteTestClusterNullableInt40u : public WriteAttribute {
+class WriteUnitTestingNullableInt40u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt40u()
+    WriteUnitTestingNullableInt40u()
         : WriteAttribute("nullable-int40u")
     {
         AddArgument("attr-name", "nullable-int40u");
@@ -94547,13 +94547,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt40u() {}
+    ~WriteUnitTestingNullableInt40u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004009) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94566,7 +94566,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt40u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt40u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94577,20 +94577,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt40u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt40u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt40u()
+    SubscribeAttributeUnitTestingNullableInt40u()
         : SubscribeAttribute("nullable-int40u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt40u() {}
+    ~SubscribeAttributeUnitTestingNullableInt40u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004009) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94608,7 +94608,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt40u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt40u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94619,27 +94619,27 @@
 /*
  * Attribute NullableInt48u
  */
-class ReadTestClusterNullableInt48u : public ReadAttribute {
+class ReadUnitTestingNullableInt48u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt48u()
+    ReadUnitTestingNullableInt48u()
         : ReadAttribute("nullable-int48u")
     {
     }
 
-    ~ReadTestClusterNullableInt48u() {}
+    ~ReadUnitTestingNullableInt48u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400A) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt48u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt48u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt48u read Error", error);
+                LogNSError("UnitTesting NullableInt48u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94647,9 +94647,9 @@
     }
 };
 
-class WriteTestClusterNullableInt48u : public WriteAttribute {
+class WriteUnitTestingNullableInt48u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt48u()
+    WriteUnitTestingNullableInt48u()
         : WriteAttribute("nullable-int48u")
     {
         AddArgument("attr-name", "nullable-int48u");
@@ -94657,13 +94657,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt48u() {}
+    ~WriteUnitTestingNullableInt48u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94676,7 +94676,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt48u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt48u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94687,20 +94687,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt48u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt48u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt48u()
+    SubscribeAttributeUnitTestingNullableInt48u()
         : SubscribeAttribute("nullable-int48u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt48u() {}
+    ~SubscribeAttributeUnitTestingNullableInt48u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94718,7 +94718,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt48u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt48u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94729,27 +94729,27 @@
 /*
  * Attribute NullableInt56u
  */
-class ReadTestClusterNullableInt56u : public ReadAttribute {
+class ReadUnitTestingNullableInt56u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt56u()
+    ReadUnitTestingNullableInt56u()
         : ReadAttribute("nullable-int56u")
     {
     }
 
-    ~ReadTestClusterNullableInt56u() {}
+    ~ReadUnitTestingNullableInt56u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400B) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt56u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt56u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt56u read Error", error);
+                LogNSError("UnitTesting NullableInt56u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94757,9 +94757,9 @@
     }
 };
 
-class WriteTestClusterNullableInt56u : public WriteAttribute {
+class WriteUnitTestingNullableInt56u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt56u()
+    WriteUnitTestingNullableInt56u()
         : WriteAttribute("nullable-int56u")
     {
         AddArgument("attr-name", "nullable-int56u");
@@ -94767,13 +94767,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt56u() {}
+    ~WriteUnitTestingNullableInt56u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94786,7 +94786,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt56u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt56u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94797,20 +94797,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt56u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt56u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt56u()
+    SubscribeAttributeUnitTestingNullableInt56u()
         : SubscribeAttribute("nullable-int56u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt56u() {}
+    ~SubscribeAttributeUnitTestingNullableInt56u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400B) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94828,7 +94828,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt56u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt56u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94839,27 +94839,27 @@
 /*
  * Attribute NullableInt64u
  */
-class ReadTestClusterNullableInt64u : public ReadAttribute {
+class ReadUnitTestingNullableInt64u : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt64u()
+    ReadUnitTestingNullableInt64u()
         : ReadAttribute("nullable-int64u")
     {
     }
 
-    ~ReadTestClusterNullableInt64u() {}
+    ~ReadUnitTestingNullableInt64u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400C) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt64u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt64u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt64u read Error", error);
+                LogNSError("UnitTesting NullableInt64u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94867,9 +94867,9 @@
     }
 };
 
-class WriteTestClusterNullableInt64u : public WriteAttribute {
+class WriteUnitTestingNullableInt64u : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt64u()
+    WriteUnitTestingNullableInt64u()
         : WriteAttribute("nullable-int64u")
     {
         AddArgument("attr-name", "nullable-int64u");
@@ -94877,13 +94877,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt64u() {}
+    ~WriteUnitTestingNullableInt64u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400C) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -94896,7 +94896,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt64u write Error", error);
+                                                    LogNSError("UnitTesting NullableInt64u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -94907,20 +94907,20 @@
     uint64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt64u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt64u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt64u()
+    SubscribeAttributeUnitTestingNullableInt64u()
         : SubscribeAttribute("nullable-int64u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt64u() {}
+    ~SubscribeAttributeUnitTestingNullableInt64u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400C) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -94938,7 +94938,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt64u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt64u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -94949,27 +94949,27 @@
 /*
  * Attribute NullableInt8s
  */
-class ReadTestClusterNullableInt8s : public ReadAttribute {
+class ReadUnitTestingNullableInt8s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt8s()
+    ReadUnitTestingNullableInt8s()
         : ReadAttribute("nullable-int8s")
     {
     }
 
-    ~ReadTestClusterNullableInt8s() {}
+    ~ReadUnitTestingNullableInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400D) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt8s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt8s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt8s read Error", error);
+                LogNSError("UnitTesting NullableInt8s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -94977,9 +94977,9 @@
     }
 };
 
-class WriteTestClusterNullableInt8s : public WriteAttribute {
+class WriteUnitTestingNullableInt8s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt8s()
+    WriteUnitTestingNullableInt8s()
         : WriteAttribute("nullable-int8s")
     {
         AddArgument("attr-name", "nullable-int8s");
@@ -94987,13 +94987,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt8s() {}
+    ~WriteUnitTestingNullableInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400D) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95006,7 +95006,7 @@
                                                params:params
                                            completion:^(NSError * _Nullable error) {
                                                if (error != nil) {
-                                                   LogNSError("TestCluster NullableInt8s write Error", error);
+                                                   LogNSError("UnitTesting NullableInt8s write Error", error);
                                                }
                                                SetCommandExitStatus(error);
                                            }];
@@ -95017,20 +95017,20 @@
     int8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt8s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt8s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt8s()
+    SubscribeAttributeUnitTestingNullableInt8s()
         : SubscribeAttribute("nullable-int8s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt8s() {}
+    ~SubscribeAttributeUnitTestingNullableInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400D) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95048,7 +95048,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt8s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt8s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95059,27 +95059,27 @@
 /*
  * Attribute NullableInt16s
  */
-class ReadTestClusterNullableInt16s : public ReadAttribute {
+class ReadUnitTestingNullableInt16s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt16s()
+    ReadUnitTestingNullableInt16s()
         : ReadAttribute("nullable-int16s")
     {
     }
 
-    ~ReadTestClusterNullableInt16s() {}
+    ~ReadUnitTestingNullableInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400E) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt16s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt16s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt16s read Error", error);
+                LogNSError("UnitTesting NullableInt16s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95087,9 +95087,9 @@
     }
 };
 
-class WriteTestClusterNullableInt16s : public WriteAttribute {
+class WriteUnitTestingNullableInt16s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt16s()
+    WriteUnitTestingNullableInt16s()
         : WriteAttribute("nullable-int16s")
     {
         AddArgument("attr-name", "nullable-int16s");
@@ -95097,13 +95097,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt16s() {}
+    ~WriteUnitTestingNullableInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95116,7 +95116,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt16s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt16s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95127,20 +95127,20 @@
     int16_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt16s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt16s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt16s()
+    SubscribeAttributeUnitTestingNullableInt16s()
         : SubscribeAttribute("nullable-int16s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt16s() {}
+    ~SubscribeAttributeUnitTestingNullableInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95158,7 +95158,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt16s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt16s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95169,27 +95169,27 @@
 /*
  * Attribute NullableInt24s
  */
-class ReadTestClusterNullableInt24s : public ReadAttribute {
+class ReadUnitTestingNullableInt24s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt24s()
+    ReadUnitTestingNullableInt24s()
         : ReadAttribute("nullable-int24s")
     {
     }
 
-    ~ReadTestClusterNullableInt24s() {}
+    ~ReadUnitTestingNullableInt24s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400F) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt24s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt24s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt24s read Error", error);
+                LogNSError("UnitTesting NullableInt24s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95197,9 +95197,9 @@
     }
 };
 
-class WriteTestClusterNullableInt24s : public WriteAttribute {
+class WriteUnitTestingNullableInt24s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt24s()
+    WriteUnitTestingNullableInt24s()
         : WriteAttribute("nullable-int24s")
     {
         AddArgument("attr-name", "nullable-int24s");
@@ -95207,13 +95207,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt24s() {}
+    ~WriteUnitTestingNullableInt24s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400F) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95226,7 +95226,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt24s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt24s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95237,20 +95237,20 @@
     int32_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt24s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt24s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt24s()
+    SubscribeAttributeUnitTestingNullableInt24s()
         : SubscribeAttribute("nullable-int24s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt24s() {}
+    ~SubscribeAttributeUnitTestingNullableInt24s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400F) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95268,7 +95268,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt24s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt24s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95279,27 +95279,27 @@
 /*
  * Attribute NullableInt32s
  */
-class ReadTestClusterNullableInt32s : public ReadAttribute {
+class ReadUnitTestingNullableInt32s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt32s()
+    ReadUnitTestingNullableInt32s()
         : ReadAttribute("nullable-int32s")
     {
     }
 
-    ~ReadTestClusterNullableInt32s() {}
+    ~ReadUnitTestingNullableInt32s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004010) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt32s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt32s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt32s read Error", error);
+                LogNSError("UnitTesting NullableInt32s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95307,9 +95307,9 @@
     }
 };
 
-class WriteTestClusterNullableInt32s : public WriteAttribute {
+class WriteUnitTestingNullableInt32s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt32s()
+    WriteUnitTestingNullableInt32s()
         : WriteAttribute("nullable-int32s")
     {
         AddArgument("attr-name", "nullable-int32s");
@@ -95317,13 +95317,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt32s() {}
+    ~WriteUnitTestingNullableInt32s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004010) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95336,7 +95336,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt32s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt32s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95347,20 +95347,20 @@
     int32_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt32s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt32s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt32s()
+    SubscribeAttributeUnitTestingNullableInt32s()
         : SubscribeAttribute("nullable-int32s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt32s() {}
+    ~SubscribeAttributeUnitTestingNullableInt32s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004010) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95378,7 +95378,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt32s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt32s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95389,27 +95389,27 @@
 /*
  * Attribute NullableInt40s
  */
-class ReadTestClusterNullableInt40s : public ReadAttribute {
+class ReadUnitTestingNullableInt40s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt40s()
+    ReadUnitTestingNullableInt40s()
         : ReadAttribute("nullable-int40s")
     {
     }
 
-    ~ReadTestClusterNullableInt40s() {}
+    ~ReadUnitTestingNullableInt40s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004011) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt40s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt40s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt40s read Error", error);
+                LogNSError("UnitTesting NullableInt40s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95417,9 +95417,9 @@
     }
 };
 
-class WriteTestClusterNullableInt40s : public WriteAttribute {
+class WriteUnitTestingNullableInt40s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt40s()
+    WriteUnitTestingNullableInt40s()
         : WriteAttribute("nullable-int40s")
     {
         AddArgument("attr-name", "nullable-int40s");
@@ -95427,13 +95427,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt40s() {}
+    ~WriteUnitTestingNullableInt40s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004011) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95446,7 +95446,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt40s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt40s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95457,20 +95457,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt40s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt40s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt40s()
+    SubscribeAttributeUnitTestingNullableInt40s()
         : SubscribeAttribute("nullable-int40s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt40s() {}
+    ~SubscribeAttributeUnitTestingNullableInt40s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004011) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95488,7 +95488,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt40s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt40s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95499,27 +95499,27 @@
 /*
  * Attribute NullableInt48s
  */
-class ReadTestClusterNullableInt48s : public ReadAttribute {
+class ReadUnitTestingNullableInt48s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt48s()
+    ReadUnitTestingNullableInt48s()
         : ReadAttribute("nullable-int48s")
     {
     }
 
-    ~ReadTestClusterNullableInt48s() {}
+    ~ReadUnitTestingNullableInt48s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004012) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt48s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt48s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt48s read Error", error);
+                LogNSError("UnitTesting NullableInt48s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95527,9 +95527,9 @@
     }
 };
 
-class WriteTestClusterNullableInt48s : public WriteAttribute {
+class WriteUnitTestingNullableInt48s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt48s()
+    WriteUnitTestingNullableInt48s()
         : WriteAttribute("nullable-int48s")
     {
         AddArgument("attr-name", "nullable-int48s");
@@ -95537,13 +95537,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt48s() {}
+    ~WriteUnitTestingNullableInt48s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004012) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95556,7 +95556,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt48s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt48s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95567,20 +95567,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt48s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt48s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt48s()
+    SubscribeAttributeUnitTestingNullableInt48s()
         : SubscribeAttribute("nullable-int48s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt48s() {}
+    ~SubscribeAttributeUnitTestingNullableInt48s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004012) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95598,7 +95598,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt48s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt48s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95609,27 +95609,27 @@
 /*
  * Attribute NullableInt56s
  */
-class ReadTestClusterNullableInt56s : public ReadAttribute {
+class ReadUnitTestingNullableInt56s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt56s()
+    ReadUnitTestingNullableInt56s()
         : ReadAttribute("nullable-int56s")
     {
     }
 
-    ~ReadTestClusterNullableInt56s() {}
+    ~ReadUnitTestingNullableInt56s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004013) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt56s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt56s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt56s read Error", error);
+                LogNSError("UnitTesting NullableInt56s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95637,9 +95637,9 @@
     }
 };
 
-class WriteTestClusterNullableInt56s : public WriteAttribute {
+class WriteUnitTestingNullableInt56s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt56s()
+    WriteUnitTestingNullableInt56s()
         : WriteAttribute("nullable-int56s")
     {
         AddArgument("attr-name", "nullable-int56s");
@@ -95647,13 +95647,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt56s() {}
+    ~WriteUnitTestingNullableInt56s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004013) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95666,7 +95666,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt56s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt56s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95677,20 +95677,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt56s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt56s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt56s()
+    SubscribeAttributeUnitTestingNullableInt56s()
         : SubscribeAttribute("nullable-int56s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt56s() {}
+    ~SubscribeAttributeUnitTestingNullableInt56s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004013) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95708,7 +95708,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt56s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt56s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95719,27 +95719,27 @@
 /*
  * Attribute NullableInt64s
  */
-class ReadTestClusterNullableInt64s : public ReadAttribute {
+class ReadUnitTestingNullableInt64s : public ReadAttribute {
 public:
-    ReadTestClusterNullableInt64s()
+    ReadUnitTestingNullableInt64s()
         : ReadAttribute("nullable-int64s")
     {
     }
 
-    ~ReadTestClusterNullableInt64s() {}
+    ~ReadUnitTestingNullableInt64s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004014) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableInt64s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableInt64s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableInt64s read Error", error);
+                LogNSError("UnitTesting NullableInt64s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95747,9 +95747,9 @@
     }
 };
 
-class WriteTestClusterNullableInt64s : public WriteAttribute {
+class WriteUnitTestingNullableInt64s : public WriteAttribute {
 public:
-    WriteTestClusterNullableInt64s()
+    WriteUnitTestingNullableInt64s()
         : WriteAttribute("nullable-int64s")
     {
         AddArgument("attr-name", "nullable-int64s");
@@ -95757,13 +95757,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableInt64s() {}
+    ~WriteUnitTestingNullableInt64s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004014) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95776,7 +95776,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableInt64s write Error", error);
+                                                    LogNSError("UnitTesting NullableInt64s write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -95787,20 +95787,20 @@
     int64_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableInt64s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableInt64s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableInt64s()
+    SubscribeAttributeUnitTestingNullableInt64s()
         : SubscribeAttribute("nullable-int64s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableInt64s() {}
+    ~SubscribeAttributeUnitTestingNullableInt64s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004014) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95818,7 +95818,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableInt64s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableInt64s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95829,27 +95829,27 @@
 /*
  * Attribute NullableEnum8
  */
-class ReadTestClusterNullableEnum8 : public ReadAttribute {
+class ReadUnitTestingNullableEnum8 : public ReadAttribute {
 public:
-    ReadTestClusterNullableEnum8()
+    ReadUnitTestingNullableEnum8()
         : ReadAttribute("nullable-enum8")
     {
     }
 
-    ~ReadTestClusterNullableEnum8() {}
+    ~ReadUnitTestingNullableEnum8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004015) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableEnum8 response %@", [value description]);
+            NSLog(@"UnitTesting.NullableEnum8 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableEnum8 read Error", error);
+                LogNSError("UnitTesting NullableEnum8 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95857,9 +95857,9 @@
     }
 };
 
-class WriteTestClusterNullableEnum8 : public WriteAttribute {
+class WriteUnitTestingNullableEnum8 : public WriteAttribute {
 public:
-    WriteTestClusterNullableEnum8()
+    WriteUnitTestingNullableEnum8()
         : WriteAttribute("nullable-enum8")
     {
         AddArgument("attr-name", "nullable-enum8");
@@ -95867,13 +95867,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableEnum8() {}
+    ~WriteUnitTestingNullableEnum8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004015) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95886,7 +95886,7 @@
                                                params:params
                                            completion:^(NSError * _Nullable error) {
                                                if (error != nil) {
-                                                   LogNSError("TestCluster NullableEnum8 write Error", error);
+                                                   LogNSError("UnitTesting NullableEnum8 write Error", error);
                                                }
                                                SetCommandExitStatus(error);
                                            }];
@@ -95897,20 +95897,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableEnum8 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableEnum8 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableEnum8()
+    SubscribeAttributeUnitTestingNullableEnum8()
         : SubscribeAttribute("nullable-enum8")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableEnum8() {}
+    ~SubscribeAttributeUnitTestingNullableEnum8() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004015) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -95928,7 +95928,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableEnum8 response %@", [value description]);
+                NSLog(@"UnitTesting.NullableEnum8 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -95939,27 +95939,27 @@
 /*
  * Attribute NullableEnum16
  */
-class ReadTestClusterNullableEnum16 : public ReadAttribute {
+class ReadUnitTestingNullableEnum16 : public ReadAttribute {
 public:
-    ReadTestClusterNullableEnum16()
+    ReadUnitTestingNullableEnum16()
         : ReadAttribute("nullable-enum16")
     {
     }
 
-    ~ReadTestClusterNullableEnum16() {}
+    ~ReadUnitTestingNullableEnum16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004016) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableEnum16 response %@", [value description]);
+            NSLog(@"UnitTesting.NullableEnum16 response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableEnum16 read Error", error);
+                LogNSError("UnitTesting NullableEnum16 read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -95967,9 +95967,9 @@
     }
 };
 
-class WriteTestClusterNullableEnum16 : public WriteAttribute {
+class WriteUnitTestingNullableEnum16 : public WriteAttribute {
 public:
-    WriteTestClusterNullableEnum16()
+    WriteUnitTestingNullableEnum16()
         : WriteAttribute("nullable-enum16")
     {
         AddArgument("attr-name", "nullable-enum16");
@@ -95977,13 +95977,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableEnum16() {}
+    ~WriteUnitTestingNullableEnum16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004016) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -95996,7 +95996,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableEnum16 write Error", error);
+                                                    LogNSError("UnitTesting NullableEnum16 write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -96007,20 +96007,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableEnum16 : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableEnum16 : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableEnum16()
+    SubscribeAttributeUnitTestingNullableEnum16()
         : SubscribeAttribute("nullable-enum16")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableEnum16() {}
+    ~SubscribeAttributeUnitTestingNullableEnum16() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004016) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96038,7 +96038,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableEnum16 response %@", [value description]);
+                NSLog(@"UnitTesting.NullableEnum16 response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96049,27 +96049,27 @@
 /*
  * Attribute NullableFloatSingle
  */
-class ReadTestClusterNullableFloatSingle : public ReadAttribute {
+class ReadUnitTestingNullableFloatSingle : public ReadAttribute {
 public:
-    ReadTestClusterNullableFloatSingle()
+    ReadUnitTestingNullableFloatSingle()
         : ReadAttribute("nullable-float-single")
     {
     }
 
-    ~ReadTestClusterNullableFloatSingle() {}
+    ~ReadUnitTestingNullableFloatSingle() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004017) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableFloatSingle response %@", [value description]);
+            NSLog(@"UnitTesting.NullableFloatSingle response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableFloatSingle read Error", error);
+                LogNSError("UnitTesting NullableFloatSingle read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96077,9 +96077,9 @@
     }
 };
 
-class WriteTestClusterNullableFloatSingle : public WriteAttribute {
+class WriteUnitTestingNullableFloatSingle : public WriteAttribute {
 public:
-    WriteTestClusterNullableFloatSingle()
+    WriteUnitTestingNullableFloatSingle()
         : WriteAttribute("nullable-float-single")
     {
         AddArgument("attr-name", "nullable-float-single");
@@ -96087,13 +96087,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableFloatSingle() {}
+    ~WriteUnitTestingNullableFloatSingle() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004017) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96106,7 +96106,7 @@
                                                      params:params
                                                  completion:^(NSError * _Nullable error) {
                                                      if (error != nil) {
-                                                         LogNSError("TestCluster NullableFloatSingle write Error", error);
+                                                         LogNSError("UnitTesting NullableFloatSingle write Error", error);
                                                      }
                                                      SetCommandExitStatus(error);
                                                  }];
@@ -96117,20 +96117,20 @@
     float mValue;
 };
 
-class SubscribeAttributeTestClusterNullableFloatSingle : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableFloatSingle : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableFloatSingle()
+    SubscribeAttributeUnitTestingNullableFloatSingle()
         : SubscribeAttribute("nullable-float-single")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableFloatSingle() {}
+    ~SubscribeAttributeUnitTestingNullableFloatSingle() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004017) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96148,7 +96148,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableFloatSingle response %@", [value description]);
+                NSLog(@"UnitTesting.NullableFloatSingle response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96159,27 +96159,27 @@
 /*
  * Attribute NullableFloatDouble
  */
-class ReadTestClusterNullableFloatDouble : public ReadAttribute {
+class ReadUnitTestingNullableFloatDouble : public ReadAttribute {
 public:
-    ReadTestClusterNullableFloatDouble()
+    ReadUnitTestingNullableFloatDouble()
         : ReadAttribute("nullable-float-double")
     {
     }
 
-    ~ReadTestClusterNullableFloatDouble() {}
+    ~ReadUnitTestingNullableFloatDouble() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004018) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableFloatDouble response %@", [value description]);
+            NSLog(@"UnitTesting.NullableFloatDouble response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableFloatDouble read Error", error);
+                LogNSError("UnitTesting NullableFloatDouble read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96187,9 +96187,9 @@
     }
 };
 
-class WriteTestClusterNullableFloatDouble : public WriteAttribute {
+class WriteUnitTestingNullableFloatDouble : public WriteAttribute {
 public:
-    WriteTestClusterNullableFloatDouble()
+    WriteUnitTestingNullableFloatDouble()
         : WriteAttribute("nullable-float-double")
     {
         AddArgument("attr-name", "nullable-float-double");
@@ -96197,13 +96197,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableFloatDouble() {}
+    ~WriteUnitTestingNullableFloatDouble() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004018) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96216,7 +96216,7 @@
                                                      params:params
                                                  completion:^(NSError * _Nullable error) {
                                                      if (error != nil) {
-                                                         LogNSError("TestCluster NullableFloatDouble write Error", error);
+                                                         LogNSError("UnitTesting NullableFloatDouble write Error", error);
                                                      }
                                                      SetCommandExitStatus(error);
                                                  }];
@@ -96227,20 +96227,20 @@
     double mValue;
 };
 
-class SubscribeAttributeTestClusterNullableFloatDouble : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableFloatDouble : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableFloatDouble()
+    SubscribeAttributeUnitTestingNullableFloatDouble()
         : SubscribeAttribute("nullable-float-double")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableFloatDouble() {}
+    ~SubscribeAttributeUnitTestingNullableFloatDouble() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004018) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96258,7 +96258,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableFloatDouble response %@", [value description]);
+                NSLog(@"UnitTesting.NullableFloatDouble response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96269,27 +96269,27 @@
 /*
  * Attribute NullableOctetString
  */
-class ReadTestClusterNullableOctetString : public ReadAttribute {
+class ReadUnitTestingNullableOctetString : public ReadAttribute {
 public:
-    ReadTestClusterNullableOctetString()
+    ReadUnitTestingNullableOctetString()
         : ReadAttribute("nullable-octet-string")
     {
     }
 
-    ~ReadTestClusterNullableOctetString() {}
+    ~ReadUnitTestingNullableOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004019) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableOctetString response %@", [value description]);
+            NSLog(@"UnitTesting.NullableOctetString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableOctetString read Error", error);
+                LogNSError("UnitTesting NullableOctetString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96297,9 +96297,9 @@
     }
 };
 
-class WriteTestClusterNullableOctetString : public WriteAttribute {
+class WriteUnitTestingNullableOctetString : public WriteAttribute {
 public:
-    WriteTestClusterNullableOctetString()
+    WriteUnitTestingNullableOctetString()
         : WriteAttribute("nullable-octet-string")
     {
         AddArgument("attr-name", "nullable-octet-string");
@@ -96307,13 +96307,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableOctetString() {}
+    ~WriteUnitTestingNullableOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004019) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96326,7 +96326,7 @@
                                                      params:params
                                                  completion:^(NSError * _Nullable error) {
                                                      if (error != nil) {
-                                                         LogNSError("TestCluster NullableOctetString write Error", error);
+                                                         LogNSError("UnitTesting NullableOctetString write Error", error);
                                                      }
                                                      SetCommandExitStatus(error);
                                                  }];
@@ -96337,20 +96337,20 @@
     chip::ByteSpan mValue;
 };
 
-class SubscribeAttributeTestClusterNullableOctetString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableOctetString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableOctetString()
+    SubscribeAttributeUnitTestingNullableOctetString()
         : SubscribeAttribute("nullable-octet-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableOctetString() {}
+    ~SubscribeAttributeUnitTestingNullableOctetString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004019) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96368,7 +96368,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableOctetString response %@", [value description]);
+                NSLog(@"UnitTesting.NullableOctetString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96379,27 +96379,27 @@
 /*
  * Attribute NullableCharString
  */
-class ReadTestClusterNullableCharString : public ReadAttribute {
+class ReadUnitTestingNullableCharString : public ReadAttribute {
 public:
-    ReadTestClusterNullableCharString()
+    ReadUnitTestingNullableCharString()
         : ReadAttribute("nullable-char-string")
     {
     }
 
-    ~ReadTestClusterNullableCharString() {}
+    ~ReadUnitTestingNullableCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000401E) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableCharString response %@", [value description]);
+            NSLog(@"UnitTesting.NullableCharString response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableCharString read Error", error);
+                LogNSError("UnitTesting NullableCharString read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96407,9 +96407,9 @@
     }
 };
 
-class WriteTestClusterNullableCharString : public WriteAttribute {
+class WriteUnitTestingNullableCharString : public WriteAttribute {
 public:
-    WriteTestClusterNullableCharString()
+    WriteUnitTestingNullableCharString()
         : WriteAttribute("nullable-char-string")
     {
         AddArgument("attr-name", "nullable-char-string");
@@ -96417,13 +96417,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableCharString() {}
+    ~WriteUnitTestingNullableCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000401E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96438,7 +96438,7 @@
                                                     params:params
                                                 completion:^(NSError * _Nullable error) {
                                                     if (error != nil) {
-                                                        LogNSError("TestCluster NullableCharString write Error", error);
+                                                        LogNSError("UnitTesting NullableCharString write Error", error);
                                                     }
                                                     SetCommandExitStatus(error);
                                                 }];
@@ -96449,20 +96449,20 @@
     chip::ByteSpan mValue;
 };
 
-class SubscribeAttributeTestClusterNullableCharString : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableCharString : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableCharString()
+    SubscribeAttributeUnitTestingNullableCharString()
         : SubscribeAttribute("nullable-char-string")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableCharString() {}
+    ~SubscribeAttributeUnitTestingNullableCharString() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000401E) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96480,7 +96480,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableCharString response %@", [value description]);
+                NSLog(@"UnitTesting.NullableCharString response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96491,27 +96491,27 @@
 /*
  * Attribute NullableEnumAttr
  */
-class ReadTestClusterNullableEnumAttr : public ReadAttribute {
+class ReadUnitTestingNullableEnumAttr : public ReadAttribute {
 public:
-    ReadTestClusterNullableEnumAttr()
+    ReadUnitTestingNullableEnumAttr()
         : ReadAttribute("nullable-enum-attr")
     {
     }
 
-    ~ReadTestClusterNullableEnumAttr() {}
+    ~ReadUnitTestingNullableEnumAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004024) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableEnumAttr response %@", [value description]);
+            NSLog(@"UnitTesting.NullableEnumAttr response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableEnumAttr read Error", error);
+                LogNSError("UnitTesting NullableEnumAttr read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96519,9 +96519,9 @@
     }
 };
 
-class WriteTestClusterNullableEnumAttr : public WriteAttribute {
+class WriteUnitTestingNullableEnumAttr : public WriteAttribute {
 public:
-    WriteTestClusterNullableEnumAttr()
+    WriteUnitTestingNullableEnumAttr()
         : WriteAttribute("nullable-enum-attr")
     {
         AddArgument("attr-name", "nullable-enum-attr");
@@ -96529,13 +96529,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableEnumAttr() {}
+    ~WriteUnitTestingNullableEnumAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004024) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96548,7 +96548,7 @@
                                                   params:params
                                               completion:^(NSError * _Nullable error) {
                                                   if (error != nil) {
-                                                      LogNSError("TestCluster NullableEnumAttr write Error", error);
+                                                      LogNSError("UnitTesting NullableEnumAttr write Error", error);
                                                   }
                                                   SetCommandExitStatus(error);
                                               }];
@@ -96559,20 +96559,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableEnumAttr : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableEnumAttr : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableEnumAttr()
+    SubscribeAttributeUnitTestingNullableEnumAttr()
         : SubscribeAttribute("nullable-enum-attr")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableEnumAttr() {}
+    ~SubscribeAttributeUnitTestingNullableEnumAttr() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004024) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96590,7 +96590,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableEnumAttr response %@", [value description]);
+                NSLog(@"UnitTesting.NullableEnumAttr response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96601,28 +96601,28 @@
 /*
  * Attribute NullableStruct
  */
-class ReadTestClusterNullableStruct : public ReadAttribute {
+class ReadUnitTestingNullableStruct : public ReadAttribute {
 public:
-    ReadTestClusterNullableStruct()
+    ReadUnitTestingNullableStruct()
         : ReadAttribute("nullable-struct")
     {
     }
 
-    ~ReadTestClusterNullableStruct() {}
+    ~ReadUnitTestingNullableStruct() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004025) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableStructWithCompletion:^(
-            MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableStruct response %@", [value description]);
+            MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
+            NSLog(@"UnitTesting.NullableStruct response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableStruct read Error", error);
+                LogNSError("UnitTesting NullableStruct read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96630,9 +96630,9 @@
     }
 };
 
-class WriteTestClusterNullableStruct : public WriteAttribute {
+class WriteUnitTestingNullableStruct : public WriteAttribute {
 public:
-    WriteTestClusterNullableStruct()
+    WriteUnitTestingNullableStruct()
         : WriteAttribute("nullable-struct")
         , mComplex(&mValue)
     {
@@ -96641,24 +96641,24 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableStruct() {}
+    ~WriteUnitTestingNullableStruct() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004025) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
         params.timedWriteTimeout
             = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
         params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil;
-        MTRTestClusterClusterSimpleStruct * _Nullable value;
+        MTRUnitTestingClusterSimpleStruct * _Nullable value;
         if (mValue.IsNull()) {
             value = nil;
         } else {
-            value = [MTRTestClusterClusterSimpleStruct new];
+            value = [MTRUnitTestingClusterSimpleStruct new];
             value.a = [NSNumber numberWithUnsignedChar:mValue.Value().a];
             value.b = [NSNumber numberWithBool:mValue.Value().b];
             value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(mValue.Value().c)];
@@ -96675,7 +96675,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster NullableStruct write Error", error);
+                                                    LogNSError("UnitTesting NullableStruct write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -96683,24 +96683,24 @@
     }
 
 private:
-    chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type> mValue;
-    TypedComplexArgument<chip::app::DataModel::Nullable<chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type>> mComplex;
+    chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type> mValue;
+    TypedComplexArgument<chip::app::DataModel::Nullable<chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type>> mComplex;
 };
 
-class SubscribeAttributeTestClusterNullableStruct : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableStruct : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableStruct()
+    SubscribeAttributeUnitTestingNullableStruct()
         : SubscribeAttribute("nullable-struct")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableStruct() {}
+    ~SubscribeAttributeUnitTestingNullableStruct() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004025) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96717,8 +96717,8 @@
             subscriptionEstablished:^() {
                 mSubscriptionEstablished = YES;
             }
-            reportHandler:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableStruct response %@", [value description]);
+            reportHandler:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) {
+                NSLog(@"UnitTesting.NullableStruct response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96729,27 +96729,27 @@
 /*
  * Attribute NullableRangeRestrictedInt8u
  */
-class ReadTestClusterNullableRangeRestrictedInt8u : public ReadAttribute {
+class ReadUnitTestingNullableRangeRestrictedInt8u : public ReadAttribute {
 public:
-    ReadTestClusterNullableRangeRestrictedInt8u()
+    ReadUnitTestingNullableRangeRestrictedInt8u()
         : ReadAttribute("nullable-range-restricted-int8u")
     {
     }
 
-    ~ReadTestClusterNullableRangeRestrictedInt8u() {}
+    ~ReadUnitTestingNullableRangeRestrictedInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004026) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableRangeRestrictedInt8u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableRangeRestrictedInt8u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableRangeRestrictedInt8u read Error", error);
+                LogNSError("UnitTesting NullableRangeRestrictedInt8u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96757,9 +96757,9 @@
     }
 };
 
-class WriteTestClusterNullableRangeRestrictedInt8u : public WriteAttribute {
+class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute {
 public:
-    WriteTestClusterNullableRangeRestrictedInt8u()
+    WriteUnitTestingNullableRangeRestrictedInt8u()
         : WriteAttribute("nullable-range-restricted-int8u")
     {
         AddArgument("attr-name", "nullable-range-restricted-int8u");
@@ -96767,13 +96767,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableRangeRestrictedInt8u() {}
+    ~WriteUnitTestingNullableRangeRestrictedInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004026) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96786,7 +96786,7 @@
                                                               params:params
                                                           completion:^(NSError * _Nullable error) {
                                                               if (error != nil) {
-                                                                  LogNSError("TestCluster NullableRangeRestrictedInt8u write Error",
+                                                                  LogNSError("UnitTesting NullableRangeRestrictedInt8u write Error",
                                                                       error);
                                                               }
                                                               SetCommandExitStatus(error);
@@ -96798,20 +96798,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableRangeRestrictedInt8u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableRangeRestrictedInt8u()
+    SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u()
         : SubscribeAttribute("nullable-range-restricted-int8u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableRangeRestrictedInt8u() {}
+    ~SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004026) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96829,7 +96829,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableRangeRestrictedInt8u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableRangeRestrictedInt8u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96840,27 +96840,27 @@
 /*
  * Attribute NullableRangeRestrictedInt8s
  */
-class ReadTestClusterNullableRangeRestrictedInt8s : public ReadAttribute {
+class ReadUnitTestingNullableRangeRestrictedInt8s : public ReadAttribute {
 public:
-    ReadTestClusterNullableRangeRestrictedInt8s()
+    ReadUnitTestingNullableRangeRestrictedInt8s()
         : ReadAttribute("nullable-range-restricted-int8s")
     {
     }
 
-    ~ReadTestClusterNullableRangeRestrictedInt8s() {}
+    ~ReadUnitTestingNullableRangeRestrictedInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004027) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableRangeRestrictedInt8s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableRangeRestrictedInt8s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableRangeRestrictedInt8s read Error", error);
+                LogNSError("UnitTesting NullableRangeRestrictedInt8s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96868,9 +96868,9 @@
     }
 };
 
-class WriteTestClusterNullableRangeRestrictedInt8s : public WriteAttribute {
+class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute {
 public:
-    WriteTestClusterNullableRangeRestrictedInt8s()
+    WriteUnitTestingNullableRangeRestrictedInt8s()
         : WriteAttribute("nullable-range-restricted-int8s")
     {
         AddArgument("attr-name", "nullable-range-restricted-int8s");
@@ -96878,13 +96878,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableRangeRestrictedInt8s() {}
+    ~WriteUnitTestingNullableRangeRestrictedInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004027) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -96897,7 +96897,7 @@
                                                               params:params
                                                           completion:^(NSError * _Nullable error) {
                                                               if (error != nil) {
-                                                                  LogNSError("TestCluster NullableRangeRestrictedInt8s write Error",
+                                                                  LogNSError("UnitTesting NullableRangeRestrictedInt8s write Error",
                                                                       error);
                                                               }
                                                               SetCommandExitStatus(error);
@@ -96909,20 +96909,20 @@
     int8_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableRangeRestrictedInt8s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableRangeRestrictedInt8s()
+    SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s()
         : SubscribeAttribute("nullable-range-restricted-int8s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableRangeRestrictedInt8s() {}
+    ~SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004027) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -96940,7 +96940,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableRangeRestrictedInt8s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableRangeRestrictedInt8s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -96951,27 +96951,27 @@
 /*
  * Attribute NullableRangeRestrictedInt16u
  */
-class ReadTestClusterNullableRangeRestrictedInt16u : public ReadAttribute {
+class ReadUnitTestingNullableRangeRestrictedInt16u : public ReadAttribute {
 public:
-    ReadTestClusterNullableRangeRestrictedInt16u()
+    ReadUnitTestingNullableRangeRestrictedInt16u()
         : ReadAttribute("nullable-range-restricted-int16u")
     {
     }
 
-    ~ReadTestClusterNullableRangeRestrictedInt16u() {}
+    ~ReadUnitTestingNullableRangeRestrictedInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004028) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableRangeRestrictedInt16u response %@", [value description]);
+            NSLog(@"UnitTesting.NullableRangeRestrictedInt16u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableRangeRestrictedInt16u read Error", error);
+                LogNSError("UnitTesting NullableRangeRestrictedInt16u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -96979,9 +96979,9 @@
     }
 };
 
-class WriteTestClusterNullableRangeRestrictedInt16u : public WriteAttribute {
+class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute {
 public:
-    WriteTestClusterNullableRangeRestrictedInt16u()
+    WriteUnitTestingNullableRangeRestrictedInt16u()
         : WriteAttribute("nullable-range-restricted-int16u")
     {
         AddArgument("attr-name", "nullable-range-restricted-int16u");
@@ -96989,13 +96989,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableRangeRestrictedInt16u() {}
+    ~WriteUnitTestingNullableRangeRestrictedInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004028) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -97010,7 +97010,7 @@
                                                       completion:^(NSError * _Nullable error) {
                                                           if (error != nil) {
                                                               LogNSError(
-                                                                  "TestCluster NullableRangeRestrictedInt16u write Error", error);
+                                                                  "UnitTesting NullableRangeRestrictedInt16u write Error", error);
                                                           }
                                                           SetCommandExitStatus(error);
                                                       }];
@@ -97021,20 +97021,20 @@
     uint16_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableRangeRestrictedInt16u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableRangeRestrictedInt16u()
+    SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u()
         : SubscribeAttribute("nullable-range-restricted-int16u")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableRangeRestrictedInt16u() {}
+    ~SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004028) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97052,7 +97052,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableRangeRestrictedInt16u response %@", [value description]);
+                NSLog(@"UnitTesting.NullableRangeRestrictedInt16u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97063,27 +97063,27 @@
 /*
  * Attribute NullableRangeRestrictedInt16s
  */
-class ReadTestClusterNullableRangeRestrictedInt16s : public ReadAttribute {
+class ReadUnitTestingNullableRangeRestrictedInt16s : public ReadAttribute {
 public:
-    ReadTestClusterNullableRangeRestrictedInt16s()
+    ReadUnitTestingNullableRangeRestrictedInt16s()
         : ReadAttribute("nullable-range-restricted-int16s")
     {
     }
 
-    ~ReadTestClusterNullableRangeRestrictedInt16s() {}
+    ~ReadUnitTestingNullableRangeRestrictedInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004029) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.NullableRangeRestrictedInt16s response %@", [value description]);
+            NSLog(@"UnitTesting.NullableRangeRestrictedInt16s response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster NullableRangeRestrictedInt16s read Error", error);
+                LogNSError("UnitTesting NullableRangeRestrictedInt16s read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97091,9 +97091,9 @@
     }
 };
 
-class WriteTestClusterNullableRangeRestrictedInt16s : public WriteAttribute {
+class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute {
 public:
-    WriteTestClusterNullableRangeRestrictedInt16s()
+    WriteUnitTestingNullableRangeRestrictedInt16s()
         : WriteAttribute("nullable-range-restricted-int16s")
     {
         AddArgument("attr-name", "nullable-range-restricted-int16s");
@@ -97101,13 +97101,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterNullableRangeRestrictedInt16s() {}
+    ~WriteUnitTestingNullableRangeRestrictedInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004029) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -97122,7 +97122,7 @@
                                                       completion:^(NSError * _Nullable error) {
                                                           if (error != nil) {
                                                               LogNSError(
-                                                                  "TestCluster NullableRangeRestrictedInt16s write Error", error);
+                                                                  "UnitTesting NullableRangeRestrictedInt16s write Error", error);
                                                           }
                                                           SetCommandExitStatus(error);
                                                       }];
@@ -97133,20 +97133,20 @@
     int16_t mValue;
 };
 
-class SubscribeAttributeTestClusterNullableRangeRestrictedInt16s : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterNullableRangeRestrictedInt16s()
+    SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s()
         : SubscribeAttribute("nullable-range-restricted-int16s")
     {
     }
 
-    ~SubscribeAttributeTestClusterNullableRangeRestrictedInt16s() {}
+    ~SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004029) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97164,7 +97164,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.NullableRangeRestrictedInt16s response %@", [value description]);
+                NSLog(@"UnitTesting.NullableRangeRestrictedInt16s response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97175,27 +97175,27 @@
 /*
  * Attribute WriteOnlyInt8u
  */
-class ReadTestClusterWriteOnlyInt8u : public ReadAttribute {
+class ReadUnitTestingWriteOnlyInt8u : public ReadAttribute {
 public:
-    ReadTestClusterWriteOnlyInt8u()
+    ReadUnitTestingWriteOnlyInt8u()
         : ReadAttribute("write-only-int8u")
     {
     }
 
-    ~ReadTestClusterWriteOnlyInt8u() {}
+    ~ReadUnitTestingWriteOnlyInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000402A) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeWriteOnlyInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.WriteOnlyInt8u response %@", [value description]);
+            NSLog(@"UnitTesting.WriteOnlyInt8u response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster WriteOnlyInt8u read Error", error);
+                LogNSError("UnitTesting WriteOnlyInt8u read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97203,9 +97203,9 @@
     }
 };
 
-class WriteTestClusterWriteOnlyInt8u : public WriteAttribute {
+class WriteUnitTestingWriteOnlyInt8u : public WriteAttribute {
 public:
-    WriteTestClusterWriteOnlyInt8u()
+    WriteUnitTestingWriteOnlyInt8u()
         : WriteAttribute("write-only-int8u")
     {
         AddArgument("attr-name", "write-only-int8u");
@@ -97213,13 +97213,13 @@
         WriteAttribute::AddArguments();
     }
 
-    ~WriteTestClusterWriteOnlyInt8u() {}
+    ~WriteUnitTestingWriteOnlyInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000402A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRWriteParams * params = [[MTRWriteParams alloc] init];
@@ -97232,7 +97232,7 @@
                                                 params:params
                                             completion:^(NSError * _Nullable error) {
                                                 if (error != nil) {
-                                                    LogNSError("TestCluster WriteOnlyInt8u write Error", error);
+                                                    LogNSError("UnitTesting WriteOnlyInt8u write Error", error);
                                                 }
                                                 SetCommandExitStatus(error);
                                             }];
@@ -97243,20 +97243,20 @@
     uint8_t mValue;
 };
 
-class SubscribeAttributeTestClusterWriteOnlyInt8u : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingWriteOnlyInt8u : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterWriteOnlyInt8u()
+    SubscribeAttributeUnitTestingWriteOnlyInt8u()
         : SubscribeAttribute("write-only-int8u")
     {
     }
 
-    ~SubscribeAttributeTestClusterWriteOnlyInt8u() {}
+    ~SubscribeAttributeUnitTestingWriteOnlyInt8u() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000402A) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97274,7 +97274,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.WriteOnlyInt8u response %@", [value description]);
+                NSLog(@"UnitTesting.WriteOnlyInt8u response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97285,27 +97285,27 @@
 /*
  * Attribute GeneratedCommandList
  */
-class ReadTestClusterGeneratedCommandList : public ReadAttribute {
+class ReadUnitTestingGeneratedCommandList : public ReadAttribute {
 public:
-    ReadTestClusterGeneratedCommandList()
+    ReadUnitTestingGeneratedCommandList()
         : ReadAttribute("generated-command-list")
     {
     }
 
-    ~ReadTestClusterGeneratedCommandList() {}
+    ~ReadUnitTestingGeneratedCommandList() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.GeneratedCommandList response %@", [value description]);
+            NSLog(@"UnitTesting.GeneratedCommandList response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster GeneratedCommandList read Error", error);
+                LogNSError("UnitTesting GeneratedCommandList read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97313,20 +97313,20 @@
     }
 };
 
-class SubscribeAttributeTestClusterGeneratedCommandList : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingGeneratedCommandList : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterGeneratedCommandList()
+    SubscribeAttributeUnitTestingGeneratedCommandList()
         : SubscribeAttribute("generated-command-list")
     {
     }
 
-    ~SubscribeAttributeTestClusterGeneratedCommandList() {}
+    ~SubscribeAttributeUnitTestingGeneratedCommandList() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97344,7 +97344,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.GeneratedCommandList response %@", [value description]);
+                NSLog(@"UnitTesting.GeneratedCommandList response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97355,27 +97355,27 @@
 /*
  * Attribute AcceptedCommandList
  */
-class ReadTestClusterAcceptedCommandList : public ReadAttribute {
+class ReadUnitTestingAcceptedCommandList : public ReadAttribute {
 public:
-    ReadTestClusterAcceptedCommandList()
+    ReadUnitTestingAcceptedCommandList()
         : ReadAttribute("accepted-command-list")
     {
     }
 
-    ~ReadTestClusterAcceptedCommandList() {}
+    ~ReadUnitTestingAcceptedCommandList() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.AcceptedCommandList response %@", [value description]);
+            NSLog(@"UnitTesting.AcceptedCommandList response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster AcceptedCommandList read Error", error);
+                LogNSError("UnitTesting AcceptedCommandList read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97383,20 +97383,20 @@
     }
 };
 
-class SubscribeAttributeTestClusterAcceptedCommandList : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingAcceptedCommandList : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterAcceptedCommandList()
+    SubscribeAttributeUnitTestingAcceptedCommandList()
         : SubscribeAttribute("accepted-command-list")
     {
     }
 
-    ~SubscribeAttributeTestClusterAcceptedCommandList() {}
+    ~SubscribeAttributeUnitTestingAcceptedCommandList() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97414,7 +97414,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.AcceptedCommandList response %@", [value description]);
+                NSLog(@"UnitTesting.AcceptedCommandList response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97425,27 +97425,27 @@
 /*
  * Attribute AttributeList
  */
-class ReadTestClusterAttributeList : public ReadAttribute {
+class ReadUnitTestingAttributeList : public ReadAttribute {
 public:
-    ReadTestClusterAttributeList()
+    ReadUnitTestingAttributeList()
         : ReadAttribute("attribute-list")
     {
     }
 
-    ~ReadTestClusterAttributeList() {}
+    ~ReadUnitTestingAttributeList() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.AttributeList response %@", [value description]);
+            NSLog(@"UnitTesting.AttributeList response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster AttributeList read Error", error);
+                LogNSError("UnitTesting AttributeList read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97453,20 +97453,20 @@
     }
 };
 
-class SubscribeAttributeTestClusterAttributeList : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingAttributeList : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterAttributeList()
+    SubscribeAttributeUnitTestingAttributeList()
         : SubscribeAttribute("attribute-list")
     {
     }
 
-    ~SubscribeAttributeTestClusterAttributeList() {}
+    ~SubscribeAttributeUnitTestingAttributeList() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97484,7 +97484,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.AttributeList response %@", [value description]);
+                NSLog(@"UnitTesting.AttributeList response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97495,27 +97495,27 @@
 /*
  * Attribute FeatureMap
  */
-class ReadTestClusterFeatureMap : public ReadAttribute {
+class ReadUnitTestingFeatureMap : public ReadAttribute {
 public:
-    ReadTestClusterFeatureMap()
+    ReadUnitTestingFeatureMap()
         : ReadAttribute("feature-map")
     {
     }
 
-    ~ReadTestClusterFeatureMap() {}
+    ~ReadUnitTestingFeatureMap() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.FeatureMap response %@", [value description]);
+            NSLog(@"UnitTesting.FeatureMap response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster FeatureMap read Error", error);
+                LogNSError("UnitTesting FeatureMap read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97523,20 +97523,20 @@
     }
 };
 
-class SubscribeAttributeTestClusterFeatureMap : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingFeatureMap : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterFeatureMap()
+    SubscribeAttributeUnitTestingFeatureMap()
         : SubscribeAttribute("feature-map")
     {
     }
 
-    ~SubscribeAttributeTestClusterFeatureMap() {}
+    ~SubscribeAttributeUnitTestingFeatureMap() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97554,7 +97554,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.FeatureMap response %@", [value description]);
+                NSLog(@"UnitTesting.FeatureMap response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -97565,27 +97565,27 @@
 /*
  * Attribute ClusterRevision
  */
-class ReadTestClusterClusterRevision : public ReadAttribute {
+class ReadUnitTestingClusterRevision : public ReadAttribute {
 public:
-    ReadTestClusterClusterRevision()
+    ReadUnitTestingClusterRevision()
         : ReadAttribute("cluster-revision")
     {
     }
 
-    ~ReadTestClusterClusterRevision() {}
+    ~ReadUnitTestingClusterRevision() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId);
 
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-            NSLog(@"TestCluster.ClusterRevision response %@", [value description]);
+            NSLog(@"UnitTesting.ClusterRevision response %@", [value description]);
             if (error != nil) {
-                LogNSError("TestCluster ClusterRevision read Error", error);
+                LogNSError("UnitTesting ClusterRevision read Error", error);
             }
             SetCommandExitStatus(error);
         }];
@@ -97593,20 +97593,20 @@
     }
 };
 
-class SubscribeAttributeTestClusterClusterRevision : public SubscribeAttribute {
+class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute {
 public:
-    SubscribeAttributeTestClusterClusterRevision()
+    SubscribeAttributeUnitTestingClusterRevision()
         : SubscribeAttribute("cluster-revision")
     {
     }
 
-    ~SubscribeAttributeTestClusterClusterRevision() {}
+    ~SubscribeAttributeUnitTestingClusterRevision() {}
 
     CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
     {
         ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId);
         dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(endpointId)
                                                                                           queue:callbackQueue];
         MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
@@ -97624,7 +97624,7 @@
                 mSubscriptionEstablished = YES;
             }
             reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
-                NSLog(@"TestCluster.ClusterRevision response %@", [value description]);
+                NSLog(@"UnitTesting.ClusterRevision response %@", [value description]);
                 SetCommandExitStatus(error);
             }];
 
@@ -100902,295 +100902,295 @@
 
     commands.Register(clusterName, clusterCommands);
 }
-void registerClusterTestCluster(Commands & commands)
+void registerClusterUnitTesting(Commands & commands)
 {
-    using namespace chip::app::Clusters::TestCluster;
+    using namespace chip::app::Clusters::UnitTesting;
 
-    const char * clusterName = "TestCluster";
+    const char * clusterName = "UnitTesting";
 
     commands_list clusterCommands = {
         make_unique<ClusterCommand>(Id), //
-        make_unique<TestClusterTest>(), //
-        make_unique<TestClusterTestNotHandled>(), //
-        make_unique<TestClusterTestSpecific>(), //
-        make_unique<TestClusterTestUnknownCommand>(), //
-        make_unique<TestClusterTestAddArguments>(), //
-        make_unique<TestClusterTestSimpleArgumentRequest>(), //
-        make_unique<TestClusterTestStructArrayArgumentRequest>(), //
-        make_unique<TestClusterTestStructArgumentRequest>(), //
-        make_unique<TestClusterTestNestedStructArgumentRequest>(), //
-        make_unique<TestClusterTestListStructArgumentRequest>(), //
-        make_unique<TestClusterTestListInt8UArgumentRequest>(), //
-        make_unique<TestClusterTestNestedStructListArgumentRequest>(), //
-        make_unique<TestClusterTestListNestedStructListArgumentRequest>(), //
-        make_unique<TestClusterTestListInt8UReverseRequest>(), //
-        make_unique<TestClusterTestEnumsRequest>(), //
-        make_unique<TestClusterTestNullableOptionalRequest>(), //
-        make_unique<TestClusterTestComplexNullableOptionalRequest>(), //
-        make_unique<TestClusterSimpleStructEchoRequest>(), //
-        make_unique<TestClusterTimedInvokeRequest>(), //
-        make_unique<TestClusterTestSimpleOptionalArgumentRequest>(), //
-        make_unique<TestClusterTestEmitTestEventRequest>(), //
-        make_unique<TestClusterTestEmitTestFabricScopedEventRequest>(), //
+        make_unique<UnitTestingTest>(), //
+        make_unique<UnitTestingTestNotHandled>(), //
+        make_unique<UnitTestingTestSpecific>(), //
+        make_unique<UnitTestingTestUnknownCommand>(), //
+        make_unique<UnitTestingTestAddArguments>(), //
+        make_unique<UnitTestingTestSimpleArgumentRequest>(), //
+        make_unique<UnitTestingTestStructArrayArgumentRequest>(), //
+        make_unique<UnitTestingTestStructArgumentRequest>(), //
+        make_unique<UnitTestingTestNestedStructArgumentRequest>(), //
+        make_unique<UnitTestingTestListStructArgumentRequest>(), //
+        make_unique<UnitTestingTestListInt8UArgumentRequest>(), //
+        make_unique<UnitTestingTestNestedStructListArgumentRequest>(), //
+        make_unique<UnitTestingTestListNestedStructListArgumentRequest>(), //
+        make_unique<UnitTestingTestListInt8UReverseRequest>(), //
+        make_unique<UnitTestingTestEnumsRequest>(), //
+        make_unique<UnitTestingTestNullableOptionalRequest>(), //
+        make_unique<UnitTestingTestComplexNullableOptionalRequest>(), //
+        make_unique<UnitTestingSimpleStructEchoRequest>(), //
+        make_unique<UnitTestingTimedInvokeRequest>(), //
+        make_unique<UnitTestingTestSimpleOptionalArgumentRequest>(), //
+        make_unique<UnitTestingTestEmitTestEventRequest>(), //
+        make_unique<UnitTestingTestEmitTestFabricScopedEventRequest>(), //
         make_unique<ReadAttribute>(Id), //
-        make_unique<ReadTestClusterBoolean>(), //
+        make_unique<ReadUnitTestingBoolean>(), //
         make_unique<WriteAttribute>(Id), //
-        make_unique<WriteTestClusterBoolean>(), //
+        make_unique<WriteUnitTestingBoolean>(), //
         make_unique<SubscribeAttribute>(Id), //
-        make_unique<SubscribeAttributeTestClusterBoolean>(), //
-        make_unique<ReadTestClusterBitmap8>(), //
-        make_unique<WriteTestClusterBitmap8>(), //
-        make_unique<SubscribeAttributeTestClusterBitmap8>(), //
-        make_unique<ReadTestClusterBitmap16>(), //
-        make_unique<WriteTestClusterBitmap16>(), //
-        make_unique<SubscribeAttributeTestClusterBitmap16>(), //
-        make_unique<ReadTestClusterBitmap32>(), //
-        make_unique<WriteTestClusterBitmap32>(), //
-        make_unique<SubscribeAttributeTestClusterBitmap32>(), //
-        make_unique<ReadTestClusterBitmap64>(), //
-        make_unique<WriteTestClusterBitmap64>(), //
-        make_unique<SubscribeAttributeTestClusterBitmap64>(), //
-        make_unique<ReadTestClusterInt8u>(), //
-        make_unique<WriteTestClusterInt8u>(), //
-        make_unique<SubscribeAttributeTestClusterInt8u>(), //
-        make_unique<ReadTestClusterInt16u>(), //
-        make_unique<WriteTestClusterInt16u>(), //
-        make_unique<SubscribeAttributeTestClusterInt16u>(), //
-        make_unique<ReadTestClusterInt24u>(), //
-        make_unique<WriteTestClusterInt24u>(), //
-        make_unique<SubscribeAttributeTestClusterInt24u>(), //
-        make_unique<ReadTestClusterInt32u>(), //
-        make_unique<WriteTestClusterInt32u>(), //
-        make_unique<SubscribeAttributeTestClusterInt32u>(), //
-        make_unique<ReadTestClusterInt40u>(), //
-        make_unique<WriteTestClusterInt40u>(), //
-        make_unique<SubscribeAttributeTestClusterInt40u>(), //
-        make_unique<ReadTestClusterInt48u>(), //
-        make_unique<WriteTestClusterInt48u>(), //
-        make_unique<SubscribeAttributeTestClusterInt48u>(), //
-        make_unique<ReadTestClusterInt56u>(), //
-        make_unique<WriteTestClusterInt56u>(), //
-        make_unique<SubscribeAttributeTestClusterInt56u>(), //
-        make_unique<ReadTestClusterInt64u>(), //
-        make_unique<WriteTestClusterInt64u>(), //
-        make_unique<SubscribeAttributeTestClusterInt64u>(), //
-        make_unique<ReadTestClusterInt8s>(), //
-        make_unique<WriteTestClusterInt8s>(), //
-        make_unique<SubscribeAttributeTestClusterInt8s>(), //
-        make_unique<ReadTestClusterInt16s>(), //
-        make_unique<WriteTestClusterInt16s>(), //
-        make_unique<SubscribeAttributeTestClusterInt16s>(), //
-        make_unique<ReadTestClusterInt24s>(), //
-        make_unique<WriteTestClusterInt24s>(), //
-        make_unique<SubscribeAttributeTestClusterInt24s>(), //
-        make_unique<ReadTestClusterInt32s>(), //
-        make_unique<WriteTestClusterInt32s>(), //
-        make_unique<SubscribeAttributeTestClusterInt32s>(), //
-        make_unique<ReadTestClusterInt40s>(), //
-        make_unique<WriteTestClusterInt40s>(), //
-        make_unique<SubscribeAttributeTestClusterInt40s>(), //
-        make_unique<ReadTestClusterInt48s>(), //
-        make_unique<WriteTestClusterInt48s>(), //
-        make_unique<SubscribeAttributeTestClusterInt48s>(), //
-        make_unique<ReadTestClusterInt56s>(), //
-        make_unique<WriteTestClusterInt56s>(), //
-        make_unique<SubscribeAttributeTestClusterInt56s>(), //
-        make_unique<ReadTestClusterInt64s>(), //
-        make_unique<WriteTestClusterInt64s>(), //
-        make_unique<SubscribeAttributeTestClusterInt64s>(), //
-        make_unique<ReadTestClusterEnum8>(), //
-        make_unique<WriteTestClusterEnum8>(), //
-        make_unique<SubscribeAttributeTestClusterEnum8>(), //
-        make_unique<ReadTestClusterEnum16>(), //
-        make_unique<WriteTestClusterEnum16>(), //
-        make_unique<SubscribeAttributeTestClusterEnum16>(), //
-        make_unique<ReadTestClusterFloatSingle>(), //
-        make_unique<WriteTestClusterFloatSingle>(), //
-        make_unique<SubscribeAttributeTestClusterFloatSingle>(), //
-        make_unique<ReadTestClusterFloatDouble>(), //
-        make_unique<WriteTestClusterFloatDouble>(), //
-        make_unique<SubscribeAttributeTestClusterFloatDouble>(), //
-        make_unique<ReadTestClusterOctetString>(), //
-        make_unique<WriteTestClusterOctetString>(), //
-        make_unique<SubscribeAttributeTestClusterOctetString>(), //
-        make_unique<ReadTestClusterListInt8u>(), //
-        make_unique<WriteTestClusterListInt8u>(), //
-        make_unique<SubscribeAttributeTestClusterListInt8u>(), //
-        make_unique<ReadTestClusterListOctetString>(), //
-        make_unique<WriteTestClusterListOctetString>(), //
-        make_unique<SubscribeAttributeTestClusterListOctetString>(), //
-        make_unique<ReadTestClusterListStructOctetString>(), //
-        make_unique<WriteTestClusterListStructOctetString>(), //
-        make_unique<SubscribeAttributeTestClusterListStructOctetString>(), //
-        make_unique<ReadTestClusterLongOctetString>(), //
-        make_unique<WriteTestClusterLongOctetString>(), //
-        make_unique<SubscribeAttributeTestClusterLongOctetString>(), //
-        make_unique<ReadTestClusterCharString>(), //
-        make_unique<WriteTestClusterCharString>(), //
-        make_unique<SubscribeAttributeTestClusterCharString>(), //
-        make_unique<ReadTestClusterLongCharString>(), //
-        make_unique<WriteTestClusterLongCharString>(), //
-        make_unique<SubscribeAttributeTestClusterLongCharString>(), //
-        make_unique<ReadTestClusterEpochUs>(), //
-        make_unique<WriteTestClusterEpochUs>(), //
-        make_unique<SubscribeAttributeTestClusterEpochUs>(), //
-        make_unique<ReadTestClusterEpochS>(), //
-        make_unique<WriteTestClusterEpochS>(), //
-        make_unique<SubscribeAttributeTestClusterEpochS>(), //
-        make_unique<ReadTestClusterVendorId>(), //
-        make_unique<WriteTestClusterVendorId>(), //
-        make_unique<SubscribeAttributeTestClusterVendorId>(), //
-        make_unique<ReadTestClusterListNullablesAndOptionalsStruct>(), //
-        make_unique<WriteTestClusterListNullablesAndOptionalsStruct>(), //
-        make_unique<SubscribeAttributeTestClusterListNullablesAndOptionalsStruct>(), //
-        make_unique<ReadTestClusterEnumAttr>(), //
-        make_unique<WriteTestClusterEnumAttr>(), //
-        make_unique<SubscribeAttributeTestClusterEnumAttr>(), //
-        make_unique<ReadTestClusterStructAttr>(), //
-        make_unique<WriteTestClusterStructAttr>(), //
-        make_unique<SubscribeAttributeTestClusterStructAttr>(), //
-        make_unique<ReadTestClusterRangeRestrictedInt8u>(), //
-        make_unique<WriteTestClusterRangeRestrictedInt8u>(), //
-        make_unique<SubscribeAttributeTestClusterRangeRestrictedInt8u>(), //
-        make_unique<ReadTestClusterRangeRestrictedInt8s>(), //
-        make_unique<WriteTestClusterRangeRestrictedInt8s>(), //
-        make_unique<SubscribeAttributeTestClusterRangeRestrictedInt8s>(), //
-        make_unique<ReadTestClusterRangeRestrictedInt16u>(), //
-        make_unique<WriteTestClusterRangeRestrictedInt16u>(), //
-        make_unique<SubscribeAttributeTestClusterRangeRestrictedInt16u>(), //
-        make_unique<ReadTestClusterRangeRestrictedInt16s>(), //
-        make_unique<WriteTestClusterRangeRestrictedInt16s>(), //
-        make_unique<SubscribeAttributeTestClusterRangeRestrictedInt16s>(), //
-        make_unique<ReadTestClusterListLongOctetString>(), //
-        make_unique<WriteTestClusterListLongOctetString>(), //
-        make_unique<SubscribeAttributeTestClusterListLongOctetString>(), //
-        make_unique<ReadTestClusterListFabricScoped>(), //
-        make_unique<WriteTestClusterListFabricScoped>(), //
-        make_unique<SubscribeAttributeTestClusterListFabricScoped>(), //
-        make_unique<ReadTestClusterTimedWriteBoolean>(), //
-        make_unique<WriteTestClusterTimedWriteBoolean>(), //
-        make_unique<SubscribeAttributeTestClusterTimedWriteBoolean>(), //
-        make_unique<ReadTestClusterGeneralErrorBoolean>(), //
-        make_unique<WriteTestClusterGeneralErrorBoolean>(), //
-        make_unique<SubscribeAttributeTestClusterGeneralErrorBoolean>(), //
-        make_unique<ReadTestClusterClusterErrorBoolean>(), //
-        make_unique<WriteTestClusterClusterErrorBoolean>(), //
-        make_unique<SubscribeAttributeTestClusterClusterErrorBoolean>(), //
-        make_unique<ReadTestClusterUnsupported>(), //
-        make_unique<WriteTestClusterUnsupported>(), //
-        make_unique<SubscribeAttributeTestClusterUnsupported>(), //
-        make_unique<ReadTestClusterNullableBoolean>(), //
-        make_unique<WriteTestClusterNullableBoolean>(), //
-        make_unique<SubscribeAttributeTestClusterNullableBoolean>(), //
-        make_unique<ReadTestClusterNullableBitmap8>(), //
-        make_unique<WriteTestClusterNullableBitmap8>(), //
-        make_unique<SubscribeAttributeTestClusterNullableBitmap8>(), //
-        make_unique<ReadTestClusterNullableBitmap16>(), //
-        make_unique<WriteTestClusterNullableBitmap16>(), //
-        make_unique<SubscribeAttributeTestClusterNullableBitmap16>(), //
-        make_unique<ReadTestClusterNullableBitmap32>(), //
-        make_unique<WriteTestClusterNullableBitmap32>(), //
-        make_unique<SubscribeAttributeTestClusterNullableBitmap32>(), //
-        make_unique<ReadTestClusterNullableBitmap64>(), //
-        make_unique<WriteTestClusterNullableBitmap64>(), //
-        make_unique<SubscribeAttributeTestClusterNullableBitmap64>(), //
-        make_unique<ReadTestClusterNullableInt8u>(), //
-        make_unique<WriteTestClusterNullableInt8u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt8u>(), //
-        make_unique<ReadTestClusterNullableInt16u>(), //
-        make_unique<WriteTestClusterNullableInt16u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt16u>(), //
-        make_unique<ReadTestClusterNullableInt24u>(), //
-        make_unique<WriteTestClusterNullableInt24u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt24u>(), //
-        make_unique<ReadTestClusterNullableInt32u>(), //
-        make_unique<WriteTestClusterNullableInt32u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt32u>(), //
-        make_unique<ReadTestClusterNullableInt40u>(), //
-        make_unique<WriteTestClusterNullableInt40u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt40u>(), //
-        make_unique<ReadTestClusterNullableInt48u>(), //
-        make_unique<WriteTestClusterNullableInt48u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt48u>(), //
-        make_unique<ReadTestClusterNullableInt56u>(), //
-        make_unique<WriteTestClusterNullableInt56u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt56u>(), //
-        make_unique<ReadTestClusterNullableInt64u>(), //
-        make_unique<WriteTestClusterNullableInt64u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt64u>(), //
-        make_unique<ReadTestClusterNullableInt8s>(), //
-        make_unique<WriteTestClusterNullableInt8s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt8s>(), //
-        make_unique<ReadTestClusterNullableInt16s>(), //
-        make_unique<WriteTestClusterNullableInt16s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt16s>(), //
-        make_unique<ReadTestClusterNullableInt24s>(), //
-        make_unique<WriteTestClusterNullableInt24s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt24s>(), //
-        make_unique<ReadTestClusterNullableInt32s>(), //
-        make_unique<WriteTestClusterNullableInt32s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt32s>(), //
-        make_unique<ReadTestClusterNullableInt40s>(), //
-        make_unique<WriteTestClusterNullableInt40s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt40s>(), //
-        make_unique<ReadTestClusterNullableInt48s>(), //
-        make_unique<WriteTestClusterNullableInt48s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt48s>(), //
-        make_unique<ReadTestClusterNullableInt56s>(), //
-        make_unique<WriteTestClusterNullableInt56s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt56s>(), //
-        make_unique<ReadTestClusterNullableInt64s>(), //
-        make_unique<WriteTestClusterNullableInt64s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableInt64s>(), //
-        make_unique<ReadTestClusterNullableEnum8>(), //
-        make_unique<WriteTestClusterNullableEnum8>(), //
-        make_unique<SubscribeAttributeTestClusterNullableEnum8>(), //
-        make_unique<ReadTestClusterNullableEnum16>(), //
-        make_unique<WriteTestClusterNullableEnum16>(), //
-        make_unique<SubscribeAttributeTestClusterNullableEnum16>(), //
-        make_unique<ReadTestClusterNullableFloatSingle>(), //
-        make_unique<WriteTestClusterNullableFloatSingle>(), //
-        make_unique<SubscribeAttributeTestClusterNullableFloatSingle>(), //
-        make_unique<ReadTestClusterNullableFloatDouble>(), //
-        make_unique<WriteTestClusterNullableFloatDouble>(), //
-        make_unique<SubscribeAttributeTestClusterNullableFloatDouble>(), //
-        make_unique<ReadTestClusterNullableOctetString>(), //
-        make_unique<WriteTestClusterNullableOctetString>(), //
-        make_unique<SubscribeAttributeTestClusterNullableOctetString>(), //
-        make_unique<ReadTestClusterNullableCharString>(), //
-        make_unique<WriteTestClusterNullableCharString>(), //
-        make_unique<SubscribeAttributeTestClusterNullableCharString>(), //
-        make_unique<ReadTestClusterNullableEnumAttr>(), //
-        make_unique<WriteTestClusterNullableEnumAttr>(), //
-        make_unique<SubscribeAttributeTestClusterNullableEnumAttr>(), //
-        make_unique<ReadTestClusterNullableStruct>(), //
-        make_unique<WriteTestClusterNullableStruct>(), //
-        make_unique<SubscribeAttributeTestClusterNullableStruct>(), //
-        make_unique<ReadTestClusterNullableRangeRestrictedInt8u>(), //
-        make_unique<WriteTestClusterNullableRangeRestrictedInt8u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableRangeRestrictedInt8u>(), //
-        make_unique<ReadTestClusterNullableRangeRestrictedInt8s>(), //
-        make_unique<WriteTestClusterNullableRangeRestrictedInt8s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableRangeRestrictedInt8s>(), //
-        make_unique<ReadTestClusterNullableRangeRestrictedInt16u>(), //
-        make_unique<WriteTestClusterNullableRangeRestrictedInt16u>(), //
-        make_unique<SubscribeAttributeTestClusterNullableRangeRestrictedInt16u>(), //
-        make_unique<ReadTestClusterNullableRangeRestrictedInt16s>(), //
-        make_unique<WriteTestClusterNullableRangeRestrictedInt16s>(), //
-        make_unique<SubscribeAttributeTestClusterNullableRangeRestrictedInt16s>(), //
-        make_unique<ReadTestClusterWriteOnlyInt8u>(), //
-        make_unique<WriteTestClusterWriteOnlyInt8u>(), //
-        make_unique<SubscribeAttributeTestClusterWriteOnlyInt8u>(), //
-        make_unique<ReadTestClusterGeneratedCommandList>(), //
-        make_unique<SubscribeAttributeTestClusterGeneratedCommandList>(), //
-        make_unique<ReadTestClusterAcceptedCommandList>(), //
-        make_unique<SubscribeAttributeTestClusterAcceptedCommandList>(), //
-        make_unique<ReadTestClusterAttributeList>(), //
-        make_unique<SubscribeAttributeTestClusterAttributeList>(), //
-        make_unique<ReadTestClusterFeatureMap>(), //
-        make_unique<SubscribeAttributeTestClusterFeatureMap>(), //
-        make_unique<ReadTestClusterClusterRevision>(), //
-        make_unique<SubscribeAttributeTestClusterClusterRevision>(), //
+        make_unique<SubscribeAttributeUnitTestingBoolean>(), //
+        make_unique<ReadUnitTestingBitmap8>(), //
+        make_unique<WriteUnitTestingBitmap8>(), //
+        make_unique<SubscribeAttributeUnitTestingBitmap8>(), //
+        make_unique<ReadUnitTestingBitmap16>(), //
+        make_unique<WriteUnitTestingBitmap16>(), //
+        make_unique<SubscribeAttributeUnitTestingBitmap16>(), //
+        make_unique<ReadUnitTestingBitmap32>(), //
+        make_unique<WriteUnitTestingBitmap32>(), //
+        make_unique<SubscribeAttributeUnitTestingBitmap32>(), //
+        make_unique<ReadUnitTestingBitmap64>(), //
+        make_unique<WriteUnitTestingBitmap64>(), //
+        make_unique<SubscribeAttributeUnitTestingBitmap64>(), //
+        make_unique<ReadUnitTestingInt8u>(), //
+        make_unique<WriteUnitTestingInt8u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt8u>(), //
+        make_unique<ReadUnitTestingInt16u>(), //
+        make_unique<WriteUnitTestingInt16u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt16u>(), //
+        make_unique<ReadUnitTestingInt24u>(), //
+        make_unique<WriteUnitTestingInt24u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt24u>(), //
+        make_unique<ReadUnitTestingInt32u>(), //
+        make_unique<WriteUnitTestingInt32u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt32u>(), //
+        make_unique<ReadUnitTestingInt40u>(), //
+        make_unique<WriteUnitTestingInt40u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt40u>(), //
+        make_unique<ReadUnitTestingInt48u>(), //
+        make_unique<WriteUnitTestingInt48u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt48u>(), //
+        make_unique<ReadUnitTestingInt56u>(), //
+        make_unique<WriteUnitTestingInt56u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt56u>(), //
+        make_unique<ReadUnitTestingInt64u>(), //
+        make_unique<WriteUnitTestingInt64u>(), //
+        make_unique<SubscribeAttributeUnitTestingInt64u>(), //
+        make_unique<ReadUnitTestingInt8s>(), //
+        make_unique<WriteUnitTestingInt8s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt8s>(), //
+        make_unique<ReadUnitTestingInt16s>(), //
+        make_unique<WriteUnitTestingInt16s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt16s>(), //
+        make_unique<ReadUnitTestingInt24s>(), //
+        make_unique<WriteUnitTestingInt24s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt24s>(), //
+        make_unique<ReadUnitTestingInt32s>(), //
+        make_unique<WriteUnitTestingInt32s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt32s>(), //
+        make_unique<ReadUnitTestingInt40s>(), //
+        make_unique<WriteUnitTestingInt40s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt40s>(), //
+        make_unique<ReadUnitTestingInt48s>(), //
+        make_unique<WriteUnitTestingInt48s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt48s>(), //
+        make_unique<ReadUnitTestingInt56s>(), //
+        make_unique<WriteUnitTestingInt56s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt56s>(), //
+        make_unique<ReadUnitTestingInt64s>(), //
+        make_unique<WriteUnitTestingInt64s>(), //
+        make_unique<SubscribeAttributeUnitTestingInt64s>(), //
+        make_unique<ReadUnitTestingEnum8>(), //
+        make_unique<WriteUnitTestingEnum8>(), //
+        make_unique<SubscribeAttributeUnitTestingEnum8>(), //
+        make_unique<ReadUnitTestingEnum16>(), //
+        make_unique<WriteUnitTestingEnum16>(), //
+        make_unique<SubscribeAttributeUnitTestingEnum16>(), //
+        make_unique<ReadUnitTestingFloatSingle>(), //
+        make_unique<WriteUnitTestingFloatSingle>(), //
+        make_unique<SubscribeAttributeUnitTestingFloatSingle>(), //
+        make_unique<ReadUnitTestingFloatDouble>(), //
+        make_unique<WriteUnitTestingFloatDouble>(), //
+        make_unique<SubscribeAttributeUnitTestingFloatDouble>(), //
+        make_unique<ReadUnitTestingOctetString>(), //
+        make_unique<WriteUnitTestingOctetString>(), //
+        make_unique<SubscribeAttributeUnitTestingOctetString>(), //
+        make_unique<ReadUnitTestingListInt8u>(), //
+        make_unique<WriteUnitTestingListInt8u>(), //
+        make_unique<SubscribeAttributeUnitTestingListInt8u>(), //
+        make_unique<ReadUnitTestingListOctetString>(), //
+        make_unique<WriteUnitTestingListOctetString>(), //
+        make_unique<SubscribeAttributeUnitTestingListOctetString>(), //
+        make_unique<ReadUnitTestingListStructOctetString>(), //
+        make_unique<WriteUnitTestingListStructOctetString>(), //
+        make_unique<SubscribeAttributeUnitTestingListStructOctetString>(), //
+        make_unique<ReadUnitTestingLongOctetString>(), //
+        make_unique<WriteUnitTestingLongOctetString>(), //
+        make_unique<SubscribeAttributeUnitTestingLongOctetString>(), //
+        make_unique<ReadUnitTestingCharString>(), //
+        make_unique<WriteUnitTestingCharString>(), //
+        make_unique<SubscribeAttributeUnitTestingCharString>(), //
+        make_unique<ReadUnitTestingLongCharString>(), //
+        make_unique<WriteUnitTestingLongCharString>(), //
+        make_unique<SubscribeAttributeUnitTestingLongCharString>(), //
+        make_unique<ReadUnitTestingEpochUs>(), //
+        make_unique<WriteUnitTestingEpochUs>(), //
+        make_unique<SubscribeAttributeUnitTestingEpochUs>(), //
+        make_unique<ReadUnitTestingEpochS>(), //
+        make_unique<WriteUnitTestingEpochS>(), //
+        make_unique<SubscribeAttributeUnitTestingEpochS>(), //
+        make_unique<ReadUnitTestingVendorId>(), //
+        make_unique<WriteUnitTestingVendorId>(), //
+        make_unique<SubscribeAttributeUnitTestingVendorId>(), //
+        make_unique<ReadUnitTestingListNullablesAndOptionalsStruct>(), //
+        make_unique<WriteUnitTestingListNullablesAndOptionalsStruct>(), //
+        make_unique<SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct>(), //
+        make_unique<ReadUnitTestingEnumAttr>(), //
+        make_unique<WriteUnitTestingEnumAttr>(), //
+        make_unique<SubscribeAttributeUnitTestingEnumAttr>(), //
+        make_unique<ReadUnitTestingStructAttr>(), //
+        make_unique<WriteUnitTestingStructAttr>(), //
+        make_unique<SubscribeAttributeUnitTestingStructAttr>(), //
+        make_unique<ReadUnitTestingRangeRestrictedInt8u>(), //
+        make_unique<WriteUnitTestingRangeRestrictedInt8u>(), //
+        make_unique<SubscribeAttributeUnitTestingRangeRestrictedInt8u>(), //
+        make_unique<ReadUnitTestingRangeRestrictedInt8s>(), //
+        make_unique<WriteUnitTestingRangeRestrictedInt8s>(), //
+        make_unique<SubscribeAttributeUnitTestingRangeRestrictedInt8s>(), //
+        make_unique<ReadUnitTestingRangeRestrictedInt16u>(), //
+        make_unique<WriteUnitTestingRangeRestrictedInt16u>(), //
+        make_unique<SubscribeAttributeUnitTestingRangeRestrictedInt16u>(), //
+        make_unique<ReadUnitTestingRangeRestrictedInt16s>(), //
+        make_unique<WriteUnitTestingRangeRestrictedInt16s>(), //
+        make_unique<SubscribeAttributeUnitTestingRangeRestrictedInt16s>(), //
+        make_unique<ReadUnitTestingListLongOctetString>(), //
+        make_unique<WriteUnitTestingListLongOctetString>(), //
+        make_unique<SubscribeAttributeUnitTestingListLongOctetString>(), //
+        make_unique<ReadUnitTestingListFabricScoped>(), //
+        make_unique<WriteUnitTestingListFabricScoped>(), //
+        make_unique<SubscribeAttributeUnitTestingListFabricScoped>(), //
+        make_unique<ReadUnitTestingTimedWriteBoolean>(), //
+        make_unique<WriteUnitTestingTimedWriteBoolean>(), //
+        make_unique<SubscribeAttributeUnitTestingTimedWriteBoolean>(), //
+        make_unique<ReadUnitTestingGeneralErrorBoolean>(), //
+        make_unique<WriteUnitTestingGeneralErrorBoolean>(), //
+        make_unique<SubscribeAttributeUnitTestingGeneralErrorBoolean>(), //
+        make_unique<ReadUnitTestingClusterErrorBoolean>(), //
+        make_unique<WriteUnitTestingClusterErrorBoolean>(), //
+        make_unique<SubscribeAttributeUnitTestingClusterErrorBoolean>(), //
+        make_unique<ReadUnitTestingUnsupported>(), //
+        make_unique<WriteUnitTestingUnsupported>(), //
+        make_unique<SubscribeAttributeUnitTestingUnsupported>(), //
+        make_unique<ReadUnitTestingNullableBoolean>(), //
+        make_unique<WriteUnitTestingNullableBoolean>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableBoolean>(), //
+        make_unique<ReadUnitTestingNullableBitmap8>(), //
+        make_unique<WriteUnitTestingNullableBitmap8>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableBitmap8>(), //
+        make_unique<ReadUnitTestingNullableBitmap16>(), //
+        make_unique<WriteUnitTestingNullableBitmap16>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableBitmap16>(), //
+        make_unique<ReadUnitTestingNullableBitmap32>(), //
+        make_unique<WriteUnitTestingNullableBitmap32>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableBitmap32>(), //
+        make_unique<ReadUnitTestingNullableBitmap64>(), //
+        make_unique<WriteUnitTestingNullableBitmap64>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableBitmap64>(), //
+        make_unique<ReadUnitTestingNullableInt8u>(), //
+        make_unique<WriteUnitTestingNullableInt8u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt8u>(), //
+        make_unique<ReadUnitTestingNullableInt16u>(), //
+        make_unique<WriteUnitTestingNullableInt16u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt16u>(), //
+        make_unique<ReadUnitTestingNullableInt24u>(), //
+        make_unique<WriteUnitTestingNullableInt24u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt24u>(), //
+        make_unique<ReadUnitTestingNullableInt32u>(), //
+        make_unique<WriteUnitTestingNullableInt32u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt32u>(), //
+        make_unique<ReadUnitTestingNullableInt40u>(), //
+        make_unique<WriteUnitTestingNullableInt40u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt40u>(), //
+        make_unique<ReadUnitTestingNullableInt48u>(), //
+        make_unique<WriteUnitTestingNullableInt48u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt48u>(), //
+        make_unique<ReadUnitTestingNullableInt56u>(), //
+        make_unique<WriteUnitTestingNullableInt56u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt56u>(), //
+        make_unique<ReadUnitTestingNullableInt64u>(), //
+        make_unique<WriteUnitTestingNullableInt64u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt64u>(), //
+        make_unique<ReadUnitTestingNullableInt8s>(), //
+        make_unique<WriteUnitTestingNullableInt8s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt8s>(), //
+        make_unique<ReadUnitTestingNullableInt16s>(), //
+        make_unique<WriteUnitTestingNullableInt16s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt16s>(), //
+        make_unique<ReadUnitTestingNullableInt24s>(), //
+        make_unique<WriteUnitTestingNullableInt24s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt24s>(), //
+        make_unique<ReadUnitTestingNullableInt32s>(), //
+        make_unique<WriteUnitTestingNullableInt32s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt32s>(), //
+        make_unique<ReadUnitTestingNullableInt40s>(), //
+        make_unique<WriteUnitTestingNullableInt40s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt40s>(), //
+        make_unique<ReadUnitTestingNullableInt48s>(), //
+        make_unique<WriteUnitTestingNullableInt48s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt48s>(), //
+        make_unique<ReadUnitTestingNullableInt56s>(), //
+        make_unique<WriteUnitTestingNullableInt56s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt56s>(), //
+        make_unique<ReadUnitTestingNullableInt64s>(), //
+        make_unique<WriteUnitTestingNullableInt64s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableInt64s>(), //
+        make_unique<ReadUnitTestingNullableEnum8>(), //
+        make_unique<WriteUnitTestingNullableEnum8>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableEnum8>(), //
+        make_unique<ReadUnitTestingNullableEnum16>(), //
+        make_unique<WriteUnitTestingNullableEnum16>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableEnum16>(), //
+        make_unique<ReadUnitTestingNullableFloatSingle>(), //
+        make_unique<WriteUnitTestingNullableFloatSingle>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableFloatSingle>(), //
+        make_unique<ReadUnitTestingNullableFloatDouble>(), //
+        make_unique<WriteUnitTestingNullableFloatDouble>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableFloatDouble>(), //
+        make_unique<ReadUnitTestingNullableOctetString>(), //
+        make_unique<WriteUnitTestingNullableOctetString>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableOctetString>(), //
+        make_unique<ReadUnitTestingNullableCharString>(), //
+        make_unique<WriteUnitTestingNullableCharString>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableCharString>(), //
+        make_unique<ReadUnitTestingNullableEnumAttr>(), //
+        make_unique<WriteUnitTestingNullableEnumAttr>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableEnumAttr>(), //
+        make_unique<ReadUnitTestingNullableStruct>(), //
+        make_unique<WriteUnitTestingNullableStruct>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableStruct>(), //
+        make_unique<ReadUnitTestingNullableRangeRestrictedInt8u>(), //
+        make_unique<WriteUnitTestingNullableRangeRestrictedInt8u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u>(), //
+        make_unique<ReadUnitTestingNullableRangeRestrictedInt8s>(), //
+        make_unique<WriteUnitTestingNullableRangeRestrictedInt8s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s>(), //
+        make_unique<ReadUnitTestingNullableRangeRestrictedInt16u>(), //
+        make_unique<WriteUnitTestingNullableRangeRestrictedInt16u>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u>(), //
+        make_unique<ReadUnitTestingNullableRangeRestrictedInt16s>(), //
+        make_unique<WriteUnitTestingNullableRangeRestrictedInt16s>(), //
+        make_unique<SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s>(), //
+        make_unique<ReadUnitTestingWriteOnlyInt8u>(), //
+        make_unique<WriteUnitTestingWriteOnlyInt8u>(), //
+        make_unique<SubscribeAttributeUnitTestingWriteOnlyInt8u>(), //
+        make_unique<ReadUnitTestingGeneratedCommandList>(), //
+        make_unique<SubscribeAttributeUnitTestingGeneratedCommandList>(), //
+        make_unique<ReadUnitTestingAcceptedCommandList>(), //
+        make_unique<SubscribeAttributeUnitTestingAcceptedCommandList>(), //
+        make_unique<ReadUnitTestingAttributeList>(), //
+        make_unique<SubscribeAttributeUnitTestingAttributeList>(), //
+        make_unique<ReadUnitTestingFeatureMap>(), //
+        make_unique<SubscribeAttributeUnitTestingFeatureMap>(), //
+        make_unique<ReadUnitTestingClusterRevision>(), //
+        make_unique<SubscribeAttributeUnitTestingClusterRevision>(), //
     };
 
     commands.Register(clusterName, clusterCommands);
@@ -101278,5 +101278,5 @@
     registerClusterApplicationBasic(commands);
     registerClusterAccountLogin(commands);
     registerClusterElectricalMeasurement(commands);
-    registerClusterTestCluster(commands);
+    registerClusterUnitTesting(commands);
 }
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h
index 071d53c..0c4c3e8 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h
@@ -74977,7 +74977,7 @@
     CHIP_ERROR TestSendTestCommand_1()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -74996,7 +74996,7 @@
     CHIP_ERROR TestSendTestNotHandledCommand_2()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75016,13 +75016,13 @@
     CHIP_ERROR TestSendTestSpecificCommand_3()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
         [cluster testSpecificWithCompletion:^(
-            MTRTestClusterClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable err) {
+            MTRUnitTestingClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable err) {
             NSLog(@"Send Test Specific Command Error: %@", err);
 
             VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0));
@@ -75041,16 +75041,16 @@
     CHIP_ERROR TestSendTestAddArgumentsCommand_4()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:3U];
         params.arg2 = [NSNumber numberWithUnsignedChar:17U];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send Test Add Arguments Command Error: %@", err);
 
@@ -75070,16 +75070,16 @@
     CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:250U];
         params.arg2 = [NSNumber numberWithUnsignedChar:6U];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send failing Test Add Arguments Command Error: %@", err);
 
@@ -75097,7 +75097,7 @@
     CHIP_ERROR TestReadAttributeBooleanDefaultValue_6()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75121,7 +75121,7 @@
     CHIP_ERROR TestWriteAttributeBooleanTrue_7()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75143,7 +75143,7 @@
     CHIP_ERROR TestReadAttributeBooleanTrue_8()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75167,7 +75167,7 @@
     CHIP_ERROR TestWriteAttributeBooleanFalse_9()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75189,7 +75189,7 @@
     CHIP_ERROR TestReadAttributeBooleanFalse_10()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75213,7 +75213,7 @@
     CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75237,7 +75237,7 @@
     CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75259,7 +75259,7 @@
     CHIP_ERROR TestReadAttributeBitmap8MaxValue_13()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75283,7 +75283,7 @@
     CHIP_ERROR TestWriteAttributeBitmap8MinValue_14()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75305,7 +75305,7 @@
     CHIP_ERROR TestReadAttributeBitmap8MinValue_15()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75329,7 +75329,7 @@
     CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75353,7 +75353,7 @@
     CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75375,7 +75375,7 @@
     CHIP_ERROR TestReadAttributeBitmap16MaxValue_18()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75399,7 +75399,7 @@
     CHIP_ERROR TestWriteAttributeBitmap16MinValue_19()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75421,7 +75421,7 @@
     CHIP_ERROR TestReadAttributeBitmap16MinValue_20()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75445,7 +75445,7 @@
     CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75469,7 +75469,7 @@
     CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75491,7 +75491,7 @@
     CHIP_ERROR TestReadAttributeBitmap32MaxValue_23()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75515,7 +75515,7 @@
     CHIP_ERROR TestWriteAttributeBitmap32MinValue_24()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75537,7 +75537,7 @@
     CHIP_ERROR TestReadAttributeBitmap32MinValue_25()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75561,7 +75561,7 @@
     CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75585,7 +75585,7 @@
     CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75607,7 +75607,7 @@
     CHIP_ERROR TestReadAttributeBitmap64MaxValue_28()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75631,7 +75631,7 @@
     CHIP_ERROR TestWriteAttributeBitmap64MinValue_29()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75653,7 +75653,7 @@
     CHIP_ERROR TestReadAttributeBitmap64MinValue_30()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75677,7 +75677,7 @@
     CHIP_ERROR TestReadAttributeInt8uDefaultValue_31()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75701,7 +75701,7 @@
     CHIP_ERROR TestWriteAttributeInt8uMaxValue_32()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75723,7 +75723,7 @@
     CHIP_ERROR TestReadAttributeInt8uMaxValue_33()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75747,7 +75747,7 @@
     CHIP_ERROR TestWriteAttributeInt8uMinValue_34()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75769,7 +75769,7 @@
     CHIP_ERROR TestReadAttributeInt8uMinValue_35()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75793,7 +75793,7 @@
     CHIP_ERROR TestReadAttributeInt16uDefaultValue_36()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75817,7 +75817,7 @@
     CHIP_ERROR TestWriteAttributeInt16uMaxValue_37()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75839,7 +75839,7 @@
     CHIP_ERROR TestReadAttributeInt16uMaxValue_38()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75863,7 +75863,7 @@
     CHIP_ERROR TestWriteAttributeInt16uMinValue_39()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75885,7 +75885,7 @@
     CHIP_ERROR TestReadAttributeInt16uMinValue_40()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75909,7 +75909,7 @@
     CHIP_ERROR TestReadAttributeInt32uDefaultValue_41()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75933,7 +75933,7 @@
     CHIP_ERROR TestWriteAttributeInt32uMaxValue_42()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75955,7 +75955,7 @@
     CHIP_ERROR TestReadAttributeInt32uMaxValue_43()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -75979,7 +75979,7 @@
     CHIP_ERROR TestWriteAttributeInt32uMinValue_44()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76001,7 +76001,7 @@
     CHIP_ERROR TestReadAttributeInt32uMinValue_45()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76025,7 +76025,7 @@
     CHIP_ERROR TestReadAttributeInt64uDefaultValue_46()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76049,7 +76049,7 @@
     CHIP_ERROR TestWriteAttributeInt64uMaxValue_47()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76071,7 +76071,7 @@
     CHIP_ERROR TestReadAttributeInt64uMaxValue_48()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76095,7 +76095,7 @@
     CHIP_ERROR TestWriteAttributeInt64uMinValue_49()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76117,7 +76117,7 @@
     CHIP_ERROR TestReadAttributeInt64uMinValue_50()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76141,7 +76141,7 @@
     CHIP_ERROR TestReadAttributeInt8sDefaultValue_51()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76165,7 +76165,7 @@
     CHIP_ERROR TestWriteAttributeInt8sMaxValue_52()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76187,7 +76187,7 @@
     CHIP_ERROR TestReadAttributeInt8sMaxValue_53()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76211,7 +76211,7 @@
     CHIP_ERROR TestWriteAttributeInt8sMinValue_54()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76233,7 +76233,7 @@
     CHIP_ERROR TestReadAttributeInt8sMinValue_55()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76257,7 +76257,7 @@
     CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76279,7 +76279,7 @@
     CHIP_ERROR TestReadAttributeInt8sDefaultValue_57()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76303,7 +76303,7 @@
     CHIP_ERROR TestReadAttributeInt16sDefaultValue_58()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76327,7 +76327,7 @@
     CHIP_ERROR TestWriteAttributeInt16sMaxValue_59()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76349,7 +76349,7 @@
     CHIP_ERROR TestReadAttributeInt16sMaxValue_60()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76373,7 +76373,7 @@
     CHIP_ERROR TestWriteAttributeInt16sMinValue_61()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76395,7 +76395,7 @@
     CHIP_ERROR TestReadAttributeInt16sMinValue_62()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76419,7 +76419,7 @@
     CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76441,7 +76441,7 @@
     CHIP_ERROR TestReadAttributeInt16sDefaultValue_64()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76465,7 +76465,7 @@
     CHIP_ERROR TestReadAttributeInt32sDefaultValue_65()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76489,7 +76489,7 @@
     CHIP_ERROR TestWriteAttributeInt32sMaxValue_66()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76511,7 +76511,7 @@
     CHIP_ERROR TestReadAttributeInt32sMaxValue_67()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76535,7 +76535,7 @@
     CHIP_ERROR TestWriteAttributeInt32sMinValue_68()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76557,7 +76557,7 @@
     CHIP_ERROR TestReadAttributeInt32sMinValue_69()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76581,7 +76581,7 @@
     CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76603,7 +76603,7 @@
     CHIP_ERROR TestReadAttributeInt32sDefaultValue_71()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76627,7 +76627,7 @@
     CHIP_ERROR TestReadAttributeInt64sDefaultValue_72()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76651,7 +76651,7 @@
     CHIP_ERROR TestWriteAttributeInt64sMaxValue_73()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76673,7 +76673,7 @@
     CHIP_ERROR TestReadAttributeInt64sMaxValue_74()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76697,7 +76697,7 @@
     CHIP_ERROR TestWriteAttributeInt64sMinValue_75()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76719,7 +76719,7 @@
     CHIP_ERROR TestReadAttributeInt64sMinValue_76()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76743,7 +76743,7 @@
     CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76765,7 +76765,7 @@
     CHIP_ERROR TestReadAttributeInt64sDefaultValue_78()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76789,7 +76789,7 @@
     CHIP_ERROR TestReadAttributeSingleDefaultValue_79()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76813,7 +76813,7 @@
     CHIP_ERROR TestWriteAttributeSingleMediumValue_80()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76835,7 +76835,7 @@
     CHIP_ERROR TestReadAttributeSingleMediumValue_81()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76859,7 +76859,7 @@
     CHIP_ERROR TestWriteAttributeSingleLargeValue_82()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76881,7 +76881,7 @@
     CHIP_ERROR TestReadAttributeSingleLargeValue_83()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76905,7 +76905,7 @@
     CHIP_ERROR TestWriteAttributeSingleSmallValue_84()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76927,7 +76927,7 @@
     CHIP_ERROR TestReadAttributeSingleSmallValue_85()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76951,7 +76951,7 @@
     CHIP_ERROR TestWriteAttributeSingleDefaultValue_86()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76973,7 +76973,7 @@
     CHIP_ERROR TestReadAttributeSingleDefaultValue_87()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -76997,7 +76997,7 @@
     CHIP_ERROR TestReadAttributeDoubleDefaultValue_88()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77021,7 +77021,7 @@
     CHIP_ERROR TestWriteAttributeDoubleMediumValue_89()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77043,7 +77043,7 @@
     CHIP_ERROR TestReadAttributeDoubleMediumValue_90()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77067,7 +77067,7 @@
     CHIP_ERROR TestWriteAttributeDoubleLargeValue_91()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77089,7 +77089,7 @@
     CHIP_ERROR TestReadAttributeDoubleLargeValue_92()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77113,7 +77113,7 @@
     CHIP_ERROR TestWriteAttributeDoubleSmallValue_93()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77135,7 +77135,7 @@
     CHIP_ERROR TestReadAttributeDoubleSmallValue_94()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77159,7 +77159,7 @@
     CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77181,7 +77181,7 @@
     CHIP_ERROR TestReadAttributeDoubleDefaultValue_96()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77205,7 +77205,7 @@
     CHIP_ERROR TestReadAttributeEnum8DefaultValue_97()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77229,7 +77229,7 @@
     CHIP_ERROR TestWriteAttributeEnum8MaxValue_98()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77251,7 +77251,7 @@
     CHIP_ERROR TestReadAttributeEnum8MaxValue_99()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77275,7 +77275,7 @@
     CHIP_ERROR TestWriteAttributeEnum8MinValue_100()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77297,7 +77297,7 @@
     CHIP_ERROR TestReadAttributeEnum8MinValue_101()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77321,7 +77321,7 @@
     CHIP_ERROR TestReadAttributeEnum16DefaultValue_102()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77345,7 +77345,7 @@
     CHIP_ERROR TestWriteAttributeEnum16MaxValue_103()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77367,7 +77367,7 @@
     CHIP_ERROR TestReadAttributeEnum16MaxValue_104()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77391,7 +77391,7 @@
     CHIP_ERROR TestWriteAttributeEnum16MinValue_105()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77413,7 +77413,7 @@
     CHIP_ERROR TestReadAttributeEnum16MinValue_106()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77437,7 +77437,7 @@
     CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77461,7 +77461,7 @@
     CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77483,7 +77483,7 @@
     CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77508,7 +77508,7 @@
     CHIP_ERROR TestWriteAttributeOctetStringWithHexFormat_110()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77530,7 +77530,7 @@
     CHIP_ERROR TestReadAttributeOctetStringWithHexFormat_111()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77555,7 +77555,7 @@
     CHIP_ERROR TestWriteAttributeOctetStringWithWeirdChars_112()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77577,7 +77577,7 @@
     CHIP_ERROR TestReadAttributeOctetStringWithWeirdChars_113()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77602,7 +77602,7 @@
     CHIP_ERROR TestWriteAttributeOctetString_114()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77624,7 +77624,7 @@
     CHIP_ERROR TestReadAttributeOctetString_115()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77649,7 +77649,7 @@
     CHIP_ERROR TestWriteAttributeOctetString_116()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77675,7 +77675,7 @@
     CHIP_ERROR TestReadAttributeOctetString_117()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77700,7 +77700,7 @@
     CHIP_ERROR TestWriteAttributeOctetString_118()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77722,7 +77722,7 @@
     CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_119()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77746,7 +77746,7 @@
     CHIP_ERROR TestWriteAttributeLongOctetString_120()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77772,7 +77772,7 @@
     CHIP_ERROR TestReadAttributeLongOctetString_121()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77802,7 +77802,7 @@
     CHIP_ERROR TestWriteAttributeLongOctetString_122()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77824,7 +77824,7 @@
     CHIP_ERROR TestReadAttributeCharStringDefaultValue_123()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77848,7 +77848,7 @@
     CHIP_ERROR TestWriteAttributeCharString_124()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77870,7 +77870,7 @@
     CHIP_ERROR TestReadAttributeCharString_125()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77894,7 +77894,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValueTooLong_126()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77920,7 +77920,7 @@
     CHIP_ERROR TestReadAttributeCharString_127()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77944,7 +77944,7 @@
     CHIP_ERROR TestWriteAttributeCharStringEmpty_128()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77966,7 +77966,7 @@
     CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_129()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -77990,7 +77990,7 @@
     CHIP_ERROR TestWriteAttributeLongCharString_130()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78015,7 +78015,7 @@
     CHIP_ERROR TestReadAttributeLongCharString_131()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78042,7 +78042,7 @@
     CHIP_ERROR TestWriteAttributeLongCharString_132()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78064,7 +78064,7 @@
     CHIP_ERROR TestReadAttributeListLongOctetStringForChunkedRead_133()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78124,7 +78124,7 @@
     CHIP_ERROR TestWriteAttributeListLongOctetStringForChunkedWrite_134()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78190,7 +78190,7 @@
     CHIP_ERROR TestReadAttributeListLongOctetStringForChunkedRead_135()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78259,7 +78259,7 @@
     CHIP_ERROR TestReadAttributeEpochUsDefaultValue_136()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78283,7 +78283,7 @@
     CHIP_ERROR TestWriteAttributeEpochUsMaxValue_137()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78305,7 +78305,7 @@
     CHIP_ERROR TestReadAttributeEpochUsMaxValue_138()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78329,7 +78329,7 @@
     CHIP_ERROR TestWriteAttributeEpochUsMinValue_139()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78351,7 +78351,7 @@
     CHIP_ERROR TestReadAttributeEpochUsMinValue_140()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78375,7 +78375,7 @@
     CHIP_ERROR TestReadAttributeEpochSDefaultValue_141()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78399,7 +78399,7 @@
     CHIP_ERROR TestWriteAttributeEpochSMaxValue_142()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78421,7 +78421,7 @@
     CHIP_ERROR TestReadAttributeEpochSMaxValue_143()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78445,7 +78445,7 @@
     CHIP_ERROR TestWriteAttributeEpochSMinValue_144()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78467,7 +78467,7 @@
     CHIP_ERROR TestReadAttributeEpochSMinValue_145()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78491,7 +78491,7 @@
     CHIP_ERROR TestReadAttributeUnsupported_146()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78520,7 +78520,7 @@
     CHIP_ERROR TestWriteattributeUnsupported_147()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78547,7 +78547,7 @@
     CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_148()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(200)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78567,7 +78567,7 @@
     CHIP_ERROR TestSendTestCommandToUnsupportedCluster_149()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(0)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78587,7 +78587,7 @@
     CHIP_ERROR TestReadAttributeVendorIdDefaultValue_150()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78611,7 +78611,7 @@
     CHIP_ERROR TestWriteAttributeVendorId_151()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78633,7 +78633,7 @@
     CHIP_ERROR TestReadAttributeVendorId_152()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78657,7 +78657,7 @@
     CHIP_ERROR TestRestoreAttributeVendorId_153()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -78679,17 +78679,17 @@
     CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_154()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestEnumsRequestParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedShort:20003U];
         params.arg2 = [NSNumber numberWithUnsignedChar:1U];
         [cluster
             testEnumsRequestWithParams:params
-                            completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) {
+                            completion:^(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) {
                                 NSLog(@"Send a command with a vendor_id and enum Error: %@", err);
 
                                 VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0));
@@ -78713,17 +78713,17 @@
     CHIP_ERROR TestSendACommandWithAVendorIdAndInvalidEnum_155()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestEnumsRequestParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedShort:20003U];
         params.arg2 = [NSNumber numberWithUnsignedChar:101U];
         [cluster
             testEnumsRequestWithParams:params
-                            completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) {
+                            completion:^(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) {
                                 NSLog(@"Send a command with a vendor_id and invalid enum Error: %@", err);
 
                                 VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0));
@@ -78747,24 +78747,24 @@
     CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_156()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.0f];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0];
+        __auto_type * params = [[MTRUnitTestingClusterTestStructArgumentRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:true];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.0f];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0];
 
         [cluster testStructArgumentRequestWithParams:params
-                                          completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                          completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                               NSError * _Nullable err) {
                                               NSLog(@"Send Test Command With Struct Argument and arg1.b is true Error: %@", err);
 
@@ -78784,24 +78784,24 @@
     CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_157()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:false];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.0f];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0];
+        __auto_type * params = [[MTRUnitTestingClusterTestStructArgumentRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:false];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.0f];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0];
 
         [cluster testStructArgumentRequestWithParams:params
-                                          completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                          completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                               NSError * _Nullable err) {
                                               NSLog(@"Send Test Command With Struct Argument and arg1.b is false Error: %@", err);
 
@@ -78821,35 +78821,35 @@
     CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_158()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterNestedStruct alloc] init];
-        ((MTRTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterNestedStruct *) params.arg1).c = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).a =
+        __auto_type * params = [[MTRUnitTestingClusterTestNestedStructArgumentRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterNestedStruct alloc] init];
+        ((MTRUnitTestingClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
+        ((MTRUnitTestingClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true];
+        ((MTRUnitTestingClusterNestedStruct *) params.arg1).c = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).a =
             [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).b =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).b =
             [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).c =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).c =
             [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).d =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).d =
             [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).f =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).f =
             [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).g =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).g =
             [NSNumber numberWithFloat:0.0f];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).h =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).h =
             [NSNumber numberWithDouble:0];
 
         [cluster
             testNestedStructArgumentRequestWithParams:params
-                                           completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                           completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                NSError * _Nullable err) {
                                                NSLog(
                                                    @"Send Test Command With Nested Struct Argument and arg1.c.b is true Error: %@",
@@ -78871,35 +78871,35 @@
     CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_159()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterNestedStruct alloc] init];
-        ((MTRTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterNestedStruct *) params.arg1).c = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).a =
+        __auto_type * params = [[MTRUnitTestingClusterTestNestedStructArgumentRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterNestedStruct alloc] init];
+        ((MTRUnitTestingClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
+        ((MTRUnitTestingClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true];
+        ((MTRUnitTestingClusterNestedStruct *) params.arg1).c = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).a =
             [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).b =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).b =
             [NSNumber numberWithBool:false];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).c =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).c =
             [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).d =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).d =
             [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).f =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).f =
             [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).g =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).g =
             [NSNumber numberWithFloat:0.0f];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStruct *) params.arg1).c).h =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStruct *) params.arg1).c).h =
             [NSNumber numberWithDouble:0];
 
         [cluster
             testNestedStructArgumentRequestWithParams:params
-                                           completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                           completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                NSError * _Nullable err) {
                                                NSLog(@"Send Test Command With Nested Struct Argument arg1.c.b is false Error: %@",
                                                    err);
@@ -78920,79 +78920,79 @@
     CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_160()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterNestedStructList alloc] init];
-        ((MTRTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterNestedStructList *) params.arg1).c = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).a =
+        __auto_type * params = [[MTRUnitTestingClusterTestNestedStructListArgumentRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterNestedStructList alloc] init];
+        ((MTRUnitTestingClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
+        ((MTRUnitTestingClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true];
+        ((MTRUnitTestingClusterNestedStructList *) params.arg1).c = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).a =
             [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).b =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).b =
             [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).c =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).c =
             [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).d =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).d =
             [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).f =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).f =
             [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).g =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).g =
             [NSNumber numberWithFloat:0.0f];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).h =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).h =
             [NSNumber numberWithDouble:0];
 
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
-            temp_1[0] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0];
+            temp_1[0] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0];
 
-            temp_1[1] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0];
+            temp_1[1] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0];
 
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).d = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).d = temp_1;
         }
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
             temp_1[0] = [NSNumber numberWithUnsignedInt:1UL];
             temp_1[1] = [NSNumber numberWithUnsignedInt:2UL];
             temp_1[2] = [NSNumber numberWithUnsignedInt:3UL];
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).e = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).e = temp_1;
         }
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
             temp_1[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14];
             temp_1[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15];
             temp_1[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14];
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).f = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).f = temp_1;
         }
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
             temp_1[0] = [NSNumber numberWithUnsignedChar:0U];
             temp_1[1] = [NSNumber numberWithUnsignedChar:255U];
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).g = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).g = temp_1;
         }
 
         [cluster testNestedStructListArgumentRequestWithParams:params
-                                                    completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                    completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                         NSError * _Nullable err) {
                                                         NSLog(@"Send Test Command With Nested Struct List Argument and all fields "
                                                               @"b of arg1.d are true Error: %@",
@@ -79014,79 +79014,79 @@
     CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_161()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterNestedStructList alloc] init];
-        ((MTRTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterNestedStructList *) params.arg1).c = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).a =
+        __auto_type * params = [[MTRUnitTestingClusterTestNestedStructListArgumentRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterNestedStructList alloc] init];
+        ((MTRUnitTestingClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U];
+        ((MTRUnitTestingClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true];
+        ((MTRUnitTestingClusterNestedStructList *) params.arg1).c = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).a =
             [NSNumber numberWithUnsignedChar:0U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).b =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).b =
             [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).c =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).c =
             [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).d =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).d =
             [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).f =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).f =
             [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).g =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).g =
             [NSNumber numberWithFloat:0.0f];
-        ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) params.arg1).c).h =
+        ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) params.arg1).c).h =
             [NSNumber numberWithDouble:0];
 
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
-            temp_1[0] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0];
+            temp_1[0] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0];
 
-            temp_1[1] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:false];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0];
+            temp_1[1] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:false];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0];
 
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).d = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).d = temp_1;
         }
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
             temp_1[0] = [NSNumber numberWithUnsignedInt:1UL];
             temp_1[1] = [NSNumber numberWithUnsignedInt:2UL];
             temp_1[2] = [NSNumber numberWithUnsignedInt:3UL];
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).e = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).e = temp_1;
         }
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
             temp_1[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14];
             temp_1[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15];
             temp_1[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14];
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).f = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).f = temp_1;
         }
         {
             NSMutableArray * temp_1 = [[NSMutableArray alloc] init];
             temp_1[0] = [NSNumber numberWithUnsignedChar:0U];
             temp_1[1] = [NSNumber numberWithUnsignedChar:255U];
-            ((MTRTestClusterClusterNestedStructList *) params.arg1).g = temp_1;
+            ((MTRUnitTestingClusterNestedStructList *) params.arg1).g = temp_1;
         }
 
         [cluster testNestedStructListArgumentRequestWithParams:params
-                                                    completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                    completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                         NSError * _Nullable err) {
                                                         NSLog(@"Send Test Command With Nested Struct List Argument and some fields "
                                                               @"b of arg1.d are false Error: %@",
@@ -79108,25 +79108,25 @@
     CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_162()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init];
-        params.arg1 = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:17U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:false];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).e = @"char_string";
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.1f];
-        ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0.1];
+        __auto_type * params = [[MTRUnitTestingClusterSimpleStructEchoRequestParams alloc] init];
+        params.arg1 = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:17U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:false];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).e = @"char_string";
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.1f];
+        ((MTRUnitTestingClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0.1];
 
         [cluster
             simpleStructEchoRequestWithParams:params
-                                   completion:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values,
+                                   completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable values,
                                        NSError * _Nullable err) {
                                        NSLog(@"Send Test Command With Struct Argument and see what we get back Error: %@", err);
 
@@ -79135,22 +79135,22 @@
                                        {
                                            id actualValue = values.arg1;
                                            VerifyOrReturn(
-                                               CheckValue("a", ((MTRTestClusterClusterSimpleStruct *) actualValue).a, 17U));
+                                               CheckValue("a", ((MTRUnitTestingClusterSimpleStruct *) actualValue).a, 17U));
                                            VerifyOrReturn(
-                                               CheckValue("b", ((MTRTestClusterClusterSimpleStruct *) actualValue).b, false));
+                                               CheckValue("b", ((MTRUnitTestingClusterSimpleStruct *) actualValue).b, false));
                                            VerifyOrReturn(
-                                               CheckValue("c", ((MTRTestClusterClusterSimpleStruct *) actualValue).c, 2U));
+                                               CheckValue("c", ((MTRUnitTestingClusterSimpleStruct *) actualValue).c, 2U));
                                            VerifyOrReturn(
-                                               CheckValueAsString("d", ((MTRTestClusterClusterSimpleStruct *) actualValue).d,
+                                               CheckValueAsString("d", ((MTRUnitTestingClusterSimpleStruct *) actualValue).d,
                                                    [[NSData alloc] initWithBytes:"octet_string" length:12]));
                                            VerifyOrReturn(CheckValueAsString(
-                                               "e", ((MTRTestClusterClusterSimpleStruct *) actualValue).e, @"char_string"));
+                                               "e", ((MTRUnitTestingClusterSimpleStruct *) actualValue).e, @"char_string"));
                                            VerifyOrReturn(
-                                               CheckValue("f", ((MTRTestClusterClusterSimpleStruct *) actualValue).f, 1U));
+                                               CheckValue("f", ((MTRUnitTestingClusterSimpleStruct *) actualValue).f, 1U));
                                            VerifyOrReturn(
-                                               CheckValue("g", ((MTRTestClusterClusterSimpleStruct *) actualValue).g, 0.1f));
+                                               CheckValue("g", ((MTRUnitTestingClusterSimpleStruct *) actualValue).g, 0.1f));
                                            VerifyOrReturn(
-                                               CheckValue("h", ((MTRTestClusterClusterSimpleStruct *) actualValue).h, 0.1));
+                                               CheckValue("h", ((MTRUnitTestingClusterSimpleStruct *) actualValue).h, 0.1));
                                        }
 
                                        NextTest();
@@ -79162,12 +79162,12 @@
     CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_163()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListInt8UArgumentRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
             temp_0[0] = [NSNumber numberWithUnsignedChar:1U];
@@ -79183,7 +79183,7 @@
         }
         [cluster
             testListInt8UArgumentRequestWithParams:params
-                                        completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                        completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                             NSError * _Nullable err) {
                                             NSLog(@"Send Test Command With List of INT8U and none of them is set to 0 Error: %@",
                                                 err);
@@ -79204,12 +79204,12 @@
     CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_164()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListInt8UArgumentRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
             temp_0[0] = [NSNumber numberWithUnsignedChar:1U];
@@ -79226,7 +79226,7 @@
         }
         [cluster
             testListInt8UArgumentRequestWithParams:params
-                                        completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                        completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                             NSError * _Nullable err) {
                                             NSLog(
                                                 @"Send Test Command With List of INT8U and one of them is set to 0 Error: %@", err);
@@ -79247,12 +79247,12 @@
     CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_165()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListInt8UReverseRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
             temp_0[0] = [NSNumber numberWithUnsignedChar:1U];
@@ -79268,7 +79268,7 @@
         }
         [cluster
             testListInt8UReverseRequestWithParams:params
-                                       completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values,
+                                       completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable values,
                                            NSError * _Nullable err) {
                                            NSLog(@"Send Test Command With List of INT8U and get it reversed Error: %@", err);
 
@@ -79297,19 +79297,19 @@
     CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_166()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListInt8UReverseRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
             params.arg1 = temp_0;
         }
         [cluster
             testListInt8UReverseRequestWithParams:params
-                                       completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values,
+                                       completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable values,
                                            NSError * _Nullable err) {
                                            NSLog(@"Send Test Command With empty List of INT8U and get an empty list back Error: %@",
                                                err);
@@ -79330,38 +79330,38 @@
     CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_167()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListStructArgumentRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
-            temp_0[0] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:2U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).e = @"first_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0];
+            temp_0[0] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:2U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).e = @"first_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0];
 
-            temp_0[1] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:3U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).e = @"second_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0];
+            temp_0[1] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:3U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).e = @"second_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0];
 
             params.arg1 = temp_0;
         }
         [cluster testListStructArgumentRequestWithParams:params
-                                              completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                              completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                   NSError * _Nullable err) {
                                                   NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item "
                                                         @"is true Error: %@",
@@ -79383,38 +79383,38 @@
     CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_168()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListStructArgumentRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
-            temp_0[0] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:3U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).e = @"second_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0];
+            temp_0[0] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:3U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).e = @"second_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0];
 
-            temp_0[1] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:0U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:false];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:2U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).e = @"first_char_string";
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0];
+            temp_0[1] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:0U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:false];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:2U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).e = @"first_char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1U];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0.0f];
+            ((MTRUnitTestingClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0];
 
             params.arg1 = temp_0;
         }
         [cluster testListStructArgumentRequestWithParams:params
-                                              completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                              completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                   NSError * _Nullable err) {
                                                   NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item "
                                                         @"is false Error: %@",
@@ -79436,85 +79436,85 @@
     CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_169()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
-            temp_0[0] = [[MTRTestClusterClusterNestedStructList alloc] init];
-            ((MTRTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U];
-            ((MTRTestClusterClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).a =
+            temp_0[0] = [[MTRUnitTestingClusterNestedStructList alloc] init];
+            ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U];
+            ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).a =
                 [NSNumber numberWithUnsignedChar:0U];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).b =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).b =
                 [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).c =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).c =
                 [NSNumber numberWithUnsignedChar:2U];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).d =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).d =
                 [[NSData alloc] initWithBytes:"octet_string" length:12];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).e = @"char_string";
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).f =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).e = @"char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).f =
                 [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).g =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).g =
                 [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).h =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).h =
                 [NSNumber numberWithDouble:0];
 
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
-                temp_2[0] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
+                temp_2[0] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
                                                                                              length:19];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string";
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0.0f];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string";
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0.0f];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0];
 
-                temp_2[1] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:true];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
+                temp_2[1] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:true];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
                                                                                              length:19];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string";
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0.0f];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string";
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0.0f];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0];
 
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).d = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).d = temp_2;
             }
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
                 temp_2[0] = [NSNumber numberWithUnsignedInt:1UL];
                 temp_2[1] = [NSNumber numberWithUnsignedInt:2UL];
                 temp_2[2] = [NSNumber numberWithUnsignedInt:3UL];
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).e = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).e = temp_2;
             }
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
                 temp_2[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14];
                 temp_2[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15];
                 temp_2[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14];
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).f = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).f = temp_2;
             }
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
                 temp_2[0] = [NSNumber numberWithUnsignedChar:0U];
                 temp_2[1] = [NSNumber numberWithUnsignedChar:255U];
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).g = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).g = temp_2;
             }
 
             params.arg1 = temp_0;
         }
         [cluster testListNestedStructListArgumentRequestWithParams:params
-                                                        completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                        completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                             NSError * _Nullable err) {
                                                             NSLog(@"Send Test Command With List of Nested Struct List Argument and "
                                                                   @"all fields b of elements of arg1.d are true Error: %@",
@@ -79536,85 +79536,85 @@
     CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_170()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams alloc] init];
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
-            temp_0[0] = [[MTRTestClusterClusterNestedStructList alloc] init];
-            ((MTRTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U];
-            ((MTRTestClusterClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c = [[MTRTestClusterClusterSimpleStruct alloc] init];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).a =
+            temp_0[0] = [[MTRUnitTestingClusterNestedStructList alloc] init];
+            ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U];
+            ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true];
+            ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).a =
                 [NSNumber numberWithUnsignedChar:0U];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).b =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).b =
                 [NSNumber numberWithBool:true];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).c =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).c =
                 [NSNumber numberWithUnsignedChar:2U];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).d =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).d =
                 [[NSData alloc] initWithBytes:"octet_string" length:12];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).e = @"char_string";
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).f =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).e = @"char_string";
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).f =
                 [NSNumber numberWithUnsignedChar:1U];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).g =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).g =
                 [NSNumber numberWithFloat:0.0f];
-            ((MTRTestClusterClusterSimpleStruct *) ((MTRTestClusterClusterNestedStructList *) temp_0[0]).c).h =
+            ((MTRUnitTestingClusterSimpleStruct *) ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).c).h =
                 [NSNumber numberWithDouble:0];
 
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
-                temp_2[0] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
+                temp_2[0] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
                                                                                              length:19];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string";
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0.0f];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string";
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0.0f];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0];
 
-                temp_2[1] = [[MTRTestClusterClusterSimpleStruct alloc] init];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:false];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
+                temp_2[1] = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:false];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string"
                                                                                              length:19];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string";
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1U];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0.0f];
-                ((MTRTestClusterClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string";
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1U];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0.0f];
+                ((MTRUnitTestingClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0];
 
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).d = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).d = temp_2;
             }
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
                 temp_2[0] = [NSNumber numberWithUnsignedInt:1UL];
                 temp_2[1] = [NSNumber numberWithUnsignedInt:2UL];
                 temp_2[2] = [NSNumber numberWithUnsignedInt:3UL];
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).e = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).e = temp_2;
             }
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
                 temp_2[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14];
                 temp_2[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15];
                 temp_2[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14];
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).f = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).f = temp_2;
             }
             {
                 NSMutableArray * temp_2 = [[NSMutableArray alloc] init];
                 temp_2[0] = [NSNumber numberWithUnsignedChar:0U];
                 temp_2[1] = [NSNumber numberWithUnsignedChar:255U];
-                ((MTRTestClusterClusterNestedStructList *) temp_0[0]).g = temp_2;
+                ((MTRUnitTestingClusterNestedStructList *) temp_0[0]).g = temp_2;
             }
 
             params.arg1 = temp_0;
         }
         [cluster testListNestedStructListArgumentRequestWithParams:params
-                                                        completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values,
+                                                        completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values,
                                                             NSError * _Nullable err) {
                                                             NSLog(@"Send Test Command With Nested Struct List Argument and some "
                                                                   @"fields b of elements of arg1.d are false Error: %@",
@@ -79636,7 +79636,7 @@
     CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_171()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79666,7 +79666,7 @@
     CHIP_ERROR TestReadAttributeListWithListOfInt8u_172()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79694,7 +79694,7 @@
     CHIP_ERROR TestWriteAttributeListWithListOfOctetString_173()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79723,7 +79723,7 @@
     CHIP_ERROR TestReadAttributeListWithListOfOctetString_174()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79751,7 +79751,7 @@
     CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_175()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79759,21 +79759,21 @@
         id listStructOctetStringArgument;
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
-            temp_0[0] = [[MTRTestClusterClusterTestListStructOctet alloc] init];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[0]).member1 = [NSNumber numberWithUnsignedLongLong:0ULL];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[0]).member2 = [[NSData alloc] initWithBytes:"Test0" length:5];
+            temp_0[0] = [[MTRUnitTestingClusterTestListStructOctet alloc] init];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[0]).member1 = [NSNumber numberWithUnsignedLongLong:0ULL];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[0]).member2 = [[NSData alloc] initWithBytes:"Test0" length:5];
 
-            temp_0[1] = [[MTRTestClusterClusterTestListStructOctet alloc] init];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[1]).member1 = [NSNumber numberWithUnsignedLongLong:1ULL];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[1]).member2 = [[NSData alloc] initWithBytes:"Test1" length:5];
+            temp_0[1] = [[MTRUnitTestingClusterTestListStructOctet alloc] init];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[1]).member1 = [NSNumber numberWithUnsignedLongLong:1ULL];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[1]).member2 = [[NSData alloc] initWithBytes:"Test1" length:5];
 
-            temp_0[2] = [[MTRTestClusterClusterTestListStructOctet alloc] init];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[2]).member1 = [NSNumber numberWithUnsignedLongLong:2ULL];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[2]).member2 = [[NSData alloc] initWithBytes:"Test2" length:5];
+            temp_0[2] = [[MTRUnitTestingClusterTestListStructOctet alloc] init];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[2]).member1 = [NSNumber numberWithUnsignedLongLong:2ULL];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[2]).member2 = [[NSData alloc] initWithBytes:"Test2" length:5];
 
-            temp_0[3] = [[MTRTestClusterClusterTestListStructOctet alloc] init];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[3]).member1 = [NSNumber numberWithUnsignedLongLong:3ULL];
-            ((MTRTestClusterClusterTestListStructOctet *) temp_0[3]).member2 = [[NSData alloc] initWithBytes:"Test3" length:5];
+            temp_0[3] = [[MTRUnitTestingClusterTestListStructOctet alloc] init];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[3]).member1 = [NSNumber numberWithUnsignedLongLong:3ULL];
+            ((MTRUnitTestingClusterTestListStructOctet *) temp_0[3]).member2 = [[NSData alloc] initWithBytes:"Test3" length:5];
 
             listStructOctetStringArgument = temp_0;
         }
@@ -79794,7 +79794,7 @@
     CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_176()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79807,17 +79807,17 @@
             {
                 id actualValue = value;
                 VerifyOrReturn(CheckValue("list_struct_octet_string", [actualValue count], static_cast<uint32_t>(4)));
-                VerifyOrReturn(CheckValue("member1", ((MTRTestClusterClusterTestListStructOctet *) actualValue[0]).member1, 0ULL));
-                VerifyOrReturn(CheckValueAsString("member2", ((MTRTestClusterClusterTestListStructOctet *) actualValue[0]).member2,
+                VerifyOrReturn(CheckValue("member1", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[0]).member1, 0ULL));
+                VerifyOrReturn(CheckValueAsString("member2", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[0]).member2,
                     [[NSData alloc] initWithBytes:"Test0" length:5]));
-                VerifyOrReturn(CheckValue("member1", ((MTRTestClusterClusterTestListStructOctet *) actualValue[1]).member1, 1ULL));
-                VerifyOrReturn(CheckValueAsString("member2", ((MTRTestClusterClusterTestListStructOctet *) actualValue[1]).member2,
+                VerifyOrReturn(CheckValue("member1", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[1]).member1, 1ULL));
+                VerifyOrReturn(CheckValueAsString("member2", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[1]).member2,
                     [[NSData alloc] initWithBytes:"Test1" length:5]));
-                VerifyOrReturn(CheckValue("member1", ((MTRTestClusterClusterTestListStructOctet *) actualValue[2]).member1, 2ULL));
-                VerifyOrReturn(CheckValueAsString("member2", ((MTRTestClusterClusterTestListStructOctet *) actualValue[2]).member2,
+                VerifyOrReturn(CheckValue("member1", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[2]).member1, 2ULL));
+                VerifyOrReturn(CheckValueAsString("member2", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[2]).member2,
                     [[NSData alloc] initWithBytes:"Test2" length:5]));
-                VerifyOrReturn(CheckValue("member1", ((MTRTestClusterClusterTestListStructOctet *) actualValue[3]).member1, 3ULL));
-                VerifyOrReturn(CheckValueAsString("member2", ((MTRTestClusterClusterTestListStructOctet *) actualValue[3]).member2,
+                VerifyOrReturn(CheckValue("member1", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[3]).member1, 3ULL));
+                VerifyOrReturn(CheckValueAsString("member2", ((MTRUnitTestingClusterTestListStructOctet *) actualValue[3]).member2,
                     [[NSData alloc] initWithBytes:"Test3" length:5]));
             }
 
@@ -79830,15 +79830,15 @@
     CHIP_ERROR TestSendTestCommandWithOptionalArgSet_177()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestNullableOptionalRequestParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:5U];
         [cluster testNullableOptionalRequestWithParams:params
-                                            completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values,
+                                            completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable values,
                                                 NSError * _Nullable err) {
                                                 NSLog(@"Send Test Command with optional arg set. Error: %@", err);
 
@@ -79874,14 +79874,14 @@
     CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_178()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestNullableOptionalRequestParams alloc] init];
         [cluster testNullableOptionalRequestWithParams:params
-                                            completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values,
+                                            completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable values,
                                                 NSError * _Nullable err) {
                                                 NSLog(@"Send Test Command without its optional arg. Error: %@", err);
 
@@ -79901,7 +79901,7 @@
     CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_179()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79915,13 +79915,13 @@
                 id actualValue = value;
                 VerifyOrReturn(CheckValue("list_nullables_and_optionals_struct", [actualValue count], static_cast<uint32_t>(1)));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableInt", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableInt));
+                    "NullableInt", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableInt));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableString", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableString));
+                    "NullableString", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableString));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableStruct", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableStruct));
+                    "NullableStruct", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableStruct));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableList", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList));
+                    "NullableList", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList));
             }
 
             NextTest();
@@ -79933,7 +79933,7 @@
     CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_180()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79941,15 +79941,15 @@
         id listNullablesAndOptionalsStructArgument;
         {
             NSMutableArray * temp_0 = [[NSMutableArray alloc] init];
-            temp_0[0] = [[MTRTestClusterClusterNullablesAndOptionalsStruct alloc] init];
-            ((MTRTestClusterClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableInt = nil;
-            ((MTRTestClusterClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableString = nil;
-            ((MTRTestClusterClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableStruct = nil;
+            temp_0[0] = [[MTRUnitTestingClusterNullablesAndOptionalsStruct alloc] init];
+            ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableInt = nil;
+            ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableString = nil;
+            ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableStruct = nil;
             {
                 NSMutableArray * temp_3 = [[NSMutableArray alloc] init];
                 temp_3[0] = [NSNumber numberWithUnsignedChar:1U];
                 temp_3[1] = [NSNumber numberWithUnsignedChar:2U];
-                ((MTRTestClusterClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableList = temp_3;
+                ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableList = temp_3;
             }
 
             listNullablesAndOptionalsStructArgument = temp_0;
@@ -79971,7 +79971,7 @@
     CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_181()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -79985,20 +79985,20 @@
                 id actualValue = value;
                 VerifyOrReturn(CheckValue("list_nullables_and_optionals_struct", [actualValue count], static_cast<uint32_t>(1)));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableInt", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableInt));
+                    "NullableInt", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableInt));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableString", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableString));
+                    "NullableString", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableString));
                 VerifyOrReturn(CheckValueNull(
-                    "NullableStruct", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableStruct));
+                    "NullableStruct", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableStruct));
                 VerifyOrReturn(CheckValueNonNull(
-                    "NullableList", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList));
+                    "NullableList", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList));
                 VerifyOrReturn(CheckValue("NullableList",
-                    [((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList count],
+                    [((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList count],
                     static_cast<uint32_t>(2)));
                 VerifyOrReturn(
-                    CheckValue("", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[0], 1U));
+                    CheckValue("", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[0], 1U));
                 VerifyOrReturn(
-                    CheckValue("", ((MTRTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[1], 2U));
+                    CheckValue("", ((MTRUnitTestingClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[1], 2U));
             }
 
             NextTest();
@@ -80010,7 +80010,7 @@
     CHIP_ERROR TestWriteAttributeNullableBooleanNull_182()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80033,7 +80033,7 @@
     CHIP_ERROR TestReadAttributeNullableBooleanNull_183()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80060,7 +80060,7 @@
     CHIP_ERROR TestWriteAttributeNullableBooleanTrue_184()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80082,7 +80082,7 @@
     CHIP_ERROR TestReadAttributeNullableBooleanTrue_185()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80107,7 +80107,7 @@
     CHIP_ERROR TestReadAttributeNullableBooleanNotNull_186()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80130,7 +80130,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_187()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80152,7 +80152,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_188()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80177,7 +80177,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_189()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80204,7 +80204,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_190()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80232,7 +80232,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_191()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80254,7 +80254,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_192()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80278,7 +80278,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap8Not254Value_193()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80301,7 +80301,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_194()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80323,7 +80323,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_195()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80348,7 +80348,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_196()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80374,7 +80374,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_197()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80399,7 +80399,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_198()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80421,7 +80421,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_199()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80445,7 +80445,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_200()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80467,7 +80467,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_201()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80492,7 +80492,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_202()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80518,7 +80518,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_203()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80543,7 +80543,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_204()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80565,7 +80565,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_205()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80589,7 +80589,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_206()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80611,7 +80611,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_207()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80636,7 +80636,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_208()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80662,7 +80662,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_209()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80687,7 +80687,7 @@
     CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_210()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80709,7 +80709,7 @@
     CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_211()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80733,7 +80733,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_212()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80755,7 +80755,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uMinValue_213()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80780,7 +80780,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_214()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80802,7 +80802,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_215()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80827,7 +80827,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_216()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80853,7 +80853,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_217()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80878,7 +80878,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_218()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80901,7 +80901,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_219()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80923,7 +80923,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uNullValue_220()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80947,7 +80947,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_221()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80972,7 +80972,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_222()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -80995,7 +80995,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8uValue_223()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81017,7 +81017,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_224()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81042,7 +81042,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_225()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81065,7 +81065,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_226()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81087,7 +81087,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uMinValue_227()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81112,7 +81112,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_228()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81134,7 +81134,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_229()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81159,7 +81159,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_230()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81185,7 +81185,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_231()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81210,7 +81210,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_232()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81232,7 +81232,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uNullValue_233()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81256,7 +81256,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_234()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81281,7 +81281,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_235()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81304,7 +81304,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16uValue_236()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81326,7 +81326,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_237()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81351,7 +81351,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_238()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81374,7 +81374,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_239()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81396,7 +81396,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uMinValue_240()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81421,7 +81421,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_241()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81443,7 +81443,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_242()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81468,7 +81468,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_243()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81494,7 +81494,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_244()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81519,7 +81519,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_245()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81541,7 +81541,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uNullValue_246()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81565,7 +81565,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_247()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81590,7 +81590,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_248()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81613,7 +81613,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32uValue_249()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81635,7 +81635,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_250()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81660,7 +81660,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_251()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81683,7 +81683,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_252()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81705,7 +81705,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uMinValue_253()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81730,7 +81730,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_254()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81752,7 +81752,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_255()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81777,7 +81777,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_256()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81803,7 +81803,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_257()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81828,7 +81828,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_258()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81850,7 +81850,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uNullValue_259()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81874,7 +81874,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_260()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81900,7 +81900,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_261()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81923,7 +81923,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64uValue_262()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81945,7 +81945,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_263()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81971,7 +81971,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_264()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -81994,7 +81994,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_265()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82016,7 +82016,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sMinValue_266()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82041,7 +82041,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_267()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82067,7 +82067,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_268()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82092,7 +82092,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_269()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82114,7 +82114,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sNullValue_270()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82138,7 +82138,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_271()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82163,7 +82163,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_272()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82186,7 +82186,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt8sValue_273()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82208,7 +82208,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_274()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82233,7 +82233,7 @@
     CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_275()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82256,7 +82256,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_276()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82278,7 +82278,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sMinValue_277()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82303,7 +82303,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_278()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82329,7 +82329,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_279()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82354,7 +82354,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_280()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82376,7 +82376,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sNullValue_281()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82400,7 +82400,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_282()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82425,7 +82425,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_283()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82448,7 +82448,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt16sValue_284()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82470,7 +82470,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_285()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82495,7 +82495,7 @@
     CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_286()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82518,7 +82518,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_287()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82540,7 +82540,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sMinValue_288()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82565,7 +82565,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_289()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82591,7 +82591,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_290()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82616,7 +82616,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_291()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82638,7 +82638,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sNullValue_292()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82662,7 +82662,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_293()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82687,7 +82687,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_294()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82710,7 +82710,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt32sValue_295()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82732,7 +82732,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_296()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82757,7 +82757,7 @@
     CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_297()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82780,7 +82780,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_298()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82802,7 +82802,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sMinValue_299()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82827,7 +82827,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_300()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82853,7 +82853,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_301()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82878,7 +82878,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_302()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82900,7 +82900,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sNullValue_303()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82924,7 +82924,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_304()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82949,7 +82949,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_305()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82972,7 +82972,7 @@
     CHIP_ERROR TestWriteAttributeNullableInt64sValue_306()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -82994,7 +82994,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_307()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83019,7 +83019,7 @@
     CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_308()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83042,7 +83042,7 @@
     CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_309()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83064,7 +83064,7 @@
     CHIP_ERROR TestReadAttributeNullableSingleMediumValue_310()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83089,7 +83089,7 @@
     CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_311()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83111,7 +83111,7 @@
     CHIP_ERROR TestReadAttributeNullableSingleLargestValue_312()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83136,7 +83136,7 @@
     CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_313()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83158,7 +83158,7 @@
     CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_314()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83183,7 +83183,7 @@
     CHIP_ERROR TestWriteAttributeNullableSingleNullValue_315()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83205,7 +83205,7 @@
     CHIP_ERROR TestReadAttributeNullableSingleNullValue_316()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83229,7 +83229,7 @@
     CHIP_ERROR TestWriteAttributeNullableSingle0Value_317()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83251,7 +83251,7 @@
     CHIP_ERROR TestReadAttributeNullableSingle0Value_318()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83276,7 +83276,7 @@
     CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_319()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83298,7 +83298,7 @@
     CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_320()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83323,7 +83323,7 @@
     CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_321()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83345,7 +83345,7 @@
     CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_322()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83370,7 +83370,7 @@
     CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_323()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83392,7 +83392,7 @@
     CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_324()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83417,7 +83417,7 @@
     CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_325()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83439,7 +83439,7 @@
     CHIP_ERROR TestReadAttributeNullableDoubleNullValue_326()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83463,7 +83463,7 @@
     CHIP_ERROR TestWriteAttributeNullableDouble0Value_327()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83485,7 +83485,7 @@
     CHIP_ERROR TestReadAttributeNullableDouble0Value_328()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83510,7 +83510,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_329()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83532,7 +83532,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum8MinValue_330()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83557,7 +83557,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_331()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83579,7 +83579,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_332()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83604,7 +83604,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_333()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83630,7 +83630,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_334()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83655,7 +83655,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_335()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83677,7 +83677,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum8NullValue_336()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83701,7 +83701,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_337()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83723,7 +83723,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum16MinValue_338()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83748,7 +83748,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_339()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83770,7 +83770,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_340()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83795,7 +83795,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_341()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83821,7 +83821,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_342()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83846,7 +83846,7 @@
     CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_343()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83868,7 +83868,7 @@
     CHIP_ERROR TestReadAttributeNullableEnum16NullValue_344()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83892,7 +83892,7 @@
     CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_345()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83914,7 +83914,7 @@
     CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_346()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83939,7 +83939,7 @@
     CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_347()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83961,7 +83961,7 @@
     CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_348()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -83986,7 +83986,7 @@
     CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_349()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84013,7 +84013,7 @@
     CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_350()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84041,7 +84041,7 @@
     CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_351()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84063,7 +84063,7 @@
     CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_352()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84087,7 +84087,7 @@
     CHIP_ERROR TestReadAttributeNullableSimpleEnumNot3Value_353()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84110,7 +84110,7 @@
     CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_354()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84136,7 +84136,7 @@
     CHIP_ERROR TestWriteAttributeNullableOctetString_355()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84159,7 +84159,7 @@
     CHIP_ERROR TestReadAttributeNullableOctetString_356()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84188,7 +84188,7 @@
     CHIP_ERROR TestWriteAttributeNullableOctetString_357()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84210,7 +84210,7 @@
     CHIP_ERROR TestReadAttributeNullableOctetString_358()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84234,7 +84234,7 @@
     CHIP_ERROR TestWriteAttributeNullableOctetString_359()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84256,7 +84256,7 @@
     CHIP_ERROR TestReadAttributeNullableOctetString_360()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84282,7 +84282,7 @@
     CHIP_ERROR TestReadAttributeNullableOctetStringNotTestValue_361()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84305,7 +84305,7 @@
     CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_362()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84330,7 +84330,7 @@
     CHIP_ERROR TestWriteAttributeNullableCharString_363()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84353,7 +84353,7 @@
     CHIP_ERROR TestReadAttributeNullableCharString_364()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84381,7 +84381,7 @@
     CHIP_ERROR TestReadAttributeNullableCharString_365()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84410,7 +84410,7 @@
     CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_366()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84432,7 +84432,7 @@
     CHIP_ERROR TestReadAttributeNullableCharString_367()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84456,7 +84456,7 @@
     CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_368()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84478,7 +84478,7 @@
     CHIP_ERROR TestReadAttributeNullableCharString_369()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84503,7 +84503,7 @@
     CHIP_ERROR TestReadAttributeNullableCharStringNott_370()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84526,7 +84526,7 @@
     CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_371()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(200)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84546,7 +84546,7 @@
     CHIP_ERROR TestReadAttributeFromNonexistentCluster_372()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(0)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84566,12 +84566,12 @@
     CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_373()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams alloc] init];
         [cluster testSimpleOptionalArgumentRequestWithParams:params
                                                   completion:^(NSError * _Nullable err) {
                                                       NSLog(@"Send a command that takes an optional parameter but do not set it. "
@@ -84593,12 +84593,12 @@
     CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_374()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams alloc] init];
         params.arg1 = [NSNumber numberWithBool:1];
         [cluster testSimpleOptionalArgumentRequestWithParams:params
                                                   completion:^(NSError * _Nullable err) {
@@ -84619,7 +84619,7 @@
     CHIP_ERROR TestReportSubscribeToListAttribute_375()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84648,7 +84648,7 @@
     CHIP_ERROR TestSubscribeToListAttribute_376()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84682,7 +84682,7 @@
     CHIP_ERROR TestWriteSubscribedToListAttribute_377()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84711,7 +84711,7 @@
     CHIP_ERROR TestCheckForListAttributeReport_378()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84739,7 +84739,7 @@
     CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_379()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84763,7 +84763,7 @@
     CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_380()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84791,7 +84791,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_381()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84819,7 +84819,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_382()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84847,7 +84847,7 @@
     CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_383()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84875,7 +84875,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_384()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84899,7 +84899,7 @@
     CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_385()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84923,7 +84923,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_386()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84947,7 +84947,7 @@
     CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_387()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84971,7 +84971,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_388()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -84995,7 +84995,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_389()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85019,7 +85019,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_390()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85043,7 +85043,7 @@
     CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_391()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85067,7 +85067,7 @@
     CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_392()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85095,7 +85095,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_393()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85123,7 +85123,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_394()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85151,7 +85151,7 @@
     CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_395()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85179,7 +85179,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_396()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85203,7 +85203,7 @@
     CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_397()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85227,7 +85227,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_398()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85251,7 +85251,7 @@
     CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_399()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85275,7 +85275,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_400()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85299,7 +85299,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_401()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85323,7 +85323,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_402()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85347,7 +85347,7 @@
     CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_403()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85371,7 +85371,7 @@
     CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_404()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85398,7 +85398,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_405()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85426,7 +85426,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_406()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85454,7 +85454,7 @@
     CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_407()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85481,7 +85481,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_408()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85505,7 +85505,7 @@
     CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_409()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85530,7 +85530,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_410()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85554,7 +85554,7 @@
     CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_411()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85579,7 +85579,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_412()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85603,7 +85603,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_413()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85627,7 +85627,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_414()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85651,7 +85651,7 @@
     CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_415()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85675,7 +85675,7 @@
     CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_416()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85703,7 +85703,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_417()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85731,7 +85731,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_418()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85759,7 +85759,7 @@
     CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_419()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85787,7 +85787,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_420()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85811,7 +85811,7 @@
     CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_421()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85835,7 +85835,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_422()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85859,7 +85859,7 @@
     CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_423()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85883,7 +85883,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_424()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85907,7 +85907,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_425()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85931,7 +85931,7 @@
     CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_426()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85955,7 +85955,7 @@
     CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_427()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -85980,7 +85980,7 @@
     CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_428()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86008,7 +86008,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_429()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86036,7 +86036,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_430()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86064,7 +86064,7 @@
     CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_431()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86092,7 +86092,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_432()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86117,7 +86117,7 @@
     CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_433()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86141,7 +86141,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_434()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86166,7 +86166,7 @@
     CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_435()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86190,7 +86190,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_436()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86215,7 +86215,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_437()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86239,7 +86239,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_438()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86264,7 +86264,7 @@
     CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_439()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86288,7 +86288,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_440()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86312,7 +86312,7 @@
     CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_441()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86337,7 +86337,7 @@
     CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_442()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86365,7 +86365,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_443()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86393,7 +86393,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_444()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86421,7 +86421,7 @@
     CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_445()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86449,7 +86449,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_446()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86474,7 +86474,7 @@
     CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_447()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86498,7 +86498,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_448()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86523,7 +86523,7 @@
     CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_449()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86547,7 +86547,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_450()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86572,7 +86572,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_451()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86596,7 +86596,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_452()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86621,7 +86621,7 @@
     CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_453()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86645,7 +86645,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_454()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86669,7 +86669,7 @@
     CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_455()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86694,7 +86694,7 @@
     CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_456()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86722,7 +86722,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_457()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86750,7 +86750,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_458()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86778,7 +86778,7 @@
     CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_459()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86806,7 +86806,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_460()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86831,7 +86831,7 @@
     CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_461()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86855,7 +86855,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_462()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86880,7 +86880,7 @@
     CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_463()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86904,7 +86904,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_464()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86929,7 +86929,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_465()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86953,7 +86953,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_466()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -86978,7 +86978,7 @@
     CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_467()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87002,7 +87002,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_468()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87026,7 +87026,7 @@
     CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_469()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87051,7 +87051,7 @@
     CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_470()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87079,7 +87079,7 @@
     CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_471()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87107,7 +87107,7 @@
     CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_472()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87135,7 +87135,7 @@
     CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_473()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87163,7 +87163,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_474()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87188,7 +87188,7 @@
     CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_475()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87212,7 +87212,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_476()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87237,7 +87237,7 @@
     CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_477()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87261,7 +87261,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_478()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87286,7 +87286,7 @@
     CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_479()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87310,7 +87310,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_480()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87335,7 +87335,7 @@
     CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_481()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87359,7 +87359,7 @@
     CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_482()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87383,7 +87383,7 @@
     CHIP_ERROR TestWriteAttributeThatReturnsGeneralStatusOnWrite_483()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87409,7 +87409,7 @@
     CHIP_ERROR TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_484()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87437,7 +87437,7 @@
     CHIP_ERROR TestReadAttributeThatReturnsGeneralStatusOnRead_485()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87457,7 +87457,7 @@
     CHIP_ERROR TestReadAttributeThatReturnsClusterSpecificStatusOnRead_486()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87477,7 +87477,7 @@
     CHIP_ERROR TestReadAcceptedCommandListAttribute_487()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87519,7 +87519,7 @@
     CHIP_ERROR TestReadGeneratedCommandListAttribute_488()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87552,21 +87552,21 @@
     CHIP_ERROR TestWriteStructTypedAttribute_489()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
         id structAttrArgument;
-        structAttrArgument = [[MTRTestClusterClusterSimpleStruct alloc] init];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).a = [NSNumber numberWithUnsignedChar:5U];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).b = [NSNumber numberWithBool:true];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).c = [NSNumber numberWithUnsignedChar:2U];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).d = [[NSData alloc] initWithBytes:"abc" length:3];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).e = @"";
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).f = [NSNumber numberWithUnsignedChar:17U];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).g = [NSNumber numberWithFloat:1.5f];
-        ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).h = [NSNumber numberWithDouble:3.14159265358979];
+        structAttrArgument = [[MTRUnitTestingClusterSimpleStruct alloc] init];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).a = [NSNumber numberWithUnsignedChar:5U];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).b = [NSNumber numberWithBool:true];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).c = [NSNumber numberWithUnsignedChar:2U];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).d = [[NSData alloc] initWithBytes:"abc" length:3];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).e = @"";
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).f = [NSNumber numberWithUnsignedChar:17U];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).g = [NSNumber numberWithFloat:1.5f];
+        ((MTRUnitTestingClusterSimpleStruct *) structAttrArgument).h = [NSNumber numberWithDouble:3.14159265358979];
 
         [cluster writeAttributeStructAttrWithValue:structAttrArgument
                                         completion:^(NSError * _Nullable err) {
@@ -87583,28 +87583,28 @@
     CHIP_ERROR TestReadStructTypedAttribute_490()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
         [cluster
-            readAttributeStructAttrWithCompletion:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable err) {
+            readAttributeStructAttrWithCompletion:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable err) {
                 NSLog(@"Read struct-typed attribute Error: %@", err);
 
                 VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0));
 
                 {
                     id actualValue = value;
-                    VerifyOrReturn(CheckValue("a", ((MTRTestClusterClusterSimpleStruct *) actualValue).a, 5U));
-                    VerifyOrReturn(CheckValue("b", ((MTRTestClusterClusterSimpleStruct *) actualValue).b, true));
-                    VerifyOrReturn(CheckValue("c", ((MTRTestClusterClusterSimpleStruct *) actualValue).c, 2U));
+                    VerifyOrReturn(CheckValue("a", ((MTRUnitTestingClusterSimpleStruct *) actualValue).a, 5U));
+                    VerifyOrReturn(CheckValue("b", ((MTRUnitTestingClusterSimpleStruct *) actualValue).b, true));
+                    VerifyOrReturn(CheckValue("c", ((MTRUnitTestingClusterSimpleStruct *) actualValue).c, 2U));
                     VerifyOrReturn(CheckValueAsString(
-                        "d", ((MTRTestClusterClusterSimpleStruct *) actualValue).d, [[NSData alloc] initWithBytes:"abc" length:3]));
-                    VerifyOrReturn(CheckValueAsString("e", ((MTRTestClusterClusterSimpleStruct *) actualValue).e, @""));
-                    VerifyOrReturn(CheckValue("f", ((MTRTestClusterClusterSimpleStruct *) actualValue).f, 17U));
-                    VerifyOrReturn(CheckValue("g", ((MTRTestClusterClusterSimpleStruct *) actualValue).g, 1.5f));
-                    VerifyOrReturn(CheckValue("h", ((MTRTestClusterClusterSimpleStruct *) actualValue).h, 3.14159265358979));
+                        "d", ((MTRUnitTestingClusterSimpleStruct *) actualValue).d, [[NSData alloc] initWithBytes:"abc" length:3]));
+                    VerifyOrReturn(CheckValueAsString("e", ((MTRUnitTestingClusterSimpleStruct *) actualValue).e, @""));
+                    VerifyOrReturn(CheckValue("f", ((MTRUnitTestingClusterSimpleStruct *) actualValue).f, 17U));
+                    VerifyOrReturn(CheckValue("g", ((MTRUnitTestingClusterSimpleStruct *) actualValue).g, 1.5f));
+                    VerifyOrReturn(CheckValue("h", ((MTRUnitTestingClusterSimpleStruct *) actualValue).h, 3.14159265358979));
                 }
 
                 NextTest();
@@ -87926,7 +87926,7 @@
     CHIP_ERROR TestWriteAttributeListWithListOfInt8u_1()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87955,7 +87955,7 @@
     CHIP_ERROR TestReadAttributeListWithPartialListOfInt8uThatShouldBeInIt_2()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -87978,7 +87978,7 @@
     CHIP_ERROR TestReadAttributeListWithPartialListOfInt8uThatShouldNotBeIncluded_3()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88000,7 +88000,7 @@
     CHIP_ERROR TestWriteAttributeListBackToDefaultValue_4()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88025,7 +88025,7 @@
     CHIP_ERROR TestReadAttributeBitmap32DefaultValue_5()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88049,7 +88049,7 @@
     CHIP_ERROR TestWriteAttributeBitmap32WithMaskVal1AndMaskVal3_6()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88071,7 +88071,7 @@
     CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal2IsNotSet_7()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88095,7 +88095,7 @@
     CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal1IsSet_8()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88119,7 +88119,7 @@
     CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal3IsSet_9()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88143,7 +88143,7 @@
     CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskval1AndMaskVal3AreSet_10()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88167,7 +88167,7 @@
     CHIP_ERROR TestWriteAttributeInt32uValue_11()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88189,7 +88189,7 @@
     CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_12()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88210,7 +88210,7 @@
     CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_13()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88231,7 +88231,7 @@
     CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_14()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88252,7 +88252,7 @@
     CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_15()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88274,7 +88274,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValue_16()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88296,7 +88296,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_17()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88316,7 +88316,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_18()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88336,7 +88336,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_19()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88356,7 +88356,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_20()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88376,7 +88376,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValue_21()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88398,7 +88398,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_22()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88419,7 +88419,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValue_23()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88441,7 +88441,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_24()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88462,7 +88462,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValue_25()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88484,7 +88484,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_26()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88505,7 +88505,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValue_27()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88527,7 +88527,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_28()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88547,7 +88547,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValue_29()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88569,7 +88569,7 @@
     CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_30()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -88589,7 +88589,7 @@
     CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_31()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89675,16 +89675,16 @@
     CHIP_ERROR TestSendTestAddArgumentsCommand_1()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:3U];
         params.arg2 = [NSNumber numberWithUnsignedChar:17U];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send Test Add Arguments Command Error: %@", err);
 
@@ -89707,16 +89707,16 @@
     CHIP_ERROR TestSendTestAddArgumentsCommand_2()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:3U];
         params.arg2 = [NSNumber numberWithUnsignedChar:17U];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send Test Add Arguments Command Error: %@", err);
 
@@ -89736,16 +89736,16 @@
     CHIP_ERROR TestSendTestAddArgumentsCommand_3()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:3U];
         params.arg2 = [TestAddArgumentDefaultValue copy];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send Test Add Arguments Command Error: %@", err);
 
@@ -89764,7 +89764,7 @@
     CHIP_ERROR TestReadAttributeBooleanDefaultValue_4()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89791,7 +89791,7 @@
     CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89813,7 +89813,7 @@
     CHIP_ERROR TestReadAttributeBooleanNotDefaultValue_6()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89834,7 +89834,7 @@
     CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89856,7 +89856,7 @@
     CHIP_ERROR TestReadAttributeBooleanFalse_8()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89881,7 +89881,7 @@
     CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89908,7 +89908,7 @@
     CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89930,7 +89930,7 @@
     CHIP_ERROR TestReadAttributeBitmap8NotDefaultValue_11()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89951,7 +89951,7 @@
     CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89973,7 +89973,7 @@
     CHIP_ERROR TestReadAttributeBitmap8DefaultValue_13()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -89998,7 +89998,7 @@
     CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90025,7 +90025,7 @@
     CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90047,7 +90047,7 @@
     CHIP_ERROR TestReadAttributeBitmap16NotDefaultValue_16()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90068,7 +90068,7 @@
     CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90090,7 +90090,7 @@
     CHIP_ERROR TestReadAttributeBitmap16DefaultValue_18()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90115,7 +90115,7 @@
     CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90142,7 +90142,7 @@
     CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90164,7 +90164,7 @@
     CHIP_ERROR TestReadAttributeBitmap32NotDefaultValue_21()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90185,7 +90185,7 @@
     CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90207,7 +90207,7 @@
     CHIP_ERROR TestReadAttributeBitmap32DefaultValue_23()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90232,7 +90232,7 @@
     CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90259,7 +90259,7 @@
     CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90281,7 +90281,7 @@
     CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90302,7 +90302,7 @@
     CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90324,7 +90324,7 @@
     CHIP_ERROR TestReadAttributeBitmap64DefaultValue_28()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90349,7 +90349,7 @@
     CHIP_ERROR TestReadAttributeInt8uDefaultValue_29()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90376,7 +90376,7 @@
     CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90398,7 +90398,7 @@
     CHIP_ERROR TestReadAttributeInt8uNotDefaultValue_31()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90419,7 +90419,7 @@
     CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90441,7 +90441,7 @@
     CHIP_ERROR TestReadAttributeInt8uDefaultValue_33()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90466,7 +90466,7 @@
     CHIP_ERROR TestReadAttributeInt16uDefaultValue_34()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90493,7 +90493,7 @@
     CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90515,7 +90515,7 @@
     CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90536,7 +90536,7 @@
     CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90558,7 +90558,7 @@
     CHIP_ERROR TestReadAttributeInt16uDefaultValue_38()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90583,7 +90583,7 @@
     CHIP_ERROR TestReadAttributeInt32uDefaultValue_39()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90610,7 +90610,7 @@
     CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90632,7 +90632,7 @@
     CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90653,7 +90653,7 @@
     CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90675,7 +90675,7 @@
     CHIP_ERROR TestReadAttributeInt32uDefaultValue_43()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90700,7 +90700,7 @@
     CHIP_ERROR TestReadAttributeInt64uDefaultValue_44()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90727,7 +90727,7 @@
     CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90749,7 +90749,7 @@
     CHIP_ERROR TestReadAttributeInt64uNotDefaultValue_46()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90770,7 +90770,7 @@
     CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90792,7 +90792,7 @@
     CHIP_ERROR TestReadAttributeInt64uDefaultValue_48()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90817,7 +90817,7 @@
     CHIP_ERROR TestReadAttributeInt8sDefaultValue_49()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90844,7 +90844,7 @@
     CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90866,7 +90866,7 @@
     CHIP_ERROR TestReadAttributeInt8sNotDefaultValue_51()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90887,7 +90887,7 @@
     CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90909,7 +90909,7 @@
     CHIP_ERROR TestReadAttributeInt8sDefaultValue_53()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90934,7 +90934,7 @@
     CHIP_ERROR TestReadAttributeInt16sDefaultValue_54()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90961,7 +90961,7 @@
     CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -90983,7 +90983,7 @@
     CHIP_ERROR TestReadAttributeInt16sNotDefaultValue_56()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91004,7 +91004,7 @@
     CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91026,7 +91026,7 @@
     CHIP_ERROR TestReadAttributeInt16sDefaultValue_58()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91051,7 +91051,7 @@
     CHIP_ERROR TestReadAttributeInt32sDefaultValue_59()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91078,7 +91078,7 @@
     CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91100,7 +91100,7 @@
     CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91121,7 +91121,7 @@
     CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91143,7 +91143,7 @@
     CHIP_ERROR TestReadAttributeInt32sDefaultValue_63()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91168,7 +91168,7 @@
     CHIP_ERROR TestReadAttributeInt64sDefaultValue_64()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91195,7 +91195,7 @@
     CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91217,7 +91217,7 @@
     CHIP_ERROR TestReadAttributeInt64sNotDefaultValue_66()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91238,7 +91238,7 @@
     CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91260,7 +91260,7 @@
     CHIP_ERROR TestReadAttributeInt64sDefaultValue_68()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91285,7 +91285,7 @@
     CHIP_ERROR TestReadAttributeEnum8DefaultValue_69()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91312,7 +91312,7 @@
     CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91334,7 +91334,7 @@
     CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91355,7 +91355,7 @@
     CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91377,7 +91377,7 @@
     CHIP_ERROR TestReadAttributeEnum8DefaultValue_73()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91402,7 +91402,7 @@
     CHIP_ERROR TestReadAttributeEnum16DefaultValue_74()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91429,7 +91429,7 @@
     CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91451,7 +91451,7 @@
     CHIP_ERROR TestReadAttributeEnum16NotDefaultValue_76()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91472,7 +91472,7 @@
     CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91494,7 +91494,7 @@
     CHIP_ERROR TestReadAttributeEnum16DefaultValue_78()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91519,7 +91519,7 @@
     CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91546,7 +91546,7 @@
     CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91568,7 +91568,7 @@
     CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91589,7 +91589,7 @@
     CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91611,7 +91611,7 @@
     CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91636,7 +91636,7 @@
     CHIP_ERROR TestReadAttributeEpochSDefaultValue_84()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91663,7 +91663,7 @@
     CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91685,7 +91685,7 @@
     CHIP_ERROR TestReadAttributeEpochSNotDefaultValue_86()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91706,7 +91706,7 @@
     CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91728,7 +91728,7 @@
     CHIP_ERROR TestReadAttributeEpochSDefaultValue_88()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91753,7 +91753,7 @@
     CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91780,7 +91780,7 @@
     CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91802,7 +91802,7 @@
     CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91823,7 +91823,7 @@
     CHIP_ERROR TestWriteAttributeVendorIdDefaultValue_92()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91845,7 +91845,7 @@
     CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91870,7 +91870,7 @@
     CHIP_ERROR TestReadAttributeCharStringDefaultValue_94()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91897,7 +91897,7 @@
     CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91921,7 +91921,7 @@
     CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91944,7 +91944,7 @@
     CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91973,7 +91973,7 @@
     CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -91999,7 +91999,7 @@
     CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92021,7 +92021,7 @@
     CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92045,7 +92045,7 @@
     CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92068,7 +92068,7 @@
     CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92095,7 +92095,7 @@
     CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92119,7 +92119,7 @@
     CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92142,7 +92142,7 @@
     CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92172,7 +92172,7 @@
     CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92198,7 +92198,7 @@
     CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92221,7 +92221,7 @@
     CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92246,7 +92246,7 @@
     CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
@@ -92371,16 +92371,16 @@
     CHIP_ERROR TestSendTestAddArgumentsCommand_1()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = [NSNumber numberWithUnsignedChar:3U];
         params.arg2 = [NSNumber numberWithUnsignedChar:17U];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send Test Add Arguments Command Error: %@", err);
 
@@ -92403,16 +92403,16 @@
     CHIP_ERROR TestSendTestAddArgumentsCommand_2()
     {
         MTRBaseDevice * device = GetDevice("alpha");
-        MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device
+        MTRBaseClusterUnitTesting * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device
                                                                                      endpointID:@(1)
                                                                                           queue:mCallbackQueue];
         VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);
 
-        __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init];
+        __auto_type * params = [[MTRUnitTestingClusterTestAddArgumentsParams alloc] init];
         params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5U];
         params.arg2 = [TestAddArgumentDefaultValue copy];
         [cluster testAddArgumentsWithParams:params
-                                 completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values,
+                                 completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values,
                                      NSError * _Nullable err) {
                                      NSLog(@"Send Test Add Arguments Command Error: %@", err);
 
