implemented some tests for http bakery

I generally put helper functions at the end of the file