Marcus Fihlon
01/04/2018, 9:12 AMclass RuntimeExceptionMapperTest : StringSpec() {
init {
val mapper = RuntimeExceptionMapper()
"ConcurrentModificationException should be mapped to CONFLICT (409)" {
val e = ConcurrentModificationException("Test") // throws exception - why?
mapper.toResponse(e).status shouldBe CONFLICT.statusCode
}
}
}
I use Kotlin 1.2.10 with KotlinTest 2.0.7 and have no idea, why the exception is thrown. I just want to create an exception object, not throwing it…kirillrakhman
01/04/2018, 9:31 AM