Add middleware tests

hmm i think the methods name are inverted (with the above one)