diff --git a/src/meta-info.cpp b/src/meta-info.cpp
index 41ad0f7..dcafb18 100644
--- a/src/meta-info.cpp
+++ b/src/meta-info.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -205,7 +205,7 @@
 
   // ContentType
   if (val != m_wire.elements_end() && val->type() == tlv::ContentType) {
-    m_type = readNonNegativeInteger(*val);
+    m_type = readNonNegativeIntegerAs<uint32_t>(*val);
     ++val;
   }
   else {
diff --git a/src/mgmt/control-response.cpp b/src/mgmt/control-response.cpp
index 9d82d40..3045783 100644
--- a/src/mgmt/control-response.cpp
+++ b/src/mgmt/control-response.cpp
@@ -79,7 +79,7 @@
   if (val == m_wire.elements_end() || val->type() != tlv::nfd::StatusCode) {
     BOOST_THROW_EXCEPTION(Error("missing StatusCode sub-element"));
   }
-  m_code = readNonNegativeInteger(*val);
+  m_code = readNonNegativeIntegerAs<uint32_t>(*val);
   ++val;
 
   if (val == m_wire.elements_end() || val->type() != tlv::nfd::StatusText) {
diff --git a/src/selectors.cpp b/src/selectors.cpp
index 8890b58..a207775 100644
--- a/src/selectors.cpp
+++ b/src/selectors.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -145,13 +145,13 @@
   // MinSuffixComponents
   Block::element_const_iterator val = m_wire.find(tlv::MinSuffixComponents);
   if (val != m_wire.elements_end()) {
-    m_minSuffixComponents = readNonNegativeInteger(*val);
+    m_minSuffixComponents = readNonNegativeIntegerAs<int>(*val);
   }
 
   // MaxSuffixComponents
   val = m_wire.find(tlv::MaxSuffixComponents);
   if (val != m_wire.elements_end()) {
-    m_maxSuffixComponents = readNonNegativeInteger(*val);
+    m_maxSuffixComponents = readNonNegativeIntegerAs<int>(*val);
   }
 
   // PublisherPublicKeyLocator
@@ -169,7 +169,7 @@
   // ChildSelector
   val = m_wire.find(tlv::ChildSelector);
   if (val != m_wire.elements_end()) {
-    m_childSelector = readNonNegativeInteger(*val);
+    m_childSelector = readNonNegativeIntegerAs<bool>(*val);
   }
   else {
     m_childSelector = DEFAULT_CHILD_SELECTOR;
diff --git a/tests/unit-tests/mgmt/control-response.t.cpp b/tests/unit-tests/mgmt/control-response.t.cpp
new file mode 100644
index 0000000..10a3284
--- /dev/null
+++ b/tests/unit-tests/mgmt/control-response.t.cpp
@@ -0,0 +1,61 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "mgmt/control-response.hpp"
+
+#include "boost-test.hpp"
+
+namespace ndn {
+namespace mgmt {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_AUTO_TEST_SUITE(TestControlResponse)
+
+static const uint8_t WIRE[] = {
+  0x65, 0x17, // ControlResponse
+        0x66, 0x02, // StatusCode
+              0x01, 0x94,
+        0x67, 0x11, // StatusText
+              0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x74, 0x20,
+              0x66, 0x6f, 0x75, 0x6e, 0x64};
+
+BOOST_AUTO_TEST_CASE(Encode)
+{
+  ControlResponse cr(404, "Nothing not found");
+  const Block& wire = cr.wireEncode();
+  BOOST_CHECK_EQUAL_COLLECTIONS(WIRE, WIRE + sizeof(WIRE),
+                                wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(Decode)
+{
+  ControlResponse cr(Block(WIRE, sizeof(WIRE)));
+  BOOST_CHECK_EQUAL(cr.getCode(), 404);
+  BOOST_CHECK_EQUAL(cr.getText(), "Nothing not found");
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestControlResponse
+BOOST_AUTO_TEST_SUITE_END() // Mgmt
+
+} // namespace tests
+} // namespace mgmt
+} // namespace ndn
diff --git a/tests/unit-tests/mgmt/nfd/control-response.t.cpp b/tests/unit-tests/mgmt/nfd/control-response.t.cpp
deleted file mode 100644
index 58fc3bc..0000000
--- a/tests/unit-tests/mgmt/nfd/control-response.t.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library 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 Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#include "mgmt/nfd/control-response.hpp"
-
-#include "boost-test.hpp"
-
-namespace ndn {
-namespace nfd {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(Mgmt)
-BOOST_AUTO_TEST_SUITE(Nfd)
-BOOST_AUTO_TEST_SUITE(TestControlResponse)
-
-const uint8_t TestControlResponse[] = {0x65, 0x17,
-                                       0x66, 0x02, 0x01, 0x94, 0x67, 0x11, 0x4e, 0x6f, 0x74,
-                                       0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x74, 0x20,
-                                       0x66, 0x6f, 0x75, 0x6e, 0x64};
-
-// ControlResponse
-
-BOOST_AUTO_TEST_CASE(ControlResponseEncode)
-{
-  ControlResponse controlResponse(404, "Nothing not found");
-  const Block &wire = controlResponse.wireEncode();
-
-  BOOST_REQUIRE_EQUAL_COLLECTIONS(TestControlResponse,
-                                  TestControlResponse+sizeof(TestControlResponse),
-                                  wire.begin(), wire.end());
-}
-
-BOOST_AUTO_TEST_CASE(ControlResponseDecode)
-{
-  ControlResponse controlResponse;
-
-  BOOST_REQUIRE_NO_THROW(controlResponse.wireDecode(Block(TestControlResponse,
-                                                          sizeof(TestControlResponse))));
-
-  BOOST_REQUIRE_EQUAL(controlResponse.getCode(), 404);
-  BOOST_REQUIRE_EQUAL(controlResponse.getText(), "Nothing not found");
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestControlResponse
-BOOST_AUTO_TEST_SUITE_END() // Nfd
-BOOST_AUTO_TEST_SUITE_END() // Mgmt
-
-} // namespace tests
-} // namespace nfd
-} // namespace ndn
