diff --git a/src/test/erase/verifyGeometry_test.cpp b/src/test/erase/verifyGeometry_test.cpp
index 8b362f3..57feebd 100644
--- a/src/test/erase/verifyGeometry_test.cpp
+++ b/src/test/erase/verifyGeometry_test.cpp
@@ -15,21 +15,24 @@
 TEST(VerifyGeometry, TooBigFail)
 {
     VerifyDriveGeometry maxVerify("");
-    EXPECT_THROW(maxVerify.geometryOkay(ERASE_MAX_GEOMETRY + 1),
+    EXPECT_THROW(maxVerify.geometryOkay(ERASE_MAX_GEOMETRY, ERASE_MIN_GEOMETRY,
+                                        ERASE_MAX_GEOMETRY + 1),
                  InternalFailure);
 }
 
 TEST(VerifyGeometry, TooSmallFail)
 {
     VerifyDriveGeometry minVerify("");
-    EXPECT_THROW(minVerify.geometryOkay(ERASE_MIN_GEOMETRY - 1),
+    EXPECT_THROW(minVerify.geometryOkay(ERASE_MAX_GEOMETRY, ERASE_MIN_GEOMETRY,
+                                        ERASE_MIN_GEOMETRY - 1),
                  InternalFailure);
 }
 
 TEST(VerifyGeometry, pass)
 {
     VerifyDriveGeometry passVerify("");
-    EXPECT_NO_THROW(passVerify.geometryOkay(ERASE_MIN_GEOMETRY + 1));
+    EXPECT_NO_THROW(passVerify.geometryOkay(
+        ERASE_MAX_GEOMETRY, ERASE_MIN_GEOMETRY, ERASE_MIN_GEOMETRY + 1));
 }
 
 } // namespace estoraged_test
diff --git a/src/test/estoraged_test.cpp b/src/test/estoraged_test.cpp
index bd6db0d..520c7ec 100644
--- a/src/test/estoraged_test.cpp
+++ b/src/test/estoraged_test.cpp
@@ -1,6 +1,7 @@
 #include "estoraged_test.hpp"
 
 #include "estoraged.hpp"
+#include "estoraged_conf.hpp"
 
 #include <unistd.h>
 
@@ -89,7 +90,8 @@
         esObject = std::make_unique<estoraged::EStoraged>(
             *objectServer, testConfigPath, testFileName, testLuksDevName,
             testSize, testLifeTime, testPartNumber, testSerialNumber,
-            testLocationCode, std::move(cryptIface), std::move(fsIface));
+            testLocationCode, ERASE_MAX_GEOMETRY, ERASE_MIN_GEOMETRY,
+            std::move(cryptIface), std::move(fsIface));
     }
 
     void TearDown() override
diff --git a/src/test/util_test.cpp b/src/test/util_test.cpp
index 5f8dca5..708454d 100644
--- a/src/test/util_test.cpp
+++ b/src/test/util_test.cpp
@@ -1,3 +1,4 @@
+#include "estoraged_conf.hpp"
 #include "getConfig.hpp"
 
 #include <boost/container/flat_map.hpp>
@@ -131,15 +132,73 @@
     /* Look for the device file. */
     std::filesystem::path deviceFile, sysfsDir;
     std::string luksName, locationCode;
-    EXPECT_TRUE(estoraged::util::findDevice(data, std::filesystem::path("./"),
-                                            deviceFile, sysfsDir, luksName,
-                                            locationCode));
+    auto result = estoraged::util::findDevice(data,
+                                              std::filesystem::path("./"));
+    EXPECT_TRUE(result.has_value());
 
     /* Validate the results. */
