diff options
Diffstat (limited to 'guava-tests/test/com/google/common/collect/ImmutableSetTest.java')
-rw-r--r-- | guava-tests/test/com/google/common/collect/ImmutableSetTest.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/guava-tests/test/com/google/common/collect/ImmutableSetTest.java b/guava-tests/test/com/google/common/collect/ImmutableSetTest.java index 4f76cc888..e5fb0ecb2 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableSetTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableSetTest.java @@ -17,6 +17,7 @@ package com.google.common.collect; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; @@ -261,11 +262,7 @@ public class ImmutableSetTest extends AbstractImmutableSetTest { assertEquals(1 << 30, ImmutableSet.chooseTableSize((1 << 30) - 1)); // Now we've gone too far - try { - ImmutableSet.chooseTableSize(1 << 30); - fail(); - } catch (IllegalArgumentException expected) { - } + assertThrows(IllegalArgumentException.class, () -> ImmutableSet.chooseTableSize(1 << 30)); } @GwtIncompatible // RegularImmutableSet.table not in emulation |