correct the test codes for calling single middleware