I tried to do unit test with Hoverfly to mock external API.
companion object {
@ClassRule @JvmField
val hoverflyRule: HoverflyRule = HoverflyRule.inSimulationMode(dsl(
service("people.zoho.com")
.get("/people/api/forms/P_EmployeeView/records").queryParam("authtoken","TOKEN")
.willReturn(success("{test:test}", "application/json"))
))
}
When I use the Apache client with ktor, that doesn't work. But with another client like khttp, it works. Any ideas why?