diff --git a/phosphor-regulators/test/chassis_tests.cpp b/phosphor-regulators/test/chassis_tests.cpp
index 707fff5..0f66d24 100644
--- a/phosphor-regulators/test/chassis_tests.cpp
+++ b/phosphor-regulators/test/chassis_tests.cpp
@@ -16,6 +16,7 @@
 #include "chassis.hpp"
 #include "device.hpp"
 #include "i2c_interface.hpp"
+#include "id_map.hpp"
 #include "test_utils.hpp"
 
 #include <memory>
@@ -41,12 +42,8 @@
     {
         // Create vector of Device objects
         std::vector<std::unique_ptr<Device>> devices{};
-        devices.push_back(std::make_unique<Device>(
-            "vdd_reg1", true, "/system/chassis/motherboard/reg1",
-            std::move(createI2CInterface())));
-        devices.push_back(std::make_unique<Device>(
-            "vdd_reg2", true, "/system/chassis/motherboard/reg2",
-            std::move(createI2CInterface())));
+        devices.emplace_back(createDevice("vdd_reg1"));
+        devices.emplace_back(createDevice("vdd_reg2"));
 
         // Create Chassis
         Chassis chassis{1, std::move(devices)};
@@ -70,6 +67,34 @@
     }
 }
 
+TEST(ChassisTests, AddToIDMap)
+{
+    // Create vector of Device objects
+    std::vector<std::unique_ptr<Device>> devices{};
+    devices.emplace_back(createDevice("reg1", {"rail1"}));
+    devices.emplace_back(createDevice("reg2", {"rail2a", "rail2b"}));
+    devices.emplace_back(createDevice("reg3"));
+
+    // Create Chassis
+    Chassis chassis{1, std::move(devices)};
+
+    // Add Device and Rail objects within the Chassis to an IDMap
+    IDMap idMap{};
+    chassis.addToIDMap(idMap);
+
+    // Verify all Devices are in the IDMap
+    EXPECT_NO_THROW(idMap.getDevice("reg1"));
+    EXPECT_NO_THROW(idMap.getDevice("reg2"));
+    EXPECT_NO_THROW(idMap.getDevice("reg3"));
+    EXPECT_THROW(idMap.getDevice("reg4"), std::invalid_argument);
+
+    // Verify all Rails are in the IDMap
+    EXPECT_NO_THROW(idMap.getRail("rail1"));
+    EXPECT_NO_THROW(idMap.getRail("rail2a"));
+    EXPECT_NO_THROW(idMap.getRail("rail2b"));
+    EXPECT_THROW(idMap.getRail("rail3"), std::invalid_argument);
+}
+
 TEST(ChassisTests, GetDevices)
 {
     // Test where no devices were specified in constructor
@@ -82,12 +107,8 @@
     {
         // Create vector of Device objects
         std::vector<std::unique_ptr<Device>> devices{};
-        devices.push_back(std::make_unique<Device>(
-            "vdd_reg1", true, "/system/chassis/motherboard/reg1",
-            std::move(createI2CInterface())));
-        devices.push_back(std::make_unique<Device>(
-            "vdd_reg2", true, "/system/chassis/motherboard/reg2",
-            std::move(createI2CInterface())));
+        devices.emplace_back(createDevice("vdd_reg1"));
+        devices.emplace_back(createDevice("vdd_reg2"));
 
         // Create Chassis
         Chassis chassis{1, std::move(devices)};
diff --git a/phosphor-regulators/test/device_tests.cpp b/phosphor-regulators/test/device_tests.cpp
index 2ae4d6f..c4875bf 100644
--- a/phosphor-regulators/test/device_tests.cpp
+++ b/phosphor-regulators/test/device_tests.cpp
@@ -17,6 +17,7 @@
 #include "configuration.hpp"
 #include "device.hpp"
 #include "i2c_interface.hpp"
+#include "id_map.hpp"
 #include "mock_action.hpp"
 #include "presence_detection.hpp"
 #include "rail.hpp"
@@ -95,6 +96,39 @@
     }
 }
 
