diff --git a/tests/unit-tests/test-name.cpp b/tests/unit-tests/test-name.cpp
index b95f69e..649bd6f 100644
--- a/tests/unit-tests/test-name.cpp
+++ b/tests/unit-tests/test-name.cpp
@@ -137,7 +137,8 @@
                                  function<uint64_t(const name::Component&)>,
                                  function<Name&(Name&, uint64_t)>,
                                  Name/*expected*/,
-                                 uint64_t/*value*/> > Dataset;
+                                 uint64_t/*value*/,
+                                 function<bool(const name::Component&)> > > Dataset;
 
   Numeric()
   {
@@ -146,27 +147,32 @@
                                         bind(&name::Component::toNumberWithMarker, _1, 0xAA),
                                         bind(&Name::appendNumberWithMarker, _1, 0xAA, _2),
                                         Name("/%AA%03%E8"),
-                                        1000));
+                                        1000,
+                                        bind(&name::Component::isNumberWithMarker, _1, 0xAA)));
     dataset.push_back(boost::make_tuple(&name::Component::fromSegment,
                                         bind(&name::Component::toSegment, _1),
                                         bind(&Name::appendSegment, _1, _2),
                                         Name("/%00%27%10"),
-                                        10000));
+                                        10000,
+                                        bind(&name::Component::isSegment, _1)));
     dataset.push_back(boost::make_tuple(&name::Component::fromSegmentOffset,
                                         bind(&name::Component::toSegmentOffset, _1),
                                         bind(&Name::appendSegmentOffset, _1, _2),
                                         Name("/%FB%00%01%86%A0"),
-                                        100000));
+                                        100000,
+                                        bind(&name::Component::isSegmentOffset, _1)));
     dataset.push_back(boost::make_tuple(&name::Component::fromVersion,
                                         bind(&name::Component::toVersion, _1),
                                         bind(&Name::appendVersion, _1, _2),
                                         Name("/%FD%00%0FB%40"),
-                                        1000000));
+                                        1000000,
+                                        bind(&name::Component::isVersion, _1)));
     dataset.push_back(boost::make_tuple(&name::Component::fromSequenceNumber,
                                         bind(&name::Component::toSequenceNumber, _1),
                                         bind(&Name::appendSequenceNumber, _1, _2),
                                         Name("/%FE%00%98%96%80"),
-                                        10000000));
+                                        10000000,
+                                        bind(&name::Component::isSequenceNumber, _1)));
   }
 
   Dataset dataset;
@@ -179,14 +185,16 @@
                                  function<time::system_clock::TimePoint(const name::Component&)>,
                                  function<Name&(Name&, const time::system_clock::TimePoint&)>,
                                  Name/*expected*/,
-                                 time::system_clock::TimePoint/*value*/> > Dataset;
+                                 time::system_clock::TimePoint/*value*/,
+                                 function<bool(const name::Component&)> > > Dataset;
   Timestamp()
   {
     dataset.push_back(boost::make_tuple(&name::Component::fromTimestamp,
                                         bind(&name::Component::toTimestamp, _1),
                                         bind(&Name::appendTimestamp, _1, _2),
                                         Name("/%FC%00%04%7BE%E3%1B%00%00"),
-                                        (time::getUnixEpoch() + time::days(14600/*40 years*/))));
+                                        (time::getUnixEpoch() + time::days(14600/*40 years*/)),
+                                        bind(&name::Component::isTimestamp, _1)));
   }
 
   Dataset dataset;
@@ -205,9 +213,13 @@
   //   std::cout << name << std::endl;
   // }
 
+  name::Component invalidComponent1;
+  name::Component invalidComponent2("1234567890");
+
   for (typename T::Dataset::const_iterator it = this->dataset.begin();
        it != this->dataset.end(); ++it) {
     const Name& expected = it->template get<3>();
+    BOOST_TEST_MESSAGE("Check " << expected[0].toUri());
 
     name::Component actualComponent = it->template get<0>()(it->template get<4>());
     BOOST_CHECK_EQUAL(actualComponent, expected[0]);
@@ -216,8 +228,15 @@
     it->template get<2>()(actualName, it->template get<4>());
     BOOST_CHECK_EQUAL(actualName, expected);
 
+    BOOST_CHECK_EQUAL(it->template get<5>()(expected[0]), true);
     BOOST_REQUIRE_NO_THROW(it->template get<1>()(expected[0]));
     BOOST_CHECK_EQUAL(it->template get<1>()(expected[0]), it->template get<4>());
+
+    BOOST_CHECK_EQUAL(it->template get<5>()(invalidComponent1), false);
+    BOOST_CHECK_EQUAL(it->template get<5>()(invalidComponent2), false);
+
+    BOOST_REQUIRE_THROW(it->template get<1>()(invalidComponent1), name::Component::Error);
+    BOOST_REQUIRE_THROW(it->template get<1>()(invalidComponent2), name::Component::Error);
   }
 }
 
