test http method in unit tests