This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 074fbefa5dfd69abc817e304204e0a7cd041baa7
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed May 29 16:28:22 2024 -0400

    Simplify test and add missing cases
---
 .../java/org/apache/commons/lang3/function/FunctionsTest.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/function/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/function/FunctionsTest.java
index 368fd00c7..ee1d34667 100644
--- a/src/test/java/org/apache/commons/lang3/function/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/function/FunctionsTest.java
@@ -19,7 +19,10 @@ package org.apache.commons.lang3.function;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Function;
 
 import org.junit.jupiter.api.Test;
@@ -34,9 +37,11 @@ public class FunctionsTest {
      */
     @Test
     public void testApply() {
-        assertEquals("foo-bar", Functions.apply(string -> 
string.concat("-bar"), "foo"));
-        assertEquals("foo-bar", Functions.apply(object -> "foo-bar", null));
+        final AtomicBoolean bool = new AtomicBoolean();
+        assertFalse(Functions.apply(bool::getAndSet, true));
+        assertTrue(bool.get());
         assertNull(Functions.apply(null, "foo"));
+        assertNull(Functions.apply(null, null));
     }
 
     /**

Reply via email to