<ClassCastException when using Mockito.thenAnswer>...
# stackoverflow
u
ClassCastException when using Mockito.thenAnswer I am new to Kotlin. I get exception when trying to use Mockito's thenAnswer method Controller: @RestController class SampleRestController( val sampleService: SampleService ) { @PostMapping(value = ["/sample-endpoint"], consumes = [MediaType.APPLICATION_JSON_VALUE], produces = [MediaType.APPLICATION_JSON_VALUE]) fun sampleEndpoint(@RequestBody values: List): ResponseEntity { val response = sampleService.serviceCall(values) return...