Add route printer
diff --git a/crow/include/crow/app.h b/crow/include/crow/app.h
index 9162352..e0e5d84 100644
--- a/crow/include/crow/app.h
+++ b/crow/include/crow/app.h
@@ -21,7 +21,7 @@
 #define CROW_ROUTE(app, url) app.route_dynamic(url)
 #else
 #define CROW_ROUTE(app, url) \
-  app.route<crow::black_magic::get_parameter_tag(url)>(url)
+  app.template route<crow::black_magic::get_parameter_tag(url)>(url)
 #endif
 
 namespace crow {
@@ -116,6 +116,10 @@
     router_.debug_print();
   }
 
+  std::vector<std::string> get_routes() {
+    return router_.get_routes();
+  }
+
 #ifdef CROW_ENABLE_SSL
   self_t& ssl_file(const std::string& crt_filename,
                    const std::string& key_filename) {
diff --git a/crow/include/crow/routing.h b/crow/include/crow/routing.h
index a82c34e..d07f09f 100644
--- a/crow/include/crow/routing.h
+++ b/crow/include/crow/routing.h
@@ -940,6 +940,16 @@
 
   void debug_print() { trie_.debug_print(); }
 
+  std::vector<std::string> get_routes() {
+      std::vector<std::string> ret;
+      for (auto& rule: rules_){
+          if (rule != nullptr){
+            ret.push_back(rule->rule_);
+          }
+      }
+      return ret;
+   }
+
  private:
   std::vector<std::unique_ptr<BaseRule>> rules_;
   Trie trie_;
diff --git a/crow/include/crow/socket_adaptors.h b/crow/include/crow/socket_adaptors.h
index fe1bb93..a0d8dfa 100644
--- a/crow/include/crow/socket_adaptors.h
+++ b/crow/include/crow/socket_adaptors.h
@@ -33,6 +33,32 @@
   tcp::socket socket_;
 };
 
+
+struct TestSocketAdaptor {
+  using context = void;
+  TestSocketAdaptor(boost::asio::io_service& io_service, context*)
+      : socket_(io_service) {}
+
+  boost::asio::io_service& get_io_service() { return socket_.get_io_service(); }
+
+  tcp::socket& raw_socket() { return socket_; }
+
+  tcp::socket& socket() { return socket_; }
+
+  tcp::endpoint remote_endpoint() { return socket_.remote_endpoint(); }
+
+  bool is_open() { return socket_.is_open(); }
+
+  void close() { socket_.close(); }
+
+  template <typename F>
+  void start(F f) {
+    f(boost::system::error_code());
+  }
+
+  tcp::socket socket_;
+};
+
 #ifdef CROW_ENABLE_SSL
 struct SSLAdaptor {
   using context = boost::asio::ssl::context;