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