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



##########
File path: 
src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java
##########
@@ -67,11 +68,8 @@ public void testBadNoopComparatorChain() {
         final ComparatorChain<Integer> chain = new ComparatorChain<>();
         final Integer i1 = 4;
         final Integer i2 = 6;
-        try {
-            chain.compare(i1, i2);
-            fail("An exception should be thrown when a chain contains zero 
comparators.");
-        } catch (final UnsupportedOperationException e) {
-        }
+
+        assertThrows(UnsupportedOperationException.class, () -> 
chain.compare(i1, i2));

Review comment:
       ditto too




-- 
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: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to