diff --git a/tests/unit-tests/bench.t.cpp b/tests/unit-tests/bench.t.cpp
index 9403c39..1fffef1 100644
--- a/tests/unit-tests/bench.t.cpp
+++ b/tests/unit-tests/bench.t.cpp
@@ -143,7 +143,7 @@
 
       auto paramList = requester::Requester::selectOrContinueChallenge(state, "pin");
       auto request = ca.getCertificateRequest(*challengeInterest2);
-      auto secret = request->m_challengeState->m_secrets.get(ChallengePin::PARAMETER_KEY_CODE, "");
+      auto secret = request->challengeState->secrets.get(ChallengePin::PARAMETER_KEY_CODE, "");
       paramList.begin()->second = secret;
       challengeInterest3 = requester::Requester::genChallengeInterest(state, std::move(paramList));
       // std::cout << "CHALLENGE Interest Size: " << challengeInterest3->wireEncode().size() << std::endl;
diff --git a/tests/unit-tests/ca-memory.t.cpp b/tests/unit-tests/ca-memory.t.cpp
index c9d9f74..3a69e0b 100644
--- a/tests/unit-tests/ca-memory.t.cpp
+++ b/tests/unit-tests/ca-memory.t.cpp
@@ -47,11 +47,11 @@
 
   // get operation
   auto result = storage.getRequest(requestId);
-  BOOST_CHECK_EQUAL(request1.m_cert, result.m_cert);
-  BOOST_CHECK(request1.m_status == result.m_status);
-  BOOST_CHECK_EQUAL(request1.m_caPrefix, result.m_caPrefix);
-  BOOST_CHECK_EQUAL_COLLECTIONS(request1.m_encryptionKey.begin(), request1.m_encryptionKey.end(),
-                                result.m_encryptionKey.begin(), result.m_encryptionKey.end());
+  BOOST_CHECK_EQUAL(request1.cert, result.cert);
+  BOOST_CHECK(request1.status == result.status);
+  BOOST_CHECK_EQUAL(request1.caPrefix, result.caPrefix);
+  BOOST_CHECK_EQUAL_COLLECTIONS(request1.encryptionKey.begin(), request1.encryptionKey.end(),
+                                result.encryptionKey.begin(), result.encryptionKey.end());
 
   JsonSection json;
   json.put("code", "1234");
@@ -63,9 +63,9 @@
                    std::move(json), std::move(aesKey2), 0);
   storage.updateRequest(request2);
   result = storage.getRequest(requestId);
-  BOOST_CHECK_EQUAL(request2.m_cert, result.m_cert);
-  BOOST_CHECK(request2.m_status == result.m_status);
-  BOOST_CHECK_EQUAL(request2.m_caPrefix, result.m_caPrefix);
+  BOOST_CHECK_EQUAL(request2.cert, result.cert);
+  BOOST_CHECK(request2.status == result.status);
+  BOOST_CHECK_EQUAL(request2.caPrefix, result.caPrefix);
 
   auto identity2 = addIdentity(Name("/ndn/site2"));
   auto key2 = identity2.getDefaultKey();
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index da8284c..b2d3300 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -259,7 +259,7 @@
     auto challengeList = requester::Requester::onNewRenewRevokeResponse(state, response);
     RequestId requestId;
     std::memcpy(requestId.data(), contentBlock.get(tlv::RequestId).value(), contentBlock.get(tlv::RequestId).value_size());
-    auto ca_encryption_key = ca.getCaStorage()->getRequest(requestId).m_encryptionKey;
+    auto ca_encryption_key = ca.getCaStorage()->getRequest(requestId).encryptionKey;
     BOOST_CHECK_EQUAL_COLLECTIONS(state.m_aesKey.begin(), state.m_aesKey.end(),
                                   ca_encryption_key.begin(), ca_encryption_key.end());
   });
@@ -422,7 +422,7 @@
 
       auto paramList = requester::Requester::selectOrContinueChallenge(state, "pin");
       auto request = ca.getCertificateRequest(*challengeInterest2);
-      auto secret = request->m_challengeState->m_secrets.get(ChallengePin::PARAMETER_KEY_CODE, "");
+      auto secret = request->challengeState->secrets.get(ChallengePin::PARAMETER_KEY_CODE, "");
       paramList.begin()->second = secret;
       challengeInterest3 = requester::Requester::genChallengeInterest(state, std::move(paramList));
     }
@@ -502,7 +502,7 @@
     auto challengeList = requester::Requester::onNewRenewRevokeResponse(state, response);
     RequestId requestId;
     std::memcpy(requestId.data(), contentBlock.get(tlv::RequestId).value(), contentBlock.get(tlv::RequestId).value_size());
