diff --git a/core-java-modules/core-java-streams-5/pom.xml b/core-java-modules/core-java-streams-5/pom.xml
index 042186c9bf..6092b1278e 100644
--- a/core-java-modules/core-java-streams-5/pom.xml
+++ b/core-java-modules/core-java-streams-5/pom.xml
@@ -48,7 +48,16 @@
protonpack
1.16
-
+
+ org.apache.commons
+ commons-collections4
+ 4.4
+
+
+ one.util
+ streamex
+ 0.8.1
+
diff --git a/core-java-modules/core-java-streams-5/src/test/java/com/baeldung/streams/firstmatchingelement/FirstMatchingElementUnitTest.java b/core-java-modules/core-java-streams-5/src/test/java/com/baeldung/streams/firstmatchingelement/FirstMatchingElementUnitTest.java
index 3e9cbcdc0b..34e6e62cef 100644
--- a/core-java-modules/core-java-streams-5/src/test/java/com/baeldung/streams/firstmatchingelement/FirstMatchingElementUnitTest.java
+++ b/core-java-modules/core-java-streams-5/src/test/java/com/baeldung/streams/firstmatchingelement/FirstMatchingElementUnitTest.java
@@ -5,42 +5,35 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
-import java.util.Optional;
import java.util.OptionalInt;
import java.util.stream.IntStream;
+import org.apache.commons.collections4.IterableUtils;
import org.assertj.core.util.Lists;
import org.junit.Test;
import com.codepoetics.protonpack.StreamUtils;
+import com.google.common.collect.Iterables;
+
+import io.vavr.collection.Stream;
+import one.util.streamex.EntryStream;
public class FirstMatchingElementUnitTest {
- @Test
- public void testWithForLoop() {
- List