-@testable import Vapor
+import Vapor
 import XCTest
 
 class ApplicationTests: XCTestCase {

    ]
}

extension HTTPBody {
    var string: String {
        guard let data = self.data else {
            return "<streaming>"
        }
        return String(data: data, encoding: .ascii) ?? "<non-ascii>"
    }
}

extension Data {
    var utf8: String? {
        return String(data: self, encoding: .utf8)
    }
}

extension Application {
    static func runningTest(port: Int, configure: (Router) throws -> ()) throws -> Application {
        let router = EngineRouter.default()
        try configure(router)

        try afterSend(res)
    }

    func clientTest(_ method: HTTPMethod, _ path: String, equals: String) throws {
        return try clientTest(method, path) { res in
            XCTAssertEqual(res.http.body.string, equals)
