diff --git a/src/test/erase/crypto_test.cpp b/src/test/erase/crypto_test.cpp
new file mode 100644
index 0000000..917b23b
--- /dev/null
+++ b/src/test/erase/crypto_test.cpp
@@ -0,0 +1,146 @@
+
+#include "cryptErase.hpp"
+#include "cryptsetupInterface.hpp"
+#include "estoraged.hpp"
+#include "estoraged_test.hpp"
+
+#include <unistd.h>
+
+#include <xyz/openbmc_project/Common/error.hpp>
+
+#include <exception>
+#include <filesystem>
+#include <fstream>
+#include <string>
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+namespace estoraged_test
+{
+
+using estoraged::CryptErase;
+using estoraged::Cryptsetup;
+using estoraged::CryptsetupInterface;
+using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
+using sdbusplus::xyz::openbmc_project::Common::Error::ResourceNotFound;
+using sdbusplus::xyz::openbmc_project::Inventory::Item::server::Volume;
+using ::testing::_;
+using ::testing::Return;
+using ::testing::StrEq;
+
+class cryptoEraseTest : public testing::Test
+{
+  public:
+    static constexpr char testFileName[] = "testfile";
+    std::ofstream testFile;
+
+    void SetUp() override
+    {
+        /* Create an empty file that we'll pretend is a 'storage device'. */
+        testFile.open(testFileName,
+                      std::ios::out | std::ios::binary | std::ios::trunc);
+        testFile.close();
+        if (testFile.fail())
+        {
+            throw std::runtime_error("Failed to open test file");
+        }
+        testFile.close();
+    }
+};
+
+TEST_F(cryptoEraseTest, EraseCryptPass)
+{
+    std::unique_ptr<MockCryptsetupInterface> mockCryptIface =
+        std::make_unique<MockCryptsetupInterface>();
+
+    EXPECT_CALL(*mockCryptIface, cryptLoad(_, StrEq(CRYPT_LUKS2), nullptr))
+        .WillOnce(Return(0));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
+        .WillOnce(Return(1));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotStatus(_, 0))
+        .WillOnce(Return(CRYPT_SLOT_ACTIVE_LAST));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeyslotDestroy(_, 0)).Times(1);
+
+    CryptErase myCryptErase =
+        CryptErase(testFileName, std::move(mockCryptIface));
+    EXPECT_NO_THROW(myCryptErase.doErase());
+}
+
+TEST_F(cryptoEraseTest, EraseCrypMaxSlotFails)
+{
+    std::unique_ptr<MockCryptsetupInterface> mockCryptIface =
+        std::make_unique<MockCryptsetupInterface>();
+
+    EXPECT_CALL(*mockCryptIface, cryptLoad(_, StrEq(CRYPT_LUKS2), nullptr))
+        .WillOnce(Return(0));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
+        .WillOnce(Return(-1));
+
+    CryptErase myCryptErase =
+        CryptErase(testFileName, std::move(mockCryptIface));
+    EXPECT_THROW(myCryptErase.doErase(), ResourceNotFound);
+}
+
+TEST_F(cryptoEraseTest, EraseCrypMaxSlotZero)
+{
+    std::unique_ptr<MockCryptsetupInterface> mockCryptIface =
+        std::make_unique<MockCryptsetupInterface>();
+
+    EXPECT_CALL(*mockCryptIface, cryptLoad(_, StrEq(CRYPT_LUKS2), nullptr))
+        .WillOnce(Return(0));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
+        .WillOnce(Return(0));
+
+    CryptErase myCryptErase =
+        CryptErase(testFileName, std::move(mockCryptIface));
+    EXPECT_THROW(myCryptErase.doErase(), ResourceNotFound);
+}
+
+TEST_F(cryptoEraseTest, EraseCrypOnlyInvalid)
+{
+    std::unique_ptr<MockCryptsetupInterface> mockCryptIface =
+        std::make_unique<MockCryptsetupInterface>();
+
+    EXPECT_CALL(*mockCryptIface, cryptLoad(_, StrEq(CRYPT_LUKS2), nullptr))
+        .WillOnce(Return(0));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
+        .WillOnce(Return(32));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotStatus(_, _))
+        .WillRepeatedly(Return(CRYPT_SLOT_INVALID));
+
+    CryptErase myCryptErase =
+        CryptErase(testFileName, std::move(mockCryptIface));
+    EXPECT_NO_THROW(myCryptErase.doErase());
+}
+
+TEST_F(cryptoEraseTest, EraseCrypDestoryFails)
+{
+    std::unique_ptr<MockCryptsetupInterface> mockCryptIface =
+        std::make_unique<MockCryptsetupInterface>();
+
+    EXPECT_CALL(*mockCryptIface, cryptLoad(_, StrEq(CRYPT_LUKS2), nullptr))
+        .WillOnce(Return(0));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
+        .WillOnce(Return(1));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeySlotStatus(_, 0))
+        .WillOnce(Return(CRYPT_SLOT_ACTIVE));
+
+    EXPECT_CALL(*mockCryptIface, cryptKeyslotDestroy(_, 0))
+        .WillOnce(Return(-1));
+
+    CryptErase myCryptErase =
+        CryptErase(testFileName, std::move(mockCryptIface));
+    EXPECT_THROW(myCryptErase.doErase(), InternalFailure);
+}
+
+} // namespace estoraged_test
diff --git a/src/test/estoraged_test.cpp b/src/test/estoraged_test.cpp
index 3b23215..10357fe 100644
--- a/src/test/estoraged_test.cpp
+++ b/src/test/estoraged_test.cpp
@@ -1,13 +1,12 @@
+#include "estoraged_test.hpp"
 
