First real test classes,unsuccessfull attempt at refactoring the middleware loop inside Method