Fix middleware test assertion.