Added unit test
Added support for faraday 0.9.0 middleware registry api.