diff --git a/tests/unit-tests/encoding/encoder.t.cpp b/tests/unit-tests/encoding/encoder.t.cpp
new file mode 100644
index 0000000..b48569d
--- /dev/null
+++ b/tests/unit-tests/encoding/encoder.t.cpp
@@ -0,0 +1,171 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 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 "encoding/encoder.hpp"
+
+#include "boost-test.hpp"
+
+namespace ndn {
+namespace encoding {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(EncodingEncoder)
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  Encoder e;
+  BOOST_CHECK_GT(e.capacity(), 100);
+
+  Encoder e1(100);
+  BOOST_CHECK_EQUAL(e1.capacity(), 100);
+
+  Encoder e2(100, 100);
+  BOOST_CHECK_EQUAL(e2.capacity(), 100);
+
+  BOOST_CHECK_EQUAL(e.prependByte(1), 1);
+  BOOST_CHECK_EQUAL(e.appendByte(1), 1);
+
+  uint8_t buf1[] = {'t', 'e', 's', 't', '1'};
+  BOOST_CHECK_EQUAL(e1.prependByteArray(buf1, sizeof(buf1)), 5);
+  BOOST_CHECK_EQUAL(e1.appendByteArray(buf1, sizeof(buf1)), 5);
+
+  std::vector<uint8_t> buf2 = {'t', 'e', 's', 't', '2'};
+  BOOST_CHECK_EQUAL(e1.prependRange(buf2.begin(), buf2.end()), 5);
+  BOOST_CHECK_EQUAL(e1.appendRange(buf2.begin(), buf2.end()), 5);
+
+  std::list<uint8_t> buf3 = {'t', 'e', 's', 't', '2'};
+  BOOST_CHECK_EQUAL(e2.prependRange(buf3.begin(), buf3.end()), 5);
+  BOOST_CHECK_EQUAL(e2.appendRange(buf3.begin(), buf3.end()), 5);
+
+  uint8_t expected1[] = {1, 1};
+  BOOST_CHECK_EQUAL_COLLECTIONS(e.buf(), e.buf() + e.size(),
+                                expected1, expected1 + sizeof(expected1));
+
+  const Encoder& constE = e;
+  BOOST_CHECK_EQUAL_COLLECTIONS(constE.buf(), constE.buf() + constE.size(),
+                                expected1, expected1 + sizeof(expected1));
+
+  uint8_t expected2[] = {'t', 'e', 's', 't', '2',
+                           't', 'e', 's', 't', '1', 't', 'e', 's', 't', '1',
+                         't', 'e', 's', 't', '2'};
+  BOOST_CHECK_EQUAL_COLLECTIONS(e1.begin(), e1.end(),
+                                expected2, expected2 + sizeof(expected2));
+  const Encoder& constE1 = e1;
+  BOOST_CHECK_EQUAL_COLLECTIONS(constE1.begin(), constE1.end(),
+                                expected2, expected2 + sizeof(expected2));
+
+  BOOST_CHECK_THROW(e1.block(), tlv::Error);
+  BOOST_CHECK_NO_THROW(e1.block(false));
+
+  e1.prependVarNumber(20);
+  e1.prependVarNumber(100);
+
+  BOOST_CHECK_NO_THROW(e1.block());
+}
+
+BOOST_AUTO_TEST_CASE(Tlv)
+{
+  Encoder e;
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(1), 1);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(1), 1);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(252), 1);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(252), 1);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(253), 3);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(253), 3);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(65536), 5);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(65536), 5);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(4294967296LL), 9);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(4294967296LL), 9);
+
+  //
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(1), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(1), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(252), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(252), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(253), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(253), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(255), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(255), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(256), 2);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(256), 2);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(65535), 2);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(65535), 2);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(65536), 4);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(65536), 4);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(4294967296LL), 8);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(4294967296LL), 8);
+
+  //
+
+  uint8_t buf[] = {0x01, 0x03, 0x00, 0x00, 0x00};
+  Block block1(buf, sizeof(buf));
+
+  BOOST_CHECK_EQUAL(e.prependByteArrayBlock(100, buf, sizeof(buf)), 7);
+  BOOST_CHECK_EQUAL(e.appendByteArrayBlock(100, buf, sizeof(buf)), 7);
+
+  BOOST_CHECK_EQUAL(e.prependBlock(block1), 5);
+  BOOST_CHECK_EQUAL(e.appendBlock(block1), 5);
+
+  Block block2(100, block1);
+
+  BOOST_CHECK_EQUAL(e.prependBlock(block2), 7);
+  BOOST_CHECK_EQUAL(e.appendBlock(block2), 7);
+}
+
+BOOST_AUTO_TEST_CASE(Reserve)
+{
+  Encoder e(100, 0);
+  BOOST_CHECK_EQUAL(e.capacity(), 100);
+
+  e.reserve(100, true);
+  BOOST_CHECK_EQUAL(e.capacity(), 100);
+
+  e.reserve(200, true);
+  BOOST_CHECK_EQUAL(e.capacity(), 200);
+
+  e.reserve(100, false);
+  BOOST_CHECK_EQUAL(e.capacity(), 200);
+
+  e.reserveFront(1000);
+  BOOST_CHECK_GT(e.capacity(), 1000);
+
+  e.reserveBack(1000);
+  BOOST_CHECK_GT(e.capacity(), 2000);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // EncodingEncoder
+
+} // namespace tests
+} // namespace encoding
+} // namespace ndn
diff --git a/tests/unit-tests/encoding/estimator.t.cpp b/tests/unit-tests/encoding/estimator.t.cpp
new file mode 100644
index 0000000..b759489
--- /dev/null
+++ b/tests/unit-tests/encoding/estimator.t.cpp
@@ -0,0 +1,120 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 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 "encoding/estimator.hpp"
+
+#include "boost-test.hpp"
+
+namespace ndn {
+namespace encoding {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(EncodingEstimator)
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  Estimator e;
+  Estimator e1(100);
+  Estimator e2(100, 100);
+
+  BOOST_CHECK_EQUAL(e.prependByte(1), 1);
+  BOOST_CHECK_EQUAL(e.appendByte(1), 1);
+
+  uint8_t buf1[] = {'t', 'e', 's', 't', '1'};
+  BOOST_CHECK_EQUAL(e1.prependByteArray(buf1, sizeof(buf1)), 5);
+  BOOST_CHECK_EQUAL(e1.appendByteArray(buf1, sizeof(buf1)), 5);
+
+  std::vector<uint8_t> buf2 = {'t', 'e', 's', 't', '2'};
+  BOOST_CHECK_EQUAL(e1.prependRange(buf2.begin(), buf2.end()), 5);
+  BOOST_CHECK_EQUAL(e1.appendRange(buf2.begin(), buf2.end()), 5);
+
+  std::list<uint8_t> buf3 = {'t', 'e', 's', 't', '2'};
+  BOOST_CHECK_EQUAL(e2.prependRange(buf3.begin(), buf3.end()), 5);
+  BOOST_CHECK_EQUAL(e2.appendRange(buf3.begin(), buf3.end()), 5);
+}
+
+BOOST_AUTO_TEST_CASE(Tlv)
+{
+  Estimator e;
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(1), 1);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(1), 1);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(252), 1);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(252), 1);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(253), 3);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(253), 3);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(65536), 5);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(65536), 5);
+
+  BOOST_CHECK_EQUAL(e.prependVarNumber(4294967296LL), 9);
+  BOOST_CHECK_EQUAL(e.appendVarNumber(4294967296LL), 9);
+
+  //
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(1), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(1), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(252), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(252), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(253), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(253), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(255), 1);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(255), 1);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(256), 2);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(256), 2);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(65535), 2);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(65535), 2);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(65536), 4);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(65536), 4);
+
+  BOOST_CHECK_EQUAL(e.prependNonNegativeInteger(4294967296LL), 8);
+  BOOST_CHECK_EQUAL(e.appendNonNegativeInteger(4294967296LL), 8);
+
+  //
+
+  uint8_t buf[] = {0x01, 0x03, 0x00, 0x00, 0x00};
+  Block block1(buf, sizeof(buf));
+
+  BOOST_CHECK_EQUAL(e.prependByteArrayBlock(100, buf, sizeof(buf)), 7);
+  BOOST_CHECK_EQUAL(e.appendByteArrayBlock(100, buf, sizeof(buf)), 7);
+
+  BOOST_CHECK_EQUAL(e.prependBlock(block1), 5);
+  BOOST_CHECK_EQUAL(e.appendBlock(block1), 5);
+
+  Block block2(100, block1);
+
+  BOOST_CHECK_EQUAL(e.prependBlock(block2), 7);
+  BOOST_CHECK_EQUAL(e.appendBlock(block2), 7);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // EncodingEstimator
+
+} // namespace tests
+} // namespace encoding
+} // namespace ndn
diff --git a/tests/unit-tests/test-block.cpp b/tests/unit-tests/test-block.cpp
index a8c104b..959b612 100644
--- a/tests/unit-tests/test-block.cpp
+++ b/tests/unit-tests/test-block.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2015 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -19,126 +19,153 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-
 #include "encoding/encoding-buffer.hpp"
 #include "encoding/buffer-stream.hpp"
 
 #include "boost-test.hpp"
 
