update middleware test