nhojpatrick commented on a change in pull request #287:
URL: 
https://github.com/apache/commons-collections/pull/287#discussion_r820145813



##########
File path: src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java
##########
@@ -138,18 +135,13 @@ public void testWhileClosure() {
         ClosureUtils.whileClosure(PredicateUtils.uniquePredicate(), 
cmd).execute(null);
         assertEquals(1, cmd.count);
 
-        try {
-            ClosureUtils.whileClosure(null, ClosureUtils.nopClosure());
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            ClosureUtils.whileClosure(FalsePredicate.falsePredicate(), null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            ClosureUtils.whileClosure(null, null);
-            fail();
-        } catch (final NullPointerException ex) {}
+        assertAll(
+                () -> assertThrows(NullPointerException.class, () -> 
ClosureUtils.whileClosure(null, ClosureUtils.nopClosure())),
+

Review comment:
       I had not spotted i was doing that.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to