Almost added middleware tests.