I wanna to write some unit tests for the process of http response, for example, for this function
let get_em_positions_resp ~code ~year ~month =
let%bind _, body =
Cohttp_async.Client.get
~headers:(Cohttp.Header.of_list [ (hdr_ua, ua) ])
(generate_em_positions_uri ~code ~year ~month)
in
Cohttp_async.Body.to_string body
When I wrote Java, there’s some cool thing to help. Is there kind of mock tools in OCaml?