-    EXPECT_EQ("/dev/mmcblk0", deviceFile.string());
-    EXPECT_EQ("./mmcblk0/device", sysfsDir.string());
-    EXPECT_EQ("luks-mmcblk0", luksName);
-    EXPECT_EQ("U102020", locationCode);
+    EXPECT_EQ("/dev/mmcblk0", result->deviceFile.string());
+    EXPECT_EQ("./mmcblk0/device", result->sysfsDir.string());
+    EXPECT_EQ("luks-mmcblk0", result->luksName);
+    EXPECT_EQ("U102020", result->locationCode);
+    EXPECT_EQ(ERASE_MAX_GEOMETRY, result->eraseMaxGeometry);
+    EXPECT_EQ(ERASE_MIN_GEOMETRY, result->eraseMinGeometry);
+
+    /* Delete the dummy files. */
+    EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
+    EXPECT_EQ(3U, std::filesystem::remove_all("abc"));
+    EXPECT_EQ(2U, std::filesystem::remove_all("def"));
+}
+
+/* Test case where we successfully find the device file with updating the
+ * min/max geometry. */
+TEST(utilTest, findDeviceWithMaxAndMinGeometryPass)
+{
+    estoraged::StorageData data;
+
+    /* Set up the map of properties. */
+    data.emplace(std::string("Type"),
+                 estoraged::BasicVariantType("EmmcDevice"));
+    data.emplace(std::string("Name"), estoraged::BasicVariantType("emmc"));
+    data.emplace(std::string("LocationCode"),
+                 estoraged::BasicVariantType("U102020"));
+    data.emplace(std::string("EraseMaxGeometry"),
+                 estoraged::BasicVariantType((uint64_t)5566));
+    data.emplace(std::string("EraseMinGeometry"),
+                 estoraged::BasicVariantType((uint64_t)1234));
+
+    /* Create a dummy device. */
+    std::filesystem::create_directories("abc/device");
+    const std::string dummyTypeFileName("abc/device/type");
+    std::ofstream dummyTypeFile(dummyTypeFileName,
+                                std::ios::out | std::ios::trunc);
+    dummyTypeFile << "SSD";
+    dummyTypeFile.close();
+
+    /* Another device. */
+    std::filesystem::create_directories("def/device");
+
+    /* Create a dummy eMMC device. */
+    std::filesystem::create_directories("mmcblk0/device");
+    const std::string typeFileName("mmcblk0/device/type");
+    std::ofstream typeFile(typeFileName, std::ios::out | std::ios::trunc);
+    typeFile << "MMC";
+    typeFile.close();
+
+    /* Look for the device file. */
+    std::filesystem::path deviceFile, sysfsDir;
+    std::string luksName, locationCode;
+    auto result = estoraged::util::findDevice(data,
+                                              std::filesystem::path("./"));
+    EXPECT_TRUE(result.has_value());
+
+    /* Validate the results. */
+    EXPECT_EQ("/dev/mmcblk0", result->deviceFile.string());
+    EXPECT_EQ("./mmcblk0/device", result->sysfsDir.string());
+    EXPECT_EQ("luks-mmcblk0", result->luksName);
+    EXPECT_EQ("U102020", result->locationCode);
+    EXPECT_EQ(5566, result->eraseMaxGeometry);
+    EXPECT_EQ(1234, result->eraseMinGeometry);
 
     /* Delete the dummy files. */
     EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
@@ -174,11 +233,9 @@
     typeFile.close();
 
     /* Look for the device file. */
-    std::filesystem::path deviceFile, sysfsDir;
-    std::string luksName, locationCode;
-    EXPECT_FALSE(estoraged::util::findDevice(data, std::filesystem::path("./"),
-                                             deviceFile, sysfsDir, luksName,
-                                             locationCode));
+    auto result = estoraged::util::findDevice(data,
+                                              std::filesystem::path("./"));
+    EXPECT_FALSE(result.has_value());
 
     /* Delete the dummy files. */
     EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
@@ -215,11 +272,9 @@
     typeFile.close();
 
     /* Look for the device file. */
-    std::filesystem::path deviceFile, sysfsDir;
-    std::string luksName, locationCode;
-    EXPECT_FALSE(estoraged::util::findDevice(data, std::filesystem::path("./"),
-                                             deviceFile, sysfsDir, luksName,
-                                             locationCode));
+    auto result = estoraged::util::findDevice(data,
+                                              std::filesystem::path("./"));
+    EXPECT_FALSE(result.has_value());
 
     /* Delete the dummy files. */
     EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
@@ -249,11 +304,9 @@
     std::filesystem::create_directories("def/device");
 
     /* Look for the device file. */
-    std::filesystem::path deviceFile, sysfsDir;
-    std::string luksName, locationCode;
-    EXPECT_FALSE(estoraged::util::findDevice(data, std::filesystem::path("./"),
-                                             deviceFile, sysfsDir, luksName,
-                                             locationCode));
+    auto result = estoraged::util::findDevice(data,
+                                              std::filesystem::path("./"));
+    EXPECT_FALSE(result.has_value());
 
     /* Delete the dummy files. */
     EXPECT_EQ(3U, std::filesystem::remove_all("abc"));