-using namespace std;
 namespace ndn {
+namespace tests {
 
 BOOST_AUTO_TEST_SUITE(TestBlock)
 
-BOOST_AUTO_TEST_CASE(BlockBasic)
+class BasicBlockFixture
 {
+public:
   EncodingBuffer buffer;
   EncodingEstimator estimator;
-  size_t s1, s2;
+};
 
-  // VarNumber checks
+BOOST_FIXTURE_TEST_SUITE(Basic, BasicBlockFixture)
 
-  s1 = buffer.prependVarNumber(252);
-  s2 = estimator.prependVarNumber(252);
+BOOST_AUTO_TEST_CASE(VarNumberOneByte1)
+{
+  size_t s1 = buffer.prependVarNumber(252);
+  size_t s2 = estimator.prependVarNumber(252);
   BOOST_CHECK_EQUAL(buffer.size(), 1);
   BOOST_CHECK_EQUAL(s1, 1);
   BOOST_CHECK_EQUAL(s2, 1);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependVarNumber(253);
-  s2 = estimator.prependVarNumber(253);
+BOOST_AUTO_TEST_CASE(VarNumberOneByte2)
+{
+  size_t s1 = buffer.prependVarNumber(253);
+  size_t s2 = estimator.prependVarNumber(253);
   BOOST_CHECK_EQUAL(buffer.size(), 3);
   BOOST_CHECK_EQUAL(s1, 3);
   BOOST_CHECK_EQUAL(s2, 3);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependVarNumber(255);
-  s2 = estimator.prependVarNumber(255);
+BOOST_AUTO_TEST_CASE(VarNumberThreeBytes1)
+{
+  size_t s1 = buffer.prependVarNumber(255);
+  size_t s2 = estimator.prependVarNumber(255);
   BOOST_CHECK_EQUAL(buffer.size(), 3);
   BOOST_CHECK_EQUAL(s1, 3);
   BOOST_CHECK_EQUAL(s2, 3);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependVarNumber(65535);
-  s2 = estimator.prependVarNumber(65535);
+BOOST_AUTO_TEST_CASE(VarNumberThreeBytes2)
+{
+  size_t s1 = buffer.prependVarNumber(65535);
+  size_t s2 = estimator.prependVarNumber(65535);
   BOOST_CHECK_EQUAL(buffer.size(), 3);
   BOOST_CHECK_EQUAL(s1, 3);
   BOOST_CHECK_EQUAL(s2, 3);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependVarNumber(65536);
-  s2 = estimator.prependVarNumber(65536);
+BOOST_AUTO_TEST_CASE(VarNumberFiveBytes1)
+{
+  size_t s1 = buffer.prependVarNumber(65536);
+  size_t s2 = estimator.prependVarNumber(65536);
   BOOST_CHECK_EQUAL(buffer.size(), 5);
   BOOST_CHECK_EQUAL(s1, 5);
   BOOST_CHECK_EQUAL(s2, 5);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependVarNumber(4294967295LL);
-  s2 = estimator.prependVarNumber(4294967295LL);
+BOOST_AUTO_TEST_CASE(VarNumberFiveBytes2)
+{
+  size_t s1 = buffer.prependVarNumber(4294967295LL);
+  size_t s2 = estimator.prependVarNumber(4294967295LL);
   BOOST_CHECK_EQUAL(buffer.size(), 5);
   BOOST_CHECK_EQUAL(s1, 5);
   BOOST_CHECK_EQUAL(s2, 5);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependVarNumber(4294967296LL);
-  s2 = estimator.prependVarNumber(4294967296LL);
+BOOST_AUTO_TEST_CASE(VarNumberNineBytes)
+{
+  size_t s1 = buffer.prependVarNumber(4294967296LL);
+  size_t s2 = estimator.prependVarNumber(4294967296LL);
   BOOST_CHECK_EQUAL(buffer.size(), 9);
   BOOST_CHECK_EQUAL(s1, 9);
   BOOST_CHECK_EQUAL(s2, 9);
-  buffer = EncodingBuffer();
+}
 
-  // nonNegativeInteger checks
-
-  s1 = buffer.prependNonNegativeInteger(252);
-  s2 = estimator.prependNonNegativeInteger(252);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberOneByte1)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(252);
+  size_t s2 = estimator.prependNonNegativeInteger(252);
   BOOST_CHECK_EQUAL(buffer.size(), 1);
   BOOST_CHECK_EQUAL(s1, 1);
   BOOST_CHECK_EQUAL(s2, 1);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependNonNegativeInteger(255);
-  s2 = estimator.prependNonNegativeInteger(255);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberOneByte2)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(255);
+  size_t s2 = estimator.prependNonNegativeInteger(255);
   BOOST_CHECK_EQUAL(buffer.size(), 1);
   BOOST_CHECK_EQUAL(s1, 1);
   BOOST_CHECK_EQUAL(s2, 1);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependNonNegativeInteger(256);
-  s2 = estimator.prependNonNegativeInteger(256);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberTwoBytes1)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(256);
+  size_t s2 = estimator.prependNonNegativeInteger(256);
   BOOST_CHECK_EQUAL(buffer.size(), 2);
   BOOST_CHECK_EQUAL(s1, 2);
   BOOST_CHECK_EQUAL(s2, 2);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependNonNegativeInteger(65535);
-  s2 = estimator.prependNonNegativeInteger(65535);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberTwoBytes2)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(65535);
+  size_t s2 = estimator.prependNonNegativeInteger(65535);
   BOOST_CHECK_EQUAL(buffer.size(), 2);
   BOOST_CHECK_EQUAL(s1, 2);
   BOOST_CHECK_EQUAL(s2, 2);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependNonNegativeInteger(65536);
-  s2 = estimator.prependNonNegativeInteger(65536);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberFourBytes1)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(65536);
+  size_t s2 = estimator.prependNonNegativeInteger(65536);
   BOOST_CHECK_EQUAL(buffer.size(), 4);
   BOOST_CHECK_EQUAL(s1, 4);
   BOOST_CHECK_EQUAL(s2, 4);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependNonNegativeInteger(4294967295LL);
-  s2 = estimator.prependNonNegativeInteger(4294967295LL);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberFourBytes2)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(4294967295LL);
+  size_t s2 = estimator.prependNonNegativeInteger(4294967295LL);
   BOOST_CHECK_EQUAL(buffer.size(), 4);
   BOOST_CHECK_EQUAL(s1, 4);
   BOOST_CHECK_EQUAL(s2, 4);
-  buffer = EncodingBuffer();
+}
 
-  s1 = buffer.prependNonNegativeInteger(4294967296LL);
-  s2 = estimator.prependNonNegativeInteger(4294967296LL);
+BOOST_AUTO_TEST_CASE(NonNegativeNumberEightBytes)
+{
+  size_t s1 = buffer.prependNonNegativeInteger(4294967296LL);
+  size_t s2 = estimator.prependNonNegativeInteger(4294967296LL);
   BOOST_CHECK_EQUAL(buffer.size(), 8);
   BOOST_CHECK_EQUAL(s1, 8);
   BOOST_CHECK_EQUAL(s2, 8);
-  buffer = EncodingBuffer();
 }
 
+BOOST_AUTO_TEST_SUITE_END() // Basic
+
 BOOST_AUTO_TEST_CASE(EncodingBufferToBlock)
 {
   uint8_t value[4];
@@ -166,19 +193,24 @@
   Block block(0xab, buf);
   block.encode();
 
-  EncodingBuffer buffer(0,0);
-  BOOST_REQUIRE_NO_THROW(buffer = EncodingBuffer(block));
-  BOOST_CHECK_EQUAL(buffer.size(), 12);
-  BOOST_CHECK_EQUAL(buffer.capacity(), 12);
+  {
+    BOOST_REQUIRE_NO_THROW(EncodingBuffer(block));
+    EncodingBuffer buffer(block);
+    BOOST_CHECK_EQUAL(buffer.size(), 12);
+    BOOST_CHECK_EQUAL(buffer.capacity(), 12);
+  }
 
   (*buf)[1] = 0xe0;
   (*buf)[2] = 2;
   BOOST_REQUIRE_NO_THROW(block = Block(buf, buf->begin() + 1, buf->begin() + 5));
   BOOST_CHECK_EQUAL(block.type(), 0xe0);
 
-  BOOST_REQUIRE_NO_THROW(buffer = EncodingBuffer(block));
-  BOOST_CHECK_EQUAL(buffer.size(), 4);
-  BOOST_CHECK_EQUAL(buffer.capacity(), 10);
+  {
+    BOOST_REQUIRE_NO_THROW(EncodingBuffer(block));
+    EncodingBuffer buffer(block);
+    BOOST_CHECK_EQUAL(buffer.size(), 4);
+    BOOST_CHECK_EQUAL(buffer.capacity(), 10);
+  }
 }
 
 BOOST_AUTO_TEST_CASE(FromBuffer)
@@ -280,4 +312,5 @@
 
 BOOST_AUTO_TEST_SUITE_END()
 
+} // namespace tests
 } // namespace ndn
