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
