In Java, the programmer can specify expected exceptions for JUnit test cases like this:
@Test(expected = ArithmeticException.class) public void omg() { int bl
JUnit5 has kotlin support built in.
import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows class MyTests { @Test fun `division by zero -- should throw ArithmeticException`() { assertThrows { 1 / 0 } } }