ticket:3 added tests and middleware to store requests