maybe wiremock? it does real HTTP communication but neatly integrated in junit 
(i've not tried to use it with JUnit 5).
https://github.com/tomakehurst/wiremock

stefan

>-----Original Message-----
>From: Nicolas Peltier <peltier.nico...@gmail.com>
>Sent: Tuesday, December 1, 2020 9:53 AM
>To: users@sling.apache.org
>Subject: [mock] best way to mock http(s) endpoint
>
>Hey,
>
>i'd like to "unit" test some code that does http connection & data fetch. I
>guess using an external endpoint is not a good idea, do we have already
>some stuff to mock an http(s) endpoint, or do i need to spin up a pax
>container (with required bundles)?
>
>Nicolas

Reply via email to