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