Testing ExceptionsTesting for exceptions is easy with Kotest:val exception = shouldThrow<IllegalAccessException> { // code in here that you expect to throw an IllegalAccessException}exception.message should startWith("Something went wrong")Copy