Add test to show code does not exhibit the AOOBE thrown by Java 6

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/fileupload/trunk@1459239 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java b/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
index efc9a17..e6885c3 100644
--- a/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
+++ b/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
@@ -110,6 +110,14 @@
         assertIOException("incorrect padding", "Zg=a");
     }
 
+    // This input causes java.lang.ArrayIndexOutOfBoundsException: 1
+    // in the Java 6 method DatatypeConverter.parseBase64Binary(String)
+    // currently reported as truncated (the last chunk consists just of '=')
+    @Test
+    public void badLength() throws Exception {
+        assertIOException("truncated", "Zm8==");
+    }
+
     private static void assertEncoded(String clearText, String encoded) throws Exception {
         byte[] expected = clearText.getBytes(US_ASCII_CHARSET);