diff --git a/src/name-assignments/assignment-funcs.cpp b/src/name-assignments/assignment-funcs.cpp
index 7e806f8..f67e8b0 100644
--- a/src/name-assignments/assignment-funcs.cpp
+++ b/src/name-assignments/assignment-funcs.cpp
@@ -38,7 +38,7 @@
 }
 
 unique_ptr<NameAssignmentFuncFactory>
-NameAssignmentFuncFactory::createNameAssignmentConfigFuncs(const std::string& challengeType)
+NameAssignmentFuncFactory::createNameAssignmentFuncFactories(const std::string& challengeType)
 {
   FuncFactoryFactory& factory = getFactory();
   auto i = factory.find(challengeType);
diff --git a/src/name-assignments/assignment-funcs.hpp b/src/name-assignments/assignment-funcs.hpp
index d45f082..e42299c 100644
--- a/src/name-assignments/assignment-funcs.hpp
+++ b/src/name-assignments/assignment-funcs.hpp
@@ -36,7 +36,7 @@
 
   template <class ChallengeType>
   static void
-  registerNameAssignmentFuncFactorys(const std::string& typeName)
+  registerNameAssignmentFuncFactories(const std::string& typeName)
   {
     FuncFactoryFactory& factory = getFactory();
     BOOST_ASSERT(factory.count(typeName) == 0);
@@ -47,7 +47,7 @@
   isChallengeSupported(const std::string& challengeType);
 
   static unique_ptr<NameAssignmentFuncFactory>
-  createNameAssignmentConfigFuncs(const std::string& challengeType);
+  createNameAssignmentFuncFactories(const std::string& challengeType);
 
   virtual NameAssignmentFunc
   getFunction(const std::string& factoryParam) = 0;
@@ -63,13 +63,13 @@
   getFactory();
 };
 
-#define NDNCERT_REGISTER_FUNCFACTORY(C, T)                              \
-  static class NdnCert##C##FuncFactoryRegistrationClass {               \
-  public:                                                             \
-    NdnCert##C##FuncFactoryRegistrationClass()                          \
-    {                                                                 \
-      ::ndn::ndncert::NameAssignmentFuncFactory::registerNameAssignmentFuncFactorys<C>(T); \
-    }                                                                 \
+#define NDNCERT_REGISTER_FUNCFACTORY(C, T)                               \
+  static class NdnCert##C##FuncFactoryRegistrationClass {                \
+  public:                                                                \
+    NdnCert##C##FuncFactoryRegistrationClass()                           \
+    {                                                                    \
+      ::ndn::ndncert::NameAssignmentFuncFactory::registerNameAssignmentFuncFactories<C>(T); \
+    }                                                                    \
   } g_NdnCert##C##ChallengeRegistrationVariable
 
 }  // namespace ndncert
diff --git a/src/name-assignments/assignment-hash.cpp b/src/name-assignments/assignment-hash.cpp
index 9a73e0e..22b6e69 100644
--- a/src/name-assignments/assignment-hash.cpp
+++ b/src/name-assignments/assignment-hash.cpp
@@ -9,6 +9,7 @@
 namespace ndncert {
 
 _LOG_INIT(ndncert.assignment.hash);
+
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentHash, "hash");
 
 AssignmentHash::AssignmentHash()
diff --git a/src/name-assignments/assignment-param.cpp b/src/name-assignments/assignment-param.cpp
index 83de6a4..c7d0cfb 100644
--- a/src/name-assignments/assignment-param.cpp
+++ b/src/name-assignments/assignment-param.cpp
@@ -8,6 +8,7 @@
 namespace ndncert {
 
 _LOG_INIT(ndncert.assignment.param);
+
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentParam, "param");
 
 AssignmentParam::AssignmentParam()
@@ -42,6 +43,9 @@
   std::map<std::string, std::string> paramMap;
   for (const auto& param : params) {
       paramMap[std::get<0>(param)] = std::get<1>(param);
+      if (std::get<1>(param).size() == 0) { // empty parameter!
+          return std::vector<PartialName>();
+      }
   }
 
   //construct name
diff --git a/src/name-assignments/assignment-random.cpp b/src/name-assignments/assignment-random.cpp
index b713665..9ebf45f 100644
--- a/src/name-assignments/assignment-random.cpp
+++ b/src/name-assignments/assignment-random.cpp
@@ -9,6 +9,7 @@
 namespace ndncert {
 
 _LOG_INIT(ndncert.assignment.random);
+
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentRandom, "random");
 
 AssignmentRandom::AssignmentRandom()
diff --git a/tests/unit-tests/name-assignment.t.cpp b/tests/unit-tests/name-assignment.t.cpp
new file mode 100644
index 0000000..ab3afc3
--- /dev/null
+++ b/tests/unit-tests/name-assignment.t.cpp
@@ -0,0 +1,80 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
+
+#include <name-assignments/assignment-random.hpp>
+#include <name-assignments/assignment-param.hpp>
+#include <name-assignments/assignment-hash.hpp>
+#include "test-common.hpp"
+
+namespace ndn {
+namespace ndncert {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(TestNameAssignment)
+BOOST_AUTO_TEST_CASE(NameAssignmentRandom)
+{
+  AssignmentRandom randomAssignment;
+  auto func = randomAssignment.getFunction("");
+  BOOST_CHECK_EQUAL(func(std::vector<std::tuple<std::string, std::string>>()).size(), 1);
+  BOOST_CHECK_EQUAL(func(std::vector<std::tuple<std::string, std::string>>()).begin()->size(), 1);
+}
+
+BOOST_AUTO_TEST_CASE(NameAssignmentParam)
+{
+  AssignmentParam paramAssignment;
+  auto func = paramAssignment.getFunction("abc:xyz");
+  std::vector<std::tuple<std::string, std::string>> requirements;
+  requirements.emplace_back("abc", "123");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 0);
+  requirements.emplace_back("xyz", "789");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 1);
+  BOOST_CHECK_EQUAL(*func(requirements).begin(), Name("/123/789"));
+  requirements.emplace_back("fake", "456");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 1);
+  BOOST_CHECK_EQUAL(*func(requirements).begin(), Name("/123/789"));
+  requirements[1] = std::tuple<std::string, std::string>("xyz", "");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 0);
+}
+
+BOOST_AUTO_TEST_CASE(NameAssignmentHash)
+{
+  AssignmentHash hashAssignment;
+  auto func = hashAssignment.getFunction("abc:xyz");
+  std::vector<std::tuple<std::string, std::string>> requirements;
+  requirements.emplace_back("abc", "123");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 0);
+  requirements.emplace_back("xyz", "789");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 1);
+  BOOST_CHECK_EQUAL(func(requirements).begin()->size(), 1);
+  requirements.emplace_back("fake", "456");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 1);
+  BOOST_CHECK_EQUAL(func(requirements).begin()->size(), 1);
+  requirements[1] = std::tuple<std::string, std::string>("xyz", "");
+  BOOST_CHECK_EQUAL(func(requirements).size(), 1);
+  BOOST_CHECK_EQUAL(func(requirements).begin()->size(), 1);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+}  // namespace tests
+}  // namespace ndncert
+}  // namespace ndn
+
+