diff --git a/tests/unit-tests/test-name.cpp b/tests/unit-tests/test-name.cpp
index e2f45ab..0eef98b 100644
--- a/tests/unit-tests/test-name.cpp
+++ b/tests/unit-tests/test-name.cpp
@@ -459,6 +459,37 @@
   BOOST_CHECK_GE(name::Component("A"), comp0);
 }
 
+BOOST_AUTO_TEST_CASE(CreateComponentWithIterators) // Bug #2490
+{
+  {
+    std::vector<uint8_t> bytes = {1};
+    name::Component c(bytes.begin(), bytes.end());
+    BOOST_CHECK_EQUAL(c.value_size(), 1);
+    BOOST_CHECK_EQUAL(c.size(), 3);
+  }
+
+  {
+    std::list<uint8_t> bytes = {1, 2, 3, 4};
+    name::Component c(bytes.begin(), bytes.end());
+    BOOST_CHECK_EQUAL(c.value_size(), 4);
+    BOOST_CHECK_EQUAL(c.size(), 6);
+  }
+
+  {
+    std::vector<int8_t> bytes = {1};
+    name::Component c(bytes.begin(), bytes.end());
+    BOOST_CHECK_EQUAL(c.value_size(), 1);
+    BOOST_CHECK_EQUAL(c.size(), 3);
+  }
+
+  {
+    std::list<int8_t> bytes = {1, 2, 3, 4};
+    name::Component c(bytes.begin(), bytes.end());
+    BOOST_CHECK_EQUAL(c.value_size(), 4);
+    BOOST_CHECK_EQUAL(c.size(), 6);
+  }
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace ndn
diff --git a/tests/unit-tests/util/simple-notification.hpp b/tests/unit-tests/util/simple-notification.hpp
index e90e374..1d22a2a 100644
--- a/tests/unit-tests/util/simple-notification.hpp
+++ b/tests/unit-tests/util/simple-notification.hpp
@@ -1,6 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -19,32 +25,6 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-/**
- * Original copyright notice from NFD:
- *
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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 a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
 #ifndef NDN_UNIT_TESTS_UTIL_SIMPLE_NOTIFICATION_HPP
 #define NDN_UNIT_TESTS_UTIL_SIMPLE_NOTIFICATION_HPP
 
@@ -83,10 +63,9 @@
   wireEncode() const
   {
     ndn::EncodingBuffer buffer;
-    prependByteArrayBlock(buffer,
-                          0x8888,
-                          reinterpret_cast<const uint8_t*>(m_message.c_str()),
-                          m_message.size());
+    buffer.prependByteArrayBlock(0x8888,
+                                 reinterpret_cast<const uint8_t*>(m_message.c_str()),
+                                 m_message.size());
     return buffer.block();
   }
 
