Assertions.assertThrows() code example Example: assertThrows syntax assertThrows(classOf[UnsupportedOperationException], () => ...)