+TEST(DeviceTests, AddToIDMap)
+{
+    std::unique_ptr<PresenceDetection> presenceDetection{};
+    std::unique_ptr<Configuration> configuration{};
+
+    // Create vector of Rail objects
+    std::vector<std::unique_ptr<Rail>> rails{};
+    rails.push_back(std::make_unique<Rail>("vdd0"));
+    rails.push_back(std::make_unique<Rail>("vdd1"));
+
+    // Create Device
+    Device device{"vdd_reg",
+                  false,
+                  "/system/chassis/motherboard/reg2",
+                  std::move(createI2CInterface()),
+                  std::move(presenceDetection),
+                  std::move(configuration),
+                  std::move(rails)};
+
+    // Add Device and Rail objects to an IDMap
+    IDMap idMap{};
+    device.addToIDMap(idMap);
+
+    // Verify Device is in the IDMap
+    EXPECT_NO_THROW(idMap.getDevice("vdd_reg"));
+    EXPECT_THROW(idMap.getDevice("vio_reg"), std::invalid_argument);
+
+    // Verify all Rails are in the IDMap
+    EXPECT_NO_THROW(idMap.getRail("vdd0"));
+    EXPECT_NO_THROW(idMap.getRail("vdd1"));
+    EXPECT_THROW(idMap.getRail("vdd2"), std::invalid_argument);
+}
+
 TEST(DeviceTests, GetConfiguration)
 {
     // Test where Configuration was not specified in constructor
diff --git a/phosphor-regulators/test/system_tests.cpp b/phosphor-regulators/test/system_tests.cpp
index b5f33f1..0e5b8db 100644
--- a/phosphor-regulators/test/system_tests.cpp
+++ b/phosphor-regulators/test/system_tests.cpp
@@ -13,38 +13,44 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "action.hpp"
 #include "chassis.hpp"
-#include "mock_action.hpp"
+#include "device.hpp"
+#include "id_map.hpp"
+#include "rail.hpp"
 #include "rule.hpp"
 #include "system.hpp"
+#include "test_utils.hpp"
 
 #include <memory>
+#include <stdexcept>
 #include <utility>
 #include <vector>
 
 #include <gtest/gtest.h>
 
 using namespace phosphor::power::regulators;
+using namespace phosphor::power::regulators::test_utils;
 
 TEST(SystemTests, Constructor)
 {
     // Create Rules
     std::vector<std::unique_ptr<Rule>> rules{};
-    std::vector<std::unique_ptr<Action>> actions{};
-    actions.emplace_back(std::make_unique<MockAction>());
-    rules.emplace_back(
-        std::make_unique<Rule>("set_voltage_rule", std::move(actions)));
+    rules.emplace_back(createRule("set_voltage_rule"));
 
     // Create Chassis
     std::vector<std::unique_ptr<Chassis>> chassis{};
-    chassis.emplace_back(std::make_unique<Chassis>(1));
+    std::vector<std::unique_ptr<Device>> devices{};
+    devices.emplace_back(createDevice("reg1", {"rail1"}));
+    chassis.emplace_back(std::make_unique<Chassis>(1, std::move(devices)));
 
     // Create System
     System system{std::move(rules), std::move(chassis)};
     EXPECT_EQ(system.getChassis().size(), 1);
     EXPECT_EQ(system.getChassis()[0]->getNumber(), 1);
-    // TODO: Add tests for IDMap once code to populate it is implemented
+    EXPECT_NO_THROW(system.getIDMap().getRule("set_voltage_rule"));
+    EXPECT_NO_THROW(system.getIDMap().getDevice("reg1"));
+    EXPECT_NO_THROW(system.getIDMap().getRail("rail1"));
+    EXPECT_THROW(system.getIDMap().getRail("rail2"), std::invalid_argument);
     EXPECT_EQ(system.getRules().size(), 1);
     EXPECT_EQ(system.getRules()[0]->getID(), "set_voltage_rule");
 }
@@ -68,20 +74,59 @@
 
 TEST(SystemTests, GetIDMap)
 {
-    // TODO: Code to build IDMap is not implemented yet
+    // Create Rules
+    std::vector<std::unique_ptr<Rule>> rules{};
+    rules.emplace_back(createRule("set_voltage_rule"));
+    rules.emplace_back(createRule("read_sensors_rule"));
+
+    // Create Chassis
+    std::vector<std::unique_ptr<Chassis>> chassis{};
+    {
+        // Chassis 1
+        std::vector<std::unique_ptr<Device>> devices{};
+        devices.emplace_back(createDevice("reg1", {"rail1"}));
+        devices.emplace_back(createDevice("reg2", {"rail2a", "rail2b"}));
+        chassis.emplace_back(std::make_unique<Chassis>(1, std::move(devices)));
+    }
+    {
+        // Chassis 2
+        std::vector<std::unique_ptr<Device>> devices{};
+        devices.emplace_back(createDevice("reg3", {"rail3a", "rail3b"}));
+        devices.emplace_back(createDevice("reg4"));
+        chassis.emplace_back(std::make_unique<Chassis>(2, std::move(devices)));
+    }
+
+    // Create System
+    System system{std::move(rules), std::move(chassis)};
+    const IDMap& idMap = system.getIDMap();
+
+    // Verify all Rules are in the IDMap
+    EXPECT_NO_THROW(idMap.getRule("set_voltage_rule"));
+    EXPECT_NO_THROW(idMap.getRule("read_sensors_rule"));
+    EXPECT_THROW(idMap.getRule("set_voltage_rule2"), std::invalid_argument);
+
+    // Verify all Devices are in the IDMap
+    EXPECT_NO_THROW(idMap.getDevice("reg1"));
+    EXPECT_NO_THROW(idMap.getDevice("reg2"));
+    EXPECT_NO_THROW(idMap.getDevice("reg3"));
+    EXPECT_NO_THROW(idMap.getDevice("reg4"));
+    EXPECT_THROW(idMap.getDevice("reg5"), std::invalid_argument);
+
+    // Verify all Rails are in the IDMap
+    EXPECT_NO_THROW(idMap.getRail("rail1"));
+    EXPECT_NO_THROW(idMap.getRail("rail2a"));
+    EXPECT_NO_THROW(idMap.getRail("rail2b"));
+    EXPECT_NO_THROW(idMap.getRail("rail3a"));
+    EXPECT_NO_THROW(idMap.getRail("rail3b"));
+    EXPECT_THROW(idMap.getRail("rail4"), std::invalid_argument);
 }
 
 TEST(SystemTests, GetRules)
 {
     // Create Rules
     std::vector<std::unique_ptr<Rule>> rules{};
-    std::vector<std::unique_ptr<Action>> actions{};
-    actions.emplace_back(std::make_unique<MockAction>());
-    rules.emplace_back(
-        std::make_unique<Rule>("set_voltage_rule", std::move(actions)));
-    actions.emplace_back(std::make_unique<MockAction>());
-    rules.emplace_back(
-        std::make_unique<Rule>("read_sensors_rule", std::move(actions)));
+    rules.emplace_back(createRule("set_voltage_rule"));
+    rules.emplace_back(createRule("read_sensors_rule"));
 
     // Create Chassis
     std::vector<std::unique_ptr<Chassis>> chassis{};
diff --git a/phosphor-regulators/test/test_utils.hpp b/phosphor-regulators/test/test_utils.hpp
index cbb322a..313d9f7 100644
--- a/phosphor-regulators/test/test_utils.hpp
+++ b/phosphor-regulators/test/test_utils.hpp
@@ -13,9 +13,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "action.hpp"
+#include "chassis.hpp"
+#include "configuration.hpp"
+#include "device.hpp"
 #include "i2c_interface.hpp"
+#include "mock_action.hpp"
+#include "presence_detection.hpp"
+#include "rail.hpp"
+#include "rule.hpp"
 
 #include <memory>
+#include <string>
+#include <utility>
+#include <vector>
 
 namespace phosphor::power::regulators::test_utils
 {
@@ -30,4 +41,52 @@
     return i2c::create(1, 0x70, i2c::I2CInterface::InitialState::CLOSED);
 }
 
+/**
+ * Creates a Device object with the specified ID.
+ *
+ * Creates Rail objects within the Device if railIDs is specified.
+ *
+ * @param id device ID
+ * @param railIDs rail IDs (optional)
+ * @return Device object
+ */
+inline std::unique_ptr<Device>
+    createDevice(const std::string& id,
+                 const std::vector<std::string>& railIDs = {})
+{
+    // Create Rails (if any)
+    std::vector<std::unique_ptr<Rail>> rails{};
+    for (const std::string& railID : railIDs)
+    {
+        rails.emplace_back(std::make_unique<Rail>(railID));
+    }
+
+    // Create Device
+    bool isRegulator = true;
+    std::string fru = "/system/chassis/motherboard/reg1";
+    std::unique_ptr<i2c::I2CInterface> i2cInterface = createI2CInterface();
+    std::unique_ptr<PresenceDetection> presenceDetection{};
+    std::unique_ptr<Configuration> configuration{};
+    return std::make_unique<Device>(id, isRegulator, fru,
+                                    std::move(i2cInterface),
+                                    std::move(presenceDetection),
+                                    std::move(configuration), std::move(rails));
+}
+
+/**
+ * Creates a Rule object with the specified ID.
+ *
+ * @param id rule ID
+ * @return Rule object
+ */
+inline std::unique_ptr<Rule> createRule(const std::string& id)
+{
+    // Create actions
+    std::vector<std::unique_ptr<Action>> actions{};
+    actions.emplace_back(std::make_unique<MockAction>());
+
+    // Create Rule
+    return std::make_unique<Rule>(id, std::move(actions));
+}
+
 } // namespace phosphor::power::regulators::test_utils
