Gary
11/21/2019, 3:32 AMorg.springframework.web.reactive.function.server.ServerResponse
but it appears equality cannot be used to test them.
e.g. this will fail
@Test
fun `Server Responses should equal each other`() {
val a = ServerResponse.accepted()
val b = ServerResponse.accepted()
a shouldBe b
}
If this is done by design, what is the recommended method?
Currently our workaround is to inspect the inserters value param to validate the body but this seems pretty hacky and brittle
coEvery { BodyInserters.fromValue<Map<String, Any>>(any()) } returns mockk()
runBlocking {
error.toServerResponse()
}
coVerify {
BodyInserters.fromValue(error.responseBody)
}
}