added routing tests and skeleton for the middleware