In Java, the programmer can specify expected exceptions for JUnit test cases like this:
@Test(expected = ArithmeticException.class) public void omg() { int bl
You can use KotlinTest for this.
In your test, you can wrap arbitary code with a shouldThrow block:
shouldThrow { // code in here that you expect to throw a ArithmeticException }