How to use dependency injection pattern in Elixir?

For example, to write a testable module that make an http request to the server. In test, I need a fake server.