         XCTAssert(route("/servers/json/logs", shouldMatch: true))
     }
 
-    func testTrieRouteMatcherWithTrailingSlashes() {
-        let router = Router(matcher: TrieRouteMatcher.self) { route in
-            route.get("/hello/world") {_ in print("hello!"); return Response(status: .OK) }
+    func testMatcherWithTrailingSlashes(matcher: RouteMatcherType.Type) {
+        let responder = Responder { request in
+            return Response(status: .OK)
         }
+
+        let routes = [
+            Route(methods: [.GET], path: "/hello/world", middleware: [], responder: responder)
+        ]
+
+        let matcher = matcher.init(routes: routes)
 
         let request1 = try! Request(method: .GET, uri: "/hello/world")
         let request2 = try! Request(method: .GET, uri: "/hello/world/")
 
-        XCTAssert(try router.respond(request1).status != .NotFound)
-        XCTAssert(try router.respond(request2).status != .NotFound)
+        XCTAssert(matcher.match(request1) != nil)
+        XCTAssert(matcher.match(request2) != nil)
     }
-    
-    func testTrieRouteMatcherMatchesMethodsProperly() {
-        let router = Router(matcher: TrieRouteMatcher.self) { route in
-            route.get("/hello/world") {_ in return Response(body: "get request") }
-            route.post("/hello/world") {_ in return Response(body: "post request") }
-            route.post("/hello/world123") {_ in return Response(body: "post request 2") }
-        }
+
+    func testMatcherMatchesMethods(matcher: RouteMatcherType.Type) {
+
+        let routes = [
+            Route(methods: [.GET], path: "/hello/world", middleware: [], responder: Responder { _ in return Response(body: "get request") }),
+            Route(methods: [.POST], path: "/hello/world", middleware: [], responder: Responder { _ in return Response(body: "post request") }),
+            Route(methods: [.POST], path: "/hello/world123", middleware: [], responder: Responder { _ in return Response(body: "post request 2") })
+        ]
+
+        let matcher = matcher.init(routes: routes)
 
         let getRequest1 = try! Request(method: .GET, uri: "/hello/world")
         let postRequest1 = try! Request(method: .POST, uri: "/hello/world")

        let postHelloWorld = try! Request(method: .POST, uri: "/hello/world")
        let heyAustralia = try! Request(method: .GET, uri: "/hey/australia")

        XCTAssert(try router.respond(helloWorld).bodyString == "hello world - not!")
        XCTAssert(try router.respond(helloAmerica).bodyString == "hello america")
        XCTAssert(try router.respond(postHelloWorld).bodyString == "hello world")
        XCTAssert(try router.respond(heyAustralia).bodyString == "hey australia")
    }
}

//
//

@testable import TrieRouteMatcher
import XCTest

