I am writing a unit test and I want to throw an HttpException with an error code 409.
This is what I tried but it gives me an error
Using 'parse(String): MediaType?' is an error. moved to extension function
This is a kotlin file and Retrofit 2.6.0, and ResponseBody is okhttp3 - 3.12.12
What I have tried
every(call.execute()).thenThrow(HttpException(
Response.error<Any>(409, ResponseBody.create(
MediaType.parse("plain/text"), ""
))
))
how can i solve this please
thanks R