PIG-5074: Build broken when hadoopversion=20 in branch 0.16

git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1773278 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 2c4b975..cab36f9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -169,6 +169,8 @@
 
 BUG FIXES
 
+PIG-5074: Build broken when hadoopversion=20 in branch 0.16 (szita via daijy)
+
 PIG-5064: NPE in TestScriptUDF#testPythonBuiltinModuleImport1 when JAVA_HOME is not set (water via daijy)
 
 PIG-5048: HiveUDTF fail if it is the first expression in projection (nkollar via daijy)
diff --git a/test/org/apache/pig/impl/builtin/TestHiveUDTF.java b/test/org/apache/pig/impl/builtin/TestHiveUDTF.java
index 10648b3..1423950 100644
--- a/test/org/apache/pig/impl/builtin/TestHiveUDTF.java
+++ b/test/org/apache/pig/impl/builtin/TestHiveUDTF.java
@@ -17,7 +17,6 @@
  */
 package org.apache.pig.impl.builtin;
 
-import org.apache.commons.collections4.IteratorUtils;
 import org.apache.pig.ExecType;
 import org.apache.pig.PigServer;
 import org.apache.pig.backend.executionengine.ExecException;
@@ -32,6 +31,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import com.google.common.collect.Lists;
+
 import static org.apache.pig.builtin.mock.Storage.*;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -63,7 +64,7 @@
         pigServer.registerQuery("B = foreach A generate posexplode(a0);");
 
         Iterator<Tuple> result = pigServer.openIterator("B");
-        List<Tuple> out = IteratorUtils.toList(result);
+        List<Tuple> out = Lists.newArrayList(result);
 
         assertEquals(2, out.size());
         assertTrue("Result doesn't contain the HiveUDTF output",
@@ -85,7 +86,7 @@
         pigServer.registerQuery("B = foreach A generate a0, posexplode(a0);");
 
         Iterator<Tuple> result = pigServer.openIterator("B");
-        List<Tuple> out = IteratorUtils.toList(result);
+        List<Tuple> out = Lists.newArrayList(result);
 
         assertEquals(2, out.size());
         assertTrue("Result doesn't contain the HiveUDTF output",
@@ -107,7 +108,7 @@
         pigServer.registerQuery("b = foreach a generate flatten(COUNT2(name));");
 
         Iterator<Tuple> result = pigServer.openIterator("b");
-        List<Tuple> out = IteratorUtils.toList(result);
+        List<Tuple> out = Lists.newArrayList(result);
 
         assertEquals(2, out.size());
         assertEquals(tuple(3), out.get(0));