-    auto ca_encryption_key = ca.getCaStorage()->getRequest(requestId).m_encryptionKey;
+    auto ca_encryption_key = ca.getCaStorage()->getRequest(requestId).encryptionKey;
     BOOST_CHECK_EQUAL_COLLECTIONS(state.m_aesKey.begin(), state.m_aesKey.end(),
                                   ca_encryption_key.begin(), ca_encryption_key.end());
   });
diff --git a/tests/unit-tests/ca-sqlite.t.cpp b/tests/unit-tests/ca-sqlite.t.cpp
index f609d4f..f0383ff 100644
--- a/tests/unit-tests/ca-sqlite.t.cpp
+++ b/tests/unit-tests/ca-sqlite.t.cpp
@@ -45,11 +45,11 @@
 
   // get operation
   auto result = storage.getRequest(requestId);
-  BOOST_CHECK_EQUAL(request1.m_cert, result.m_cert);
-  BOOST_CHECK(request1.m_status == result.m_status);
-  BOOST_CHECK_EQUAL(request1.m_caPrefix, result.m_caPrefix);
-  BOOST_CHECK_EQUAL_COLLECTIONS(request1.m_encryptionKey.begin(), request1.m_encryptionKey.end(),
-                                result.m_encryptionKey.begin(), result.m_encryptionKey.end());
+  BOOST_CHECK_EQUAL(request1.cert, result.cert);
+  BOOST_CHECK(request1.status == result.status);
+  BOOST_CHECK_EQUAL(request1.caPrefix, result.caPrefix);
+  BOOST_CHECK_EQUAL_COLLECTIONS(request1.encryptionKey.begin(), request1.encryptionKey.end(),
+                                result.encryptionKey.begin(), result.encryptionKey.end());
 
   // update operation
   JsonSection json;
@@ -60,9 +60,9 @@
                   std::move(json), std::move(aesKey2), 0);
   storage.updateRequest(request2);
   result = storage.getRequest(requestId);
-  BOOST_CHECK_EQUAL(request2.m_cert, result.m_cert);
-  BOOST_CHECK(request2.m_status == result.m_status);
-  BOOST_CHECK_EQUAL(request2.m_caPrefix, result.m_caPrefix);
+  BOOST_CHECK_EQUAL(request2.cert, result.cert);
+  BOOST_CHECK(request2.status == result.status);
+  BOOST_CHECK_EQUAL(request2.caPrefix, result.caPrefix);
 
   auto identity2 = addIdentity(Name("/ndn/site2"));
   auto key2 = identity2.getDefaultKey();
diff --git a/tests/unit-tests/challenge-credential.t.cpp b/tests/unit-tests/challenge-credential.t.cpp
index 4b91aa2..03cf023 100644
--- a/tests/unit-tests/challenge-credential.t.cpp
+++ b/tests/unit-tests/challenge-credential.t.cpp
@@ -72,11 +72,11 @@
   m_keyChain.addCertificate(keyB, credential);
 
   // using private key to sign cert request
-  auto params = challenge.getRequestedParameterList(state.m_status, "");
+  auto params = challenge.getRequestedParameterList(state.status, "");
   ChallengeCredential::fulfillParameters(params, m_keyChain, credential.getName(), requestId);
-  Block paramsTlv = challenge.genChallengeRequestTLV(state.m_status, "", std::move(params));
+  Block paramsTlv = challenge.genChallengeRequestTLV(state.status, "", std::move(params));
   challenge.handleChallengeRequest(paramsTlv, state);
-  BOOST_CHECK_EQUAL(statusToString(state.m_status), statusToString(Status::PENDING));
+  BOOST_CHECK_EQUAL(statusToString(state.status), statusToString(Status::PENDING));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit-tests/challenge-email.t.cpp b/tests/unit-tests/challenge-email.t.cpp
index 34f2089..429e532 100644
--- a/tests/unit-tests/challenge-email.t.cpp
+++ b/tests/unit-tests/challenge-email.t.cpp
@@ -56,12 +56,12 @@
   ChallengeEmail challenge("./tests/unit-tests/test-send-email.sh");
   challenge.handleChallengeRequest(paramTLV, request);
 
-  BOOST_CHECK(request.m_status == Status::CHALLENGE);
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_challengeStatus, ChallengeEmail::NEED_CODE);
-  BOOST_CHECK(request.m_challengeState->m_secrets.get<std::string>(ChallengeEmail::PARAMETER_KEY_CODE) != "");
-  BOOST_CHECK(request.m_challengeState->m_remainingTime.count() != 0);
-  BOOST_CHECK(request.m_challengeState->m_remainingTries != 0);
-  BOOST_CHECK_EQUAL(request.m_challengeType, "email");
+  BOOST_CHECK(request.status == Status::CHALLENGE);
+  BOOST_CHECK_EQUAL(request.challengeState->challengeStatus, ChallengeEmail::NEED_CODE);
+  BOOST_CHECK(request.challengeState->secrets.get<std::string>(ChallengeEmail::PARAMETER_KEY_CODE) != "");
+  BOOST_CHECK(request.challengeState->remainingTime.count() != 0);
+  BOOST_CHECK(request.challengeState->remainingTries != 0);
+  BOOST_CHECK_EQUAL(request.challengeType, "email");
 
   std::string line = "";
   std::string delimiter = " ";
@@ -77,7 +77,7 @@
 
   end = line.find(delimiter);
   std::string secret = line.substr(0, end);
-  auto stored_secret = request.m_challengeState->m_secrets.get<std::string>(ChallengeEmail::PARAMETER_KEY_CODE);
+  auto stored_secret = request.challengeState->secrets.get<std::string>(ChallengeEmail::PARAMETER_KEY_CODE);
   BOOST_CHECK_EQUAL(secret, stored_secret);
   line = line.substr(end + 1);
 
@@ -107,9 +107,9 @@
   ChallengeEmail challenge;
   challenge.handleChallengeRequest(paramTLV, request);
 
-  BOOST_CHECK_EQUAL(request.m_challengeType, "email");
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_challengeStatus, ChallengeEmail::INVALID_EMAIL);
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_remainingTries, 2);
+  BOOST_CHECK_EQUAL(request.challengeType, "email");
+  BOOST_CHECK_EQUAL(request.challengeState->challengeStatus, ChallengeEmail::INVALID_EMAIL);
+  BOOST_CHECK_EQUAL(request.challengeState->remainingTries, 2);
 }
 
 BOOST_AUTO_TEST_CASE(OnChallengeRequestWithCode)
@@ -132,8 +132,8 @@
   ChallengeEmail challenge;
   challenge.handleChallengeRequest(paramTLV, request);
 
-  BOOST_CHECK(request.m_status == Status::PENDING);
-  BOOST_CHECK(!request.m_challengeState);
+  BOOST_CHECK(request.status == Status::PENDING);
+  BOOST_CHECK(!request.challengeState);
 }
 
 BOOST_AUTO_TEST_CASE(OnValidateInterestComingWithWrongCode)
@@ -156,9 +156,9 @@
   ChallengeEmail challenge;
   challenge.handleChallengeRequest(paramTLV, request);
 
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_challengeStatus, ChallengeEmail::WRONG_CODE);
-  BOOST_CHECK(request.m_status == Status::CHALLENGE);
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_secrets.empty(), false);
+  BOOST_CHECK_EQUAL(request.challengeState->challengeStatus, ChallengeEmail::WRONG_CODE);
+  BOOST_CHECK(request.status == Status::CHALLENGE);
+  BOOST_CHECK_EQUAL(request.challengeState->secrets.empty(), false);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit-tests/challenge-pin.t.cpp b/tests/unit-tests/challenge-pin.t.cpp
index 8366a89..f3b10d8 100644
--- a/tests/unit-tests/challenge-pin.t.cpp
+++ b/tests/unit-tests/challenge-pin.t.cpp
@@ -45,9 +45,9 @@
   ChallengePin challenge;
   challenge.handleChallengeRequest(makeEmptyBlock(tlv::EncryptedPayload), request);
 
-  BOOST_CHECK(request.m_status == Status::CHALLENGE);
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_challengeStatus, ChallengePin::NEED_CODE);
-  BOOST_CHECK_EQUAL(request.m_challengeType, "pin");
+  BOOST_CHECK(request.status == Status::CHALLENGE);
+  BOOST_CHECK_EQUAL(request.challengeState->challengeStatus, ChallengePin::NEED_CODE);
+  BOOST_CHECK_EQUAL(request.challengeType, "pin");
 }
 
 BOOST_AUTO_TEST_CASE(OnChallengeRequestWithCode)
@@ -70,8 +70,8 @@
   ChallengePin challenge;
   challenge.handleChallengeRequest(paramTLV, request);
 
-  BOOST_CHECK(request.m_status == Status::PENDING);
-  BOOST_CHECK(!request.m_challengeState);
+  BOOST_CHECK(request.status == Status::PENDING);
+  BOOST_CHECK(!request.challengeState);
 }
 
 BOOST_AUTO_TEST_CASE(OnChallengeRequestWithWrongCode)
@@ -94,9 +94,9 @@
   ChallengePin challenge;
   challenge.handleChallengeRequest(paramTLV, request);
 
-  BOOST_CHECK(request.m_status == Status::CHALLENGE);
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_challengeStatus, ChallengePin::WRONG_CODE);
-  BOOST_CHECK_EQUAL(request.m_challengeState->m_secrets.empty(), false);
+  BOOST_CHECK(request.status == Status::CHALLENGE);
+  BOOST_CHECK_EQUAL(request.challengeState->challengeStatus, ChallengePin::WRONG_CODE);
+  BOOST_CHECK_EQUAL(request.challengeState->secrets.empty(), false);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
