mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-10 20:15:42 +00:00
Use assertThrows()
This commit is contained in:
parent
6c2e479630
commit
b1571cb080
@ -157,10 +157,7 @@ public abstract class AbstractIteratorTest<E> extends AbstractObjectTest {
|
||||
|
||||
if (!supportsRemove()) {
|
||||
// check for UnsupportedOperationException if not supported
|
||||
try {
|
||||
it.remove();
|
||||
} catch (final UnsupportedOperationException ex) {
|
||||
}
|
||||
assertThrows(UnsupportedOperationException.class, it::remove);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user