diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp
index 4a0eae9..a9859d8 100644
--- a/lib/cpp/test/Benchmark.cpp
+++ b/lib/cpp/test/Benchmark.cpp
@@ -19,12 +19,10 @@
 
 #include <iostream>
 #include <cmath>
-#include <transport/TBufferTransports.h>
-#include <protocol/TBinaryProtocol.h>
-#include <protocol/TJSONProtocol.h>
+#include "transport/TBufferTransports.h"
+#include "protocol/TBinaryProtocol.h"
 #include "gen-cpp/DebugProtoTest_types.h"
 #include <time.h>
-#include <protocol/TDebugProtocol.h>
 #include <sys/time.h>
 
 class Timer {
@@ -76,7 +74,7 @@
 
     for (int i = 0; i < num; i ++) {
       buf->resetBuffer();
-      TBinaryProtocol prot(buf);
+      TBinaryProtocolT<TBufferBase> prot(buf);
       ooe.write(&prot);
     }
     cout << "Write: " << num / (1000 * timer.frame()) << " kHz" << endl;
@@ -95,7 +93,7 @@
       OneOfEach ooe2;
       shared_ptr<TMemoryBuffer> buf2(new TMemoryBuffer(data, datasize));
       //buf2->resetBuffer(data, datasize);
-      TBinaryProtocol prot(buf2);
+      TBinaryProtocolT<TBufferBase> prot(buf2);
       ooe2.read(&prot);
 
       //cout << apache::thrift::ThriftDebugString(ooe2) << endl << endl;
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index c478cce..536796f 100644
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -47,6 +47,7 @@
 	DebugProtoTest \
 	JSONProtoTest \
 	OptionalRequiredTest \
+	SpecializationTest \
 	AllProtocolsTest \
 	UnitTests
 
@@ -114,6 +115,14 @@
 
 OptionalRequiredTest_LDADD = libtestgencpp.la
 
+#
+# SpecializationTest
+#
+SpecializationTest_SOURCES = \
+	SpecializationTest.cpp
+
+SpecializationTest_LDADD = libtestgencpp.la
+
 
 #
 # Common thrift code generation rules
diff --git a/lib/cpp/test/SpecializationTest.cpp b/lib/cpp/test/SpecializationTest.cpp
new file mode 100644
index 0000000..954585a
--- /dev/null
+++ b/lib/cpp/test/SpecializationTest.cpp
@@ -0,0 +1,108 @@
+#include <iostream>
+#include <cmath>
+#include <transport/TTransportUtils.h>
+#include <protocol/TBinaryProtocol.h>
+#include <gen-cpp/DebugProtoTest_types.h>
+
+using std::cout;
+using std::endl;
+using namespace thrift::test::debug;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
+
+typedef TBinaryProtocolT<TMemoryBuffer> MyProtocol;
+//typedef TBinaryProtocolT<TTransport> MyProtocol;
+
+int main() {
+
+  OneOfEach ooe;
+  ooe.im_true   = true;
+  ooe.im_false  = false;
+  ooe.a_bite    = 0xd6;
+  ooe.integer16 = 27000;
+  ooe.integer32 = 1<<24;
+  ooe.integer64 = (uint64_t)6000 * 1000 * 1000;
+  ooe.double_precision = M_PI;
+  ooe.some_characters  = "JSON THIS! \"\1";
+  ooe.zomg_unicode     = "\xd7\n\a\t";
+  ooe.base64 = "\1\2\3\255";
+
+  Nesting n;
+  n.my_ooe = ooe;
+  n.my_ooe.integer16 = 16;
+  n.my_ooe.integer32 = 32;
+  n.my_ooe.integer64 = 64;
+  n.my_ooe.double_precision = (std::sqrt(5)+1)/2;
+  n.my_ooe.some_characters  = ":R (me going \"rrrr\")";
+  n.my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20"
+                              "\xd0\x9d\xce\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0\xb0\xcf\x81\xe2\x84\x8e"
+                              "\x20\xce\x91\x74\x74\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80\xbc";
+  n.my_bonk.type    = 31337;
+  n.my_bonk.message = "I am a bonk... xor!";
+
+  HolyMoley hm;
+
+  hm.big.push_back(ooe);
+  hm.big.push_back(n.my_ooe);
+  hm.big[0].a_bite = 0x22;
+  hm.big[1].a_bite = 0x33;
+
+  std::vector<std::string> stage1;
+  stage1.push_back("and a one");
+  stage1.push_back("and a two");
+  hm.contain.insert(stage1);
+  stage1.clear();
+  stage1.push_back("then a one, two");
+  stage1.push_back("three!");
+  stage1.push_back("FOUR!!");
+  hm.contain.insert(stage1);
+  stage1.clear();
+  hm.contain.insert(stage1);
+
+  std::vector<Bonk> stage2;
+  hm.bonks["nothing"] = stage2;
+  stage2.resize(stage2.size()+1);
+  stage2.back().type = 1;
+  stage2.back().message = "Wait.";
+  stage2.resize(stage2.size()+1);
+  stage2.back().type = 2;
+  stage2.back().message = "What?";
+  hm.bonks["something"] = stage2;
+  stage2.clear();
+  stage2.resize(stage2.size()+1);
+  stage2.back().type = 3;
+  stage2.back().message = "quoth";
+  stage2.resize(stage2.size()+1);
+  stage2.back().type = 4;
+  stage2.back().message = "the raven";
+  stage2.resize(stage2.size()+1);
+  stage2.back().type = 5;
+  stage2.back().message = "nevermore";
+  hm.bonks["poe"] = stage2;
+
+  boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  boost::shared_ptr<TProtocol> proto(new MyProtocol(buffer));
+
+  cout << "Testing ooe" << endl;
+
+  ooe.write(proto.get());
+  OneOfEach ooe2;
+  ooe2.read(proto.get());
+
+  assert(ooe == ooe2);
+
+
+  cout << "Testing hm" << endl;
+
+  hm.write(proto.get());
+  HolyMoley hm2;
+  hm2.read(proto.get());
+
+  assert(hm == hm2);
+
+  hm2.big[0].a_bite = 0xFF;
+
+  assert(hm != hm2);
+
+  return 0;
+}
