SLING-8844 servlet-helpers: Update to Commons Collections 4
diff --git a/pom.xml b/pom.xml
index 78b0b17..589ac0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,9 +79,9 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-            <version>3.2.1</version>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>4.1</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -99,7 +99,7 @@
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
-            <version>2.21.0</version>
+            <version>3.1.0</version>
             <scope>test</scope>
         </dependency>
 
diff --git a/src/main/java/org/apache/sling/servlethelpers/MockHttpSession.java b/src/main/java/org/apache/sling/servlethelpers/MockHttpSession.java
index bcaae1e..395d678 100644
--- a/src/main/java/org/apache/sling/servlethelpers/MockHttpSession.java
+++ b/src/main/java/org/apache/sling/servlethelpers/MockHttpSession.java
@@ -26,7 +26,7 @@
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpSession;
 
-import org.apache.commons.collections.IteratorUtils;
+import org.apache.commons.collections4.IteratorUtils;
 import org.osgi.annotation.versioning.ConsumerType;
 
 /**
@@ -62,7 +62,6 @@
         return this.attributeMap.get(name);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public Enumeration<String> getAttributeNames() {
         checkInvalidatedState();
diff --git a/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java b/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
index 2b8d6f4..67f954f 100644
--- a/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
+++ b/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
@@ -59,7 +59,7 @@
 import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.Part;
 
-import org.apache.commons.collections.IteratorUtils;
+import org.apache.commons.collections4.IteratorUtils;
 import org.apache.commons.lang3.CharEncoding;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.sling.api.SlingHttpServletRequest;
@@ -162,7 +162,6 @@
         return this.attributeMap.get(name);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public Enumeration<String> getAttributeNames() {
         return IteratorUtils.asEnumeration(this.attributeMap.keySet().iterator());
@@ -211,7 +210,6 @@
         return result;
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public Enumeration<String> getParameterNames() {
         return IteratorUtils.asEnumeration(this.parameterMap.keySet().iterator());