ticket:3 added testing if middleware writes HttpRequests to db