     }
 }
 
-
 final class TestDatabaseDriver: DatabaseDriver {
     let handler: (DatabaseQuery) -> [DatabaseRow]
     

            ]
        }, as: .test)
        
        app.middleware.use(PostRepositoryMiddleware {
            DatabasePostRepository(database: $0.db(.test))
        })
        
        app.get("foo") { req -> EventLoopFuture<[Post]> in
            req.posts.all()

protocol PostRepository {
    func all() -> EventLoopFuture<[Post]>
}