-#include "cryptsetupInterface.hpp"
 #include "estoraged.hpp"
-#include "filesystemInterface.hpp"
 
 #include <unistd.h>
 
-#include <sdbusplus/bus.hpp>
 #include <sdbusplus/test/sdbus_mock.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/Inventory/Item/Volume/client.hpp>
 
 #include <exception>
 #include <filesystem>
@@ -22,59 +21,6 @@
 namespace estoraged_test
 {
 
-class MockFilesystemInterface : public estoraged::FilesystemInterface
-{
-  public:
-    MOCK_METHOD(int, runMkfs, (const std::string& logicalVolume), (override));
-
-    MOCK_METHOD(int, doMount,
-                (const char* source, const char* target,
-                 const char* filesystemtype, unsigned long mountflags,
-                 const void* data),
-                (override));
-
-    MOCK_METHOD(int, doUnmount, (const char* target), (override));
-
-    MOCK_METHOD(bool, createDirectory, (const std::filesystem::path& p),
-                (override));
-
-    MOCK_METHOD(bool, removeDirectory, (const std::filesystem::path& p),
-                (override));
-
-    MOCK_METHOD(bool, directoryExists, (const std::filesystem::path& p),
-                (override));
-};
-
-class MockCryptsetupInterface : public estoraged::CryptsetupInterface
-{
-  public:
-    MOCK_METHOD(int, cryptFormat,
-                (struct crypt_device * cd, const char* type, const char* cipher,
-                 const char* cipher_mode, const char* uuid,
-                 const char* volume_key, size_t volume_key_size, void* params),
-                (override));
-
-    MOCK_METHOD(int, cryptKeyslotAddByVolumeKey,
-                (struct crypt_device * cd, int keyslot, const char* volume_key,
-                 size_t volume_key_size, const char* passphrase,
-                 size_t passphrase_size),
-                (override));
-
-    MOCK_METHOD(int, cryptLoad,
-                (struct crypt_device * cd, const char* requested_type,
-                 void* params),
-                (override));
-
-    MOCK_METHOD(int, cryptActivateByPassphrase,
-                (struct crypt_device * cd, const char* name, int keyslot,
-                 const char* passphrase, size_t passphrase_size,
-                 uint32_t flags),
-                (override));
-
-    MOCK_METHOD(int, cryptDeactivate,
-                (struct crypt_device * cd, const char* name), (override));
-};
-
 using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
 using sdbusplus::xyz::openbmc_project::Common::Error::ResourceNotFound;
 using sdbusplus::xyz::openbmc_project::Inventory::Item::server::Volume;
diff --git a/src/test/include/estoraged_test.hpp b/src/test/include/estoraged_test.hpp
new file mode 100644
index 0000000..ebd9e11
--- /dev/null
+++ b/src/test/include/estoraged_test.hpp
@@ -0,0 +1,80 @@
+
+#include "cryptErase.hpp"
+#include "cryptsetupInterface.hpp"
+#include "estoraged.hpp"
+#include "filesystemInterface.hpp"
+
+#include <unistd.h>
+
+#include <exception>
+#include <filesystem>
+#include <string>
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+namespace estoraged_test
+{
+
+class MockFilesystemInterface : public estoraged::FilesystemInterface
+{
+  public:
+    MOCK_METHOD(int, runMkfs, (const std::string& logicalVolume), (override));
+
+    MOCK_METHOD(int, doMount,
+                (const char* source, const char* target,
+                 const char* filesystemtype, unsigned long mountflags,
+                 const void* data),
+                (override));
+
+    MOCK_METHOD(int, doUnmount, (const char* target), (override));
+
+    MOCK_METHOD(bool, createDirectory, (const std::filesystem::path& p),
+                (override));
+
+    MOCK_METHOD(bool, removeDirectory, (const std::filesystem::path& p),
+                (override));
+
+    MOCK_METHOD(bool, directoryExists, (const std::filesystem::path& p),
+                (override));
+};
+
+class MockCryptsetupInterface : public estoraged::CryptsetupInterface
+{
+  public:
+    MOCK_METHOD(int, cryptFormat,
+                (struct crypt_device * cd, const char* type, const char* cipher,
+                 const char* cipher_mode, const char* uuid,
+                 const char* volume_key, size_t volume_key_size, void* params),
+                (override));
+
+    MOCK_METHOD(int, cryptKeyslotAddByVolumeKey,
+                (struct crypt_device * cd, int keyslot, const char* volume_key,
+                 size_t volume_key_size, const char* passphrase,
+                 size_t passphrase_size),
+                (override));
+
+    MOCK_METHOD(int, cryptLoad,
+                (struct crypt_device * cd, const char* requested_type,
+                 void* params),
+                (override));
+
+    MOCK_METHOD(int, cryptActivateByPassphrase,
+                (struct crypt_device * cd, const char* name, int keyslot,
+                 const char* passphrase, size_t passphrase_size,
+                 uint32_t flags),
+                (override));
+
+    MOCK_METHOD(int, cryptDeactivate,
+                (struct crypt_device * cd, const char* name), (override));
+
+    MOCK_METHOD(int, cryptKeyslotDestroy,
+                (struct crypt_device * cd, const int slot), (override));
+
+    MOCK_METHOD(int, cryptKeySlotMax, (const char* type), (override));
+
+    MOCK_METHOD(crypt_keyslot_info, cryptKeySlotStatus,
+                (struct crypt_device * cd, int keyslot), (override));
+};
+
+} // namespace estoraged_test
diff --git a/src/test/meson.build b/src/test/meson.build
index 6d6880d..b684d24 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -5,9 +5,12 @@
   'erase/verifyGeometry_test',
   'erase/pattern_test',
   'erase/zero_test',
+  'erase/crypto_test',
   'estoraged_test',
 ]
 
+test_eStoraged_headers = include_directories('include')
+
 foreach t : tests
   test(t, executable(t.underscorify(), t + '.cpp',
                      implicit_include_directories: false,
@@ -16,5 +19,5 @@
                        gmock,
                        libeStoraged,
                      ],
-                     include_directories: eStoraged_headers))
+                     include_directories: [eStoraged_headers, test_eStoraged_headers]))
 endforeach
