poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1595190 [1/2] - in /poi/trunk/src: ooxml/testcases/org/apache/poi/xslf/usermodel/ ooxml/testcases/org/apache/poi/xssf/usermodel/ ooxml/testcases/org/apache/poi/xwpf/usermodel/ scratchpad/testcases/org/apache/poi/hslf/model/ scratchpad/test...
Date Fri, 16 May 2014 13:25:46 GMT
Author: centic
Date: Fri May 16 13:25:45 2014
New Revision: 1595190

URL: http://svn.apache.org/r1595190
Log:
Apache POI - Use assertArrayEquals() instead of assertTrue(Arrays.equals()), this way we get better information on failure

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPicture.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java
    poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBlipRecord.java
    poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoolErrRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestColumnInfoRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDrawingRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEmbeddedObjectRefSubRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestHyperlinkRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestLbsDataSubRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestObjRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecalcIdRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecordFactoryInputStream.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSubRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/chart/TestChartFormatRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCloneSheet.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestPolygon.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestText.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestArrayPtg.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestAttrPtg.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestReferencePtg.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
    poi/trunk/src/testcases/org/apache/poi/util/TestLittleEndianStreams.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java Fri May 16 13:25:45 2014
@@ -16,11 +16,13 @@
 ==================================================================== */
 package org.apache.poi.xslf.usermodel;
 
-import junit.framework.TestCase;
-import org.apache.poi.xslf.XSLFTestDataSamples;
+import static org.junit.Assert.assertArrayEquals;
 
 import java.awt.Color;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
+
+import org.apache.poi.xslf.XSLFTestDataSamples;
 
 /**
  * @author Yegor Kozlov
@@ -157,7 +159,7 @@ public class TestXSLFSlide extends TestC
 
         XSLFPictureShape sh4 = (XSLFPictureShape)shapes2[1];
         XSLFPictureShape srcPic = (XSLFPictureShape)src.getSlides()[4].getShapes()[1];
-        assertTrue(Arrays.equals(sh4.getPictureData().getData(), srcPic.getPictureData().getData()));
+        assertArrayEquals(sh4.getPictureData().getData(), srcPic.getPictureData().getData());
     }
 
     public void testMergeSlides(){

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java Fri May 16 13:25:45 2014
@@ -16,9 +16,10 @@
 ==================================================================== */
 package org.apache.poi.xssf.usermodel;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.awt.Color;
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.List;
 
 import junit.framework.TestCase;
@@ -223,9 +224,9 @@ public class TestXSSFDrawing extends Tes
         assertEquals(true, rPr.getB());
         assertEquals(true, rPr.getI());
         assertEquals(STTextUnderlineType.SNG, rPr.getU());
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new byte[]{0, (byte)128, (byte)128} ,
-                rPr.getSolidFill().getSrgbClr().getVal()));
+                rPr.getSolidFill().getSrgbClr().getVal());
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
     }
@@ -288,9 +289,9 @@ public class TestXSSFDrawing extends Tes
 
         CTTextCharacterProperties rPr = pr.getRArray(0).getRPr();
         assertEquals("Arial", rPr.getLatin().getTypeface());
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new byte[]{0, (byte)128, (byte)128} ,
-                rPr.getSolidFill().getSrgbClr().getVal()));
+                rPr.getSolidFill().getSrgbClr().getVal());
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
     }
@@ -322,9 +323,9 @@ public class TestXSSFDrawing extends Tes
         assertEquals("Arial", runs.get(0).getFontFamily());
         
         Color clr = runs.get(0).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 0, 255, 255 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
     }
@@ -398,26 +399,26 @@ public class TestXSSFDrawing extends Tes
         assertEquals("Arial", runs.get(0).getFontFamily());
 
         Color clr = runs.get(0).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 0, 255, 255 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });
 
         // second run properties        
         assertEquals("Rich Text", runs.get(1).getText());
         assertEquals(XSSFFont.DEFAULT_FONT_NAME, runs.get(1).getFontFamily());
 
         clr = runs.get(1).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 0, 255, 0 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));        
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });        
         
         // third run properties
         assertEquals(" String", runs.get(2).getText());
         assertEquals("Arial", runs.get(2).getFontFamily());
         clr = runs.get(2).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 0, 255, 255 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
     }    
@@ -547,19 +548,19 @@ public class TestXSSFDrawing extends Tes
         assertEquals(TextAlign.RIGHT, paras.get(2).getTextAlign());
         
         Color clr = paras.get(0).getTextRuns().get(0).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 255, 0, 0 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });
         
         clr = paras.get(1).getTextRuns().get(0).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 0, 255, 0 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });
         
         clr = paras.get(2).getTextRuns().get(0).getFontColor(); 
-        assertTrue(Arrays.equals(
+        assertArrayEquals(
                 new int[] { 0, 0, 255 } ,
-                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() }));
+                new int[] { clr.getRed(), clr.getGreen(), clr.getBlue() });
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
     }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPicture.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPicture.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPicture.java Fri May 16 13:25:45 2014
@@ -17,16 +17,17 @@
 
 package org.apache.poi.xssf.usermodel;
 
-import org.apache.poi.ss.usermodel.ClientAnchor;
+import static org.junit.Assert.assertArrayEquals;
+
+import java.util.List;
+
 import org.apache.poi.ss.usermodel.BaseTestPicture;
+import org.apache.poi.ss.usermodel.ClientAnchor;
 import org.apache.poi.xssf.XSSFITestDataProvider;
 import org.apache.poi.xssf.XSSFTestDataSamples;
 import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTTwoCellAnchor;
 import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.STEditAs;
 
-import java.util.List;
-import java.util.Arrays;
-
 /**
  * @author Yegor Kozlov
  */
@@ -54,7 +55,7 @@ public final class TestXSSFPicture exten
         int jpegIdx = wb.addPicture(jpegData, XSSFWorkbook.PICTURE_TYPE_JPEG);
         assertEquals(1, pictures.size());
         assertEquals("jpeg", pictures.get(jpegIdx).suggestFileExtension());
-        assertTrue(Arrays.equals(jpegData, pictures.get(jpegIdx).getData()));
+        assertArrayEquals(jpegData, pictures.get(jpegIdx).getData());
 
         XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, 1, 1, 10, 30);
         assertEquals(ClientAnchor.MOVE_AND_RESIZE, anchor.getAnchorType());
@@ -64,7 +65,7 @@ public final class TestXSSFPicture exten
         XSSFPicture shape = drawing.createPicture(anchor, jpegIdx);
         assertTrue(anchor.equals(shape.getAnchor()));
         assertNotNull(shape.getPictureData());
-        assertTrue(Arrays.equals(jpegData, shape.getPictureData().getData()));
+        assertArrayEquals(jpegData, shape.getPictureData().getData());
 
         CTTwoCellAnchor ctShapeHolder = drawing.getCTDrawing().getTwoCellAnchorArray(0);
         // STEditAs.ABSOLUTE corresponds to ClientAnchor.DONT_MOVE_AND_RESIZE
@@ -128,16 +129,16 @@ public final class TestXSSFPicture exten
         sheet1 = wb.getSheetAt(0);
         drawing1 = sheet1.createDrawingPatriarch();
         XSSFPicture shape11 = (XSSFPicture)drawing1.getShapes().get(0);
-        assertTrue(Arrays.equals(shape1.getPictureData().getData(), shape11.getPictureData().getData()));
+        assertArrayEquals(shape1.getPictureData().getData(), shape11.getPictureData().getData());
         XSSFPicture shape22 = (XSSFPicture)drawing1.getShapes().get(1);
-        assertTrue(Arrays.equals(shape2.getPictureData().getData(), shape22.getPictureData().getData()));
+        assertArrayEquals(shape2.getPictureData().getData(), shape22.getPictureData().getData());
 
         sheet2 = wb.getSheetAt(1);
         drawing2 = sheet2.createDrawingPatriarch();
         XSSFPicture shape33 = (XSSFPicture)drawing2.getShapes().get(0);
-        assertTrue(Arrays.equals(shape3.getPictureData().getData(), shape33.getPictureData().getData()));
+        assertArrayEquals(shape3.getPictureData().getData(), shape33.getPictureData().getData());
         XSSFPicture shape44 = (XSSFPicture)drawing2.getShapes().get(1);
-        assertTrue(Arrays.equals(shape4.getPictureData().getData(), shape44.getPictureData().getData()));
+        assertArrayEquals(shape4.getPictureData().getData(), shape44.getPictureData().getData());
 
     }
 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java Fri May 16 13:25:45 2014
@@ -20,7 +20,6 @@ package org.apache.poi.xwpf.usermodel;
 import static org.junit.Assert.assertArrayEquals;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.List;
 
 import junit.framework.TestCase;
@@ -54,7 +53,7 @@ public class TestXWPFPictureData extends
         assertEquals(num + 1,pictures.size());
         XWPFPictureData pict = (XWPFPictureData) sampleDoc.getRelationById(relationId);
         assertEquals("jpeg",pict.suggestFileExtension());
-        assertTrue(Arrays.equals(pictureData,pict.getData()));
+        assertArrayEquals(pictureData,pict.getData());
     }
 
     public void testPictureInHeader() throws IOException
@@ -103,7 +102,7 @@ public class TestXWPFPictureData extends
         assertEquals(1,pictures.size());
         XWPFPictureData jpgPicData = (XWPFPictureData) doc.getRelationById(relationId);
         assertEquals("jpeg",jpgPicData.suggestFileExtension());
-        assertTrue(Arrays.equals(jpegData,jpgPicData.getData()));
+        assertArrayEquals(jpegData,jpgPicData.getData());
 
         // Ensure it now has one
         assertEquals(14,doc.getPackagePart().getRelationships().size());
@@ -120,6 +119,7 @@ public class TestXWPFPictureData extends
         assertNotNull("JPEG Relationship not found",jpegRel);
 
         // Check the details
+        assertNotNull(jpegRel);
         assertEquals(XWPFRelation.IMAGE_JPEG.getRelation(),jpegRel.getRelationshipType());
         assertEquals("/word/document.xml",jpegRel.getSource().getPartName().toString());
         assertEquals("/word/media/image1.jpeg",jpegRel.getTargetURI().getPath());

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java Fri May 16 13:25:45 2014
@@ -17,12 +17,13 @@
 
 package org.apache.poi.hslf.model;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.awt.geom.Rectangle2D;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.InputStream;
-import java.util.Arrays;
 
 import junit.framework.TestCase;
 
@@ -136,7 +137,7 @@ public final class TestOleEmbedding exte
     	poiData1.writeFilesystem(bos);
     	byte expData[] = bos.toByteArray();
     	
-    	assertTrue(Arrays.equals(expData, compData));
+    	assertArrayEquals(expData, compData);
     	
     }
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link HeadersFootersAtom} works properly
@@ -65,7 +67,7 @@ public final class TestAnimationInfoAtom
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 
     public void testNewRecord() throws Exception {
@@ -80,6 +82,6 @@ public final class TestAnimationInfoAtom
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link org.apache.poi.hslf.record.ExControl} works properly
@@ -93,7 +95,7 @@ public final class TestExControl extends
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 
 	public void testNewRecord() throws Exception {
@@ -118,6 +120,6 @@ public final class TestExControl extends
 		byte[] b = baos.toByteArray();
 
 		assertEquals(data.length, b.length);
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link org.apache.poi.hslf.record.HeadersFootersAtom} works properly
@@ -49,7 +51,7 @@ public final class TestExMediaAtom exten
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 
 	public void testNewRecord() throws Exception {
@@ -66,7 +68,7 @@ public final class TestExMediaAtom exten
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 
 	public void testFlags() {

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java Fri May 16 13:25:45 2014
@@ -17,9 +17,11 @@
 
 package org.apache.poi.hslf.record;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link ExOleObjAtom} works properly
@@ -51,7 +53,7 @@ public final class TestExOleObjAtom exte
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 
 	public void testNewRecord() throws Exception {
@@ -67,6 +69,6 @@ public final class TestExOleObjAtom exte
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java Fri May 16 13:25:45 2014
@@ -18,14 +18,16 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
-import java.util.Arrays;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
 
-import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.apache.poi.poifs.filesystem.DocumentEntry;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 
 /**
  * Tests that {@link ExOleObjStg} works properly
@@ -105,7 +107,7 @@ public final class TestExOleObjStg exten
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 
     public void testNewRecord() throws Exception {
@@ -123,7 +125,7 @@ public final class TestExOleObjStg exten
         byte[] b = out.toByteArray();
 
         assertEquals(data.length, b.length);
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 
     private byte[] readAll(InputStream is) throws IOException {

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link HeadersFootersAtom} works properly
@@ -70,7 +72,7 @@ public final class TestExVideoContainer 
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 
     public void testNewRecord() throws Exception {
@@ -82,6 +84,6 @@ public final class TestExVideoContainer 
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java Fri May 16 13:25:45 2014
@@ -17,10 +17,11 @@
 
 package org.apache.poi.hslf.record;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
 
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests <code>FontCollection</code> and <code>FontEntityAtom</code> records
@@ -76,6 +77,6 @@ public final class TestFontCollection ex
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         fonts.writeOut(out);
         byte[] recdata = out.toByteArray();
-        assertTrue(Arrays.equals(recdata, data));
+        assertArrayEquals(recdata, data);
     }
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link HeadersFootersAtom} works properly
@@ -54,7 +56,7 @@ public final class TestHeadersFootersAto
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(data, b));
+		assertArrayEquals(data, b);
 	}
 
     public void testNewRecord() throws Exception {
@@ -67,7 +69,7 @@ public final class TestHeadersFootersAto
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(data, b));
+        assertArrayEquals(data, b);
     }
 
     public void testFlags() {

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hslf.record;
 
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
 
 /**
  * Tests that {@link HeadersFootersContainer} works properly
@@ -75,7 +77,7 @@ public final class TestHeadersFootersCon
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(slideData, b));
+		assertArrayEquals(slideData, b);
 	}
 
     public void testNewSlideHeadersFootersContainer() throws Exception {
@@ -100,7 +102,7 @@ public final class TestHeadersFootersCon
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(slideData, b));
+        assertArrayEquals(slideData, b);
     }
 
     public void testReadNotesHeadersFootersContainer() {
@@ -129,7 +131,7 @@ public final class TestHeadersFootersCon
 		record.writeOut(baos);
 		byte[] b = baos.toByteArray();
 
-		assertTrue(Arrays.equals(notesData, b));
+		assertArrayEquals(notesData, b);
 	}
 
     public void testNewNotesHeadersFootersContainer() throws Exception {
@@ -162,7 +164,7 @@ public final class TestHeadersFootersCon
         record.writeOut(baos);
         byte[] b = baos.toByteArray();
 
-        assertTrue(Arrays.equals(notesData, b));
+        assertArrayEquals(notesData, b);
     }
 
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java Fri May 16 13:25:45 2014
@@ -17,13 +17,12 @@
 
 package org.apache.poi.hslf.record;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
-import org.apache.poi.hslf.usermodel.SlideShow;
 import org.apache.poi.POIDataSamples;
+import org.apache.poi.hslf.usermodel.SlideShow;
 
 /**
  * Tests Sound-related records: SoundCollection(2020), Sound(2022) and
@@ -70,6 +69,6 @@ public final class TestSound extends Tes
 		assertNotNull(sound.getSoundData());
 
 		byte[] ref_data = slTests.readFile("ringin.wav");
-		assertTrue(Arrays.equals(ref_data, sound.getSoundData()));
+		assertArrayEquals(ref_data, sound.getSoundData());
 	}
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java Fri May 16 13:25:45 2014
@@ -17,9 +17,10 @@
 
 package org.apache.poi.hslf.record;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.LinkedList;
 
 import junit.framework.TestCase;
@@ -187,20 +188,20 @@ public final class TestStyleTextPropAtom
         stpb.setParentTextSize(data_b_text_len);
 
         // 54 chars, 21 + 17 + 16
-        LinkedList a_ch_l = stpa.getCharacterStyles();
-        TextPropCollection a_ch_1 = (TextPropCollection)a_ch_l.get(0);
-        TextPropCollection a_ch_2 = (TextPropCollection)a_ch_l.get(1);
-        TextPropCollection a_ch_3 = (TextPropCollection)a_ch_l.get(2);
+        LinkedList<TextPropCollection> a_ch_l = stpa.getCharacterStyles();
+        TextPropCollection a_ch_1 = a_ch_l.get(0);
+        TextPropCollection a_ch_2 = a_ch_l.get(1);
+        TextPropCollection a_ch_3 = a_ch_l.get(2);
         assertEquals(21, a_ch_1.getCharactersCovered());
         assertEquals(17, a_ch_2.getCharactersCovered());
         assertEquals(16, a_ch_3.getCharactersCovered());
 
         // 179 chars, 30 + 28 + 25
-        LinkedList b_ch_l = stpb.getCharacterStyles();
-        TextPropCollection b_ch_1 = (TextPropCollection)b_ch_l.get(0);
-        TextPropCollection b_ch_2 = (TextPropCollection)b_ch_l.get(1);
-        TextPropCollection b_ch_3 = (TextPropCollection)b_ch_l.get(2);
-        TextPropCollection b_ch_4 = (TextPropCollection)b_ch_l.get(3);
+        LinkedList<TextPropCollection> b_ch_l = stpb.getCharacterStyles();
+        TextPropCollection b_ch_1 = b_ch_l.get(0);
+        TextPropCollection b_ch_2 = b_ch_l.get(1);
+        TextPropCollection b_ch_3 = b_ch_l.get(2);
+        TextPropCollection b_ch_4 = b_ch_l.get(3);
         assertEquals(30, b_ch_1.getCharactersCovered());
         assertEquals(28, b_ch_2.getCharactersCovered());
         assertEquals(25, b_ch_3.getCharactersCovered());
@@ -212,25 +213,25 @@ public final class TestStyleTextPropAtom
         StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
         stpb.setParentTextSize(data_b_text_len);
 
-        LinkedList b_ch_l = stpb.getCharacterStyles();
-        TextPropCollection b_ch_1 = (TextPropCollection)b_ch_l.get(0);
-        TextPropCollection b_ch_2 = (TextPropCollection)b_ch_l.get(1);
-        TextPropCollection b_ch_3 = (TextPropCollection)b_ch_l.get(2);
-        TextPropCollection b_ch_4 = (TextPropCollection)b_ch_l.get(3);
+        LinkedList<TextPropCollection> b_ch_l = stpb.getCharacterStyles();
+        TextPropCollection b_ch_1 = b_ch_l.get(0);
+        TextPropCollection b_ch_2 = b_ch_l.get(1);
+        TextPropCollection b_ch_3 = b_ch_l.get(2);
+        TextPropCollection b_ch_4 = b_ch_l.get(3);
 
         // In first set, we get a CharFlagsTextProp and a font.size
         assertEquals(2,b_ch_1.getTextPropList().size());
-        TextProp tp_1_1 = (TextProp)b_ch_1.getTextPropList().get(0);
-        TextProp tp_1_2 = (TextProp)b_ch_1.getTextPropList().get(1);
+        TextProp tp_1_1 = b_ch_1.getTextPropList().get(0);
+        TextProp tp_1_2 = b_ch_1.getTextPropList().get(1);
         assertEquals(true, tp_1_1 instanceof CharFlagsTextProp);
         assertEquals("font.size", tp_1_2.getName());
         assertEquals(20, tp_1_2.getValue());
 
         // In second set, we get a CharFlagsTextProp and a font.size and a font.color
         assertEquals(3,b_ch_2.getTextPropList().size());
-        TextProp tp_2_1 = (TextProp)b_ch_2.getTextPropList().get(0);
-        TextProp tp_2_2 = (TextProp)b_ch_2.getTextPropList().get(1);
-        TextProp tp_2_3 = (TextProp)b_ch_2.getTextPropList().get(2);
+        TextProp tp_2_1 = b_ch_2.getTextPropList().get(0);
+        TextProp tp_2_2 = b_ch_2.getTextPropList().get(1);
+        TextProp tp_2_3 = b_ch_2.getTextPropList().get(2);
         assertEquals(true, tp_2_1 instanceof CharFlagsTextProp);
         assertEquals("font.size", tp_2_2.getName());
         assertEquals("font.color", tp_2_3.getName());
@@ -238,17 +239,17 @@ public final class TestStyleTextPropAtom
 
         // In third set, it's just a font.size and a font.color
         assertEquals(2,b_ch_3.getTextPropList().size());
-        TextProp tp_3_1 = (TextProp)b_ch_3.getTextPropList().get(0);
-        TextProp tp_3_2 = (TextProp)b_ch_3.getTextPropList().get(1);
+        TextProp tp_3_1 = b_ch_3.getTextPropList().get(0);
+        TextProp tp_3_2 = b_ch_3.getTextPropList().get(1);
         assertEquals("font.size", tp_3_1.getName());
         assertEquals("font.color", tp_3_2.getName());
         assertEquals(20, tp_3_1.getValue());
 
         // In fourth set, we get a CharFlagsTextProp and a font.index and a font.size
         assertEquals(3,b_ch_4.getTextPropList().size());
-        TextProp tp_4_1 = (TextProp)b_ch_4.getTextPropList().get(0);
-        TextProp tp_4_2 = (TextProp)b_ch_4.getTextPropList().get(1);
-        TextProp tp_4_3 = (TextProp)b_ch_4.getTextPropList().get(2);
+        TextProp tp_4_1 = b_ch_4.getTextPropList().get(0);
+        TextProp tp_4_2 = b_ch_4.getTextPropList().get(1);
+        TextProp tp_4_3 = b_ch_4.getTextPropList().get(2);
         assertEquals(true, tp_4_1 instanceof CharFlagsTextProp);
         assertEquals("font.index", tp_4_2.getName());
         assertEquals("font.size", tp_4_3.getName());
@@ -259,16 +260,16 @@ public final class TestStyleTextPropAtom
         StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
         stpb.setParentTextSize(data_b_text_len);
 
-        LinkedList b_p_l = stpb.getParagraphStyles();
-        TextPropCollection b_p_1 = (TextPropCollection)b_p_l.get(0);
-        TextPropCollection b_p_2 = (TextPropCollection)b_p_l.get(1);
-        TextPropCollection b_p_3 = (TextPropCollection)b_p_l.get(2);
-        TextPropCollection b_p_4 = (TextPropCollection)b_p_l.get(3);
+        LinkedList<TextPropCollection> b_p_l = stpb.getParagraphStyles();
+        TextPropCollection b_p_1 = b_p_l.get(0);
+        TextPropCollection b_p_2 = b_p_l.get(1);
+        TextPropCollection b_p_3 = b_p_l.get(2);
+        TextPropCollection b_p_4 = b_p_l.get(3);
 
         // 1st is left aligned + normal line spacing
         assertEquals(2,b_p_1.getTextPropList().size());
-        TextProp tp_1_1 = (TextProp)b_p_1.getTextPropList().get(0);
-        TextProp tp_1_2 = (TextProp)b_p_1.getTextPropList().get(1);
+        TextProp tp_1_1 = b_p_1.getTextPropList().get(0);
+        TextProp tp_1_2 = b_p_1.getTextPropList().get(1);
         assertEquals("alignment", tp_1_1.getName());
         assertEquals("linespacing", tp_1_2.getName());
         assertEquals(0, tp_1_1.getValue());
@@ -276,14 +277,14 @@ public final class TestStyleTextPropAtom
 
         // 2nd is centre aligned (default) + normal line spacing
         assertEquals(1,b_p_2.getTextPropList().size());
-        TextProp tp_2_1 = (TextProp)b_p_2.getTextPropList().get(0);
+        TextProp tp_2_1 = b_p_2.getTextPropList().get(0);
         assertEquals("linespacing", tp_2_1.getName());
         assertEquals(80, tp_2_1.getValue());
 
         // 3rd is right aligned + normal line spacing
         assertEquals(2,b_p_3.getTextPropList().size());
-        TextProp tp_3_1 = (TextProp)b_p_3.getTextPropList().get(0);
-        TextProp tp_3_2 = (TextProp)b_p_3.getTextPropList().get(1);
+        TextProp tp_3_1 = b_p_3.getTextPropList().get(0);
+        TextProp tp_3_2 = b_p_3.getTextPropList().get(1);
         assertEquals("alignment", tp_3_1.getName());
         assertEquals("linespacing", tp_3_2.getName());
         assertEquals(2, tp_3_1.getValue());
@@ -291,8 +292,8 @@ public final class TestStyleTextPropAtom
 
         // 4st is left aligned + normal line spacing (despite differing font)
         assertEquals(2,b_p_4.getTextPropList().size());
-        TextProp tp_4_1 = (TextProp)b_p_4.getTextPropList().get(0);
-        TextProp tp_4_2 = (TextProp)b_p_4.getTextPropList().get(1);
+        TextProp tp_4_1 = b_p_4.getTextPropList().get(0);
+        TextProp tp_4_2 = b_p_4.getTextPropList().get(1);
         assertEquals("alignment", tp_4_1.getName());
         assertEquals("linespacing", tp_4_2.getName());
         assertEquals(0, tp_4_1.getValue());
@@ -303,11 +304,11 @@ public final class TestStyleTextPropAtom
         StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
         stpb.setParentTextSize(data_b_text_len);
 
-        LinkedList b_ch_l = stpb.getCharacterStyles();
-        TextPropCollection b_ch_1 = (TextPropCollection)b_ch_l.get(0);
-        TextPropCollection b_ch_2 = (TextPropCollection)b_ch_l.get(1);
-        TextPropCollection b_ch_3 = (TextPropCollection)b_ch_l.get(2);
-        TextPropCollection b_ch_4 = (TextPropCollection)b_ch_l.get(3);
+        LinkedList<TextPropCollection> b_ch_l = stpb.getCharacterStyles();
+        TextPropCollection b_ch_1 = b_ch_l.get(0);
+        TextPropCollection b_ch_2 = b_ch_l.get(1);
+        TextPropCollection b_ch_3 = b_ch_l.get(2);
+        TextPropCollection b_ch_4 = b_ch_l.get(3);
 
         // 1st is bold
         CharFlagsTextProp cf_1_1 = (CharFlagsTextProp)b_ch_1.getTextPropList().get(0);
@@ -374,17 +375,17 @@ public final class TestStyleTextPropAtom
         StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
         stpb.setParentTextSize(data_b_text_len);
 
-        LinkedList b_p_l = stpb.getParagraphStyles();
-        TextPropCollection b_p_1 = (TextPropCollection)b_p_l.get(0);
-        TextPropCollection b_p_2 = (TextPropCollection)b_p_l.get(1);
-        TextPropCollection b_p_3 = (TextPropCollection)b_p_l.get(2);
-        TextPropCollection b_p_4 = (TextPropCollection)b_p_l.get(3);
-
-        LinkedList b_ch_l = stpb.getCharacterStyles();
-        TextPropCollection b_ch_1 = (TextPropCollection)b_ch_l.get(0);
-        TextPropCollection b_ch_2 = (TextPropCollection)b_ch_l.get(1);
-        TextPropCollection b_ch_3 = (TextPropCollection)b_ch_l.get(2);
-        TextPropCollection b_ch_4 = (TextPropCollection)b_ch_l.get(3);
+        LinkedList<TextPropCollection> b_p_l = stpb.getParagraphStyles();
+        TextPropCollection b_p_1 = b_p_l.get(0);
+        TextPropCollection b_p_2 = b_p_l.get(1);
+        TextPropCollection b_p_3 = b_p_l.get(2);
+        TextPropCollection b_p_4 = b_p_l.get(3);
+
+        LinkedList<TextPropCollection> b_ch_l = stpb.getCharacterStyles();
+        TextPropCollection b_ch_1 = b_ch_l.get(0);
+        TextPropCollection b_ch_2 = b_ch_l.get(1);
+        TextPropCollection b_ch_3 = b_ch_l.get(2);
+        TextPropCollection b_ch_4 = b_ch_l.get(3);
 
         // CharFlagsTextProp: 3 doesn't have, 4 does
         assertNull(b_ch_3.findByName("char_flags"));
@@ -430,10 +431,10 @@ public final class TestStyleTextPropAtom
 
         // Don't need to touch the paragraph styles
         // Add two more character styles
-        LinkedList cs = stpa.getCharacterStyles();
+        LinkedList<TextPropCollection> cs = stpa.getCharacterStyles();
 
         // First char style is boring, and 21 long
-        TextPropCollection tpca = (TextPropCollection)cs.get(0);
+        TextPropCollection tpca = cs.get(0);
         tpca.updateTextSize(21);
 
         // Second char style is coloured, 00 00 00 05, and 17 long
@@ -467,10 +468,10 @@ public final class TestStyleTextPropAtom
 
 
         // Need 4 paragraph styles
-        LinkedList ps = stpa.getParagraphStyles();
+        LinkedList<TextPropCollection> ps = stpa.getParagraphStyles();
 
         // First is 30 long, left aligned, normal spacing
-        TextPropCollection tppa = (TextPropCollection)ps.get(0);
+        TextPropCollection tppa = ps.get(0);
         tppa.updateTextSize(30);
 
         TextProp tp = tppa.addWithName("alignment");
@@ -502,10 +503,10 @@ public final class TestStyleTextPropAtom
 
 
         // Now do 4 character styles
-        LinkedList cs = stpa.getCharacterStyles();
+        LinkedList<TextPropCollection> cs = stpa.getCharacterStyles();
 
         // First is 30 long, bold and font size
-        TextPropCollection tpca = (TextPropCollection)cs.get(0);
+        TextPropCollection tpca = cs.get(0);
         tpca.updateTextSize(30);
 
         tp = tpca.addWithName("font.size");
@@ -567,16 +568,16 @@ public final class TestStyleTextPropAtom
         // Compare in detail to b
         StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
         stpb.setParentTextSize(data_b_text_len);
-        LinkedList psb = stpb.getParagraphStyles();
-        LinkedList csb = stpb.getCharacterStyles();
+        LinkedList<TextPropCollection> psb = stpb.getParagraphStyles();
+        LinkedList<TextPropCollection> csb = stpb.getCharacterStyles();
 
         assertEquals(psb.size(), ps.size());
         assertEquals(csb.size(), cs.size());
 
         // Ensure Paragraph Character styles match
         for(int z=0; z<2; z++) {
-            LinkedList lla = cs;
-            LinkedList llb = csb;
+            LinkedList<TextPropCollection> lla = cs;
+            LinkedList<TextPropCollection> llb = csb;
             int upto = 5;
             if(z == 1) {
                 lla = ps;
@@ -585,15 +586,15 @@ public final class TestStyleTextPropAtom
             }
 
             for(int i=0; i<upto; i++) {
-                TextPropCollection ca = (TextPropCollection)lla.get(i);
-                TextPropCollection cb = (TextPropCollection)llb.get(i);
+                TextPropCollection ca = lla.get(i);
+                TextPropCollection cb = llb.get(i);
 
                 assertEquals(ca.getCharactersCovered(), cb.getCharactersCovered());
                 assertEquals(ca.getTextPropList().size(), cb.getTextPropList().size());
 
                 for(int j=0; j<ca.getTextPropList().size(); j++) {
-                    TextProp tpa = (TextProp)ca.getTextPropList().get(j);
-                    TextProp tpb = (TextProp)cb.getTextPropList().get(j);
+                    TextProp tpa = ca.getTextPropList().get(j);
+                    TextProp tpb = cb.getTextPropList().get(j);
                     //System.out.println("TP " + i + " " + j + " " + tpa.getName() + "\t" + tpa.getValue() );
                     assertEquals(tpa.getName(), tpb.getName());
                     assertEquals(tpa.getMask(), tpb.getMask());
@@ -670,7 +671,7 @@ public final class TestStyleTextPropAtom
 
         assertEquals(data.length, bytes.length);
         try {
-            assertTrue(Arrays.equals(data, bytes));
+            assertArrayEquals(data, bytes);
         } catch (Throwable e){
             //print hex dump if failed
             assertEquals(HexDump.toHex(data), HexDump.toHex(bytes));
@@ -694,12 +695,12 @@ public final class TestStyleTextPropAtom
         StyleTextPropAtom atom = new StyleTextPropAtom(data_d, 0, data_d.length);
         atom.setParentTextSize(data_d_text_len);
 
-        TextPropCollection prprops = (TextPropCollection)atom.getParagraphStyles().getFirst();
+        TextPropCollection prprops = atom.getParagraphStyles().getFirst();
         assertEquals(data_d_text_len+1, prprops.getCharactersCovered());
         assertEquals(1, prprops.getTextPropList().size()); //1 property found
         assertEquals(1, prprops.findByName("alignment").getValue());
 
-        TextPropCollection chprops = (TextPropCollection)atom.getCharacterStyles().getFirst();
+        TextPropCollection chprops = atom.getCharacterStyles().getFirst();
         assertEquals(data_d_text_len+1, chprops.getCharactersCovered());
         assertEquals(5, chprops.getTextPropList().size()); //5 properties found
         assertEquals(1, chprops.findByName("char_flags").getValue());

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java Fri May 16 13:25:45 2014
@@ -17,8 +17,9 @@
 
 package org.apache.poi.hslf.record;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
 
 import junit.framework.TestCase;
 
@@ -51,10 +52,10 @@ public final class TestTextRulerAtom ext
 		assertNull(tabStops);
 
 		int[] textOffsets = ruler.getTextOffsets();
-		assertTrue(Arrays.equals(new int[]{226, 451, 903, 1129, 1526}, textOffsets));
+		assertArrayEquals(new int[]{226, 451, 903, 1129, 1526}, textOffsets);
 
 		int[] bulletOffsets = ruler.getBulletOffsets();
-		assertTrue(Arrays.equals(new int[]{117, 345, 794, 1016, 1526}, bulletOffsets));
+		assertArrayEquals(new int[]{117, 345, 794, 1016, 1526}, bulletOffsets);
 
 	}
 
@@ -64,7 +65,7 @@ public final class TestTextRulerAtom ext
 		ruler.writeOut(out);
 
 		byte[] result = out.toByteArray();
-		assertTrue(Arrays.equals(result, data_1));
+		assertArrayEquals(result, data_1);
 	}
 
 	public void testRead2() throws Exception {
@@ -74,6 +75,6 @@ public final class TestTextRulerAtom ext
 		ruler.writeOut(out);
 
 		byte[] result = out.toByteArray();
-		assertTrue(Arrays.equals(result, data_2));
+		assertArrayEquals(result, data_2);
 	}
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java Fri May 16 13:25:45 2014
@@ -17,8 +17,9 @@
 
 package org.apache.poi.hslf.record;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
 
 import junit.framework.TestCase;
 
@@ -58,7 +59,7 @@ public final class TestTextSpecInfoAtom 
         spec.writeOut(out);
 
         byte[] result = out.toByteArray();
-        assertTrue(Arrays.equals(result, data_1));
+        assertArrayEquals(result, data_1);
 	}
 
     public void testReset() throws Exception {

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java Fri May 16 13:25:45 2014
@@ -17,15 +17,25 @@
 
 package org.apache.poi.hslf.usermodel;
 
-import org.apache.poi.hslf.*;
-import org.apache.poi.hslf.blip.*;
-import org.apache.poi.hslf.model.*;
-import org.apache.poi.POIDataSamples;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
 
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.net.URL;
-import java.util.Arrays;
+
+import junit.framework.TestCase;
+
+import org.apache.poi.POIDataSamples;
+import org.apache.poi.hslf.HSLFSlideShow;
+import org.apache.poi.hslf.blip.DIB;
+import org.apache.poi.hslf.blip.EMF;
+import org.apache.poi.hslf.blip.JPEG;
+import org.apache.poi.hslf.blip.PICT;
+import org.apache.poi.hslf.blip.PNG;
+import org.apache.poi.hslf.blip.WMF;
+import org.apache.poi.hslf.model.Picture;
+import org.apache.poi.hslf.model.Shape;
+import org.apache.poi.hslf.model.Slide;
 
 /**
  * Test adding/reading pictures
@@ -79,7 +89,7 @@ public final class TestPictures extends 
         System.arraycopy(src_bytes, 512, b1, 0, b1.length);
         byte[] b2 = new byte[ppt_bytes.length-512];
         System.arraycopy(ppt_bytes, 512, b2, 0, b2.length);
-        assertTrue(Arrays.equals(b1, b2));
+        assertArrayEquals(b1, b2);
     }
 
     /**
@@ -124,7 +134,7 @@ public final class TestPictures extends 
         System.arraycopy(src_bytes, 22, b1, 0, b1.length);
         byte[] b2 = new byte[ppt_bytes.length-22];
         System.arraycopy(ppt_bytes, 22, b2, 0, b2.length);
-        assertTrue(Arrays.equals(b1, b2));
+        assertArrayEquals(b1, b2);
     }
 
     /**
@@ -164,7 +174,7 @@ public final class TestPictures extends 
         assertTrue(pictures[0] instanceof EMF);
         //compare the content of the initial file with what is stored in the PictureData
         byte[] ppt_bytes = pictures[0].getData();
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
     }
 
     /**
@@ -203,7 +213,7 @@ public final class TestPictures extends 
         assertTrue(pictures[0] instanceof PNG);
         //compare the content of the initial file with what is stored in the PictureData
         byte[] ppt_bytes = pictures[0].getData();
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
     }
 
     /**
@@ -243,7 +253,7 @@ public final class TestPictures extends 
         assertTrue(pictures[0] instanceof JPEG);
         //compare the content of the initial file with what is stored in the PictureData
         byte[] ppt_bytes = pictures[0].getData();
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
     }
 
     /**
@@ -282,7 +292,7 @@ public final class TestPictures extends 
         assertTrue(pictures[0] instanceof DIB);
         //compare the content of the initial file with what is stored in the PictureData
         byte[] ppt_bytes = pictures[0].getData();
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
     }
 
     /**
@@ -305,7 +315,7 @@ public final class TestPictures extends 
         assertEquals(Picture.JPEG, pdata.getType());
         src_bytes = pdata.getData();
         ppt_bytes = slTests.readFile("clock.jpg");
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
 
         pict = (Picture)slides[1].getShapes()[0]; //the second slide contains PNG
         pdata = pict.getPictureData();
@@ -313,7 +323,7 @@ public final class TestPictures extends 
         assertEquals(Picture.PNG, pdata.getType());
         src_bytes = pdata.getData();
         ppt_bytes = slTests.readFile("tomcat.png");
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
 
         pict = (Picture)slides[2].getShapes()[0]; //the third slide contains WMF
         pdata = pict.getPictureData();
@@ -327,7 +337,7 @@ public final class TestPictures extends 
         System.arraycopy(src_bytes, 22, b1, 0, b1.length);
         b2 = new byte[ppt_bytes.length-22];
         System.arraycopy(ppt_bytes, 22, b2, 0, b2.length);
-        assertTrue(Arrays.equals(b1, b2));
+        assertArrayEquals(b1, b2);
 
         pict = (Picture)slides[3].getShapes()[0]; //the forth slide contains PICT
         pdata = pict.getPictureData();
@@ -341,7 +351,7 @@ public final class TestPictures extends 
         System.arraycopy(src_bytes, 512, b1, 0, b1.length);
         b2 = new byte[ppt_bytes.length-512];
         System.arraycopy(ppt_bytes, 512, b2, 0, b2.length);
-        assertTrue(Arrays.equals(b1, b2));
+        assertArrayEquals(b1, b2);
 
         pict = (Picture)slides[4].getShapes()[0]; //the fifth slide contains EMF
         pdata = pict.getPictureData();
@@ -349,7 +359,7 @@ public final class TestPictures extends 
         assertEquals(Picture.EMF, pdata.getType());
         src_bytes = pdata.getData();
         ppt_bytes = slTests.readFile("wrench.emf");
-        assertTrue(Arrays.equals(src_bytes, ppt_bytes));
+        assertArrayEquals(src_bytes, ppt_bytes);
 
     }
 

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java Fri May 16 13:25:45 2014
@@ -17,9 +17,9 @@
 
 package org.apache.poi.hslf.usermodel;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.TestCase;
+
 import org.apache.poi.POIDataSamples;
 
 /**
@@ -42,6 +42,6 @@ public final class TestSoundData extends
         SoundData[] sound = ppt.getSoundData();
         assertEquals("Expected 1 sound", 1, sound.length);
 
-        assertTrue(Arrays.equals(ref_data, sound[0].getData()));
+        assertArrayEquals(ref_data, sound[0].getData());
     }
 }

Modified: poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBlipRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBlipRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBlipRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBlipRecord.java Fri May 16 13:25:45 2014
@@ -17,12 +17,14 @@
 
 package org.apache.poi.ddf;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
-import java.util.Arrays;
 
 import junit.framework.TestCase;
+
 import org.apache.poi.POIDataSamples;
 
 /**
@@ -44,20 +46,20 @@ public final class TestEscherBlipRecord 
         EscherBSERecord bse1 = (EscherBSERecord)bstore.getChild(0);
         assertEquals(EscherBSERecord.BT_PNG, bse1.getBlipTypeWin32());
         assertEquals(EscherBSERecord.BT_PNG, bse1.getBlipTypeMacOS());
-        assertTrue(Arrays.equals(new byte[]{
+        assertArrayEquals(new byte[]{
             0x65, 0x07, 0x4A, (byte)0x8D, 0x3E, 0x42, (byte)0x8B, (byte)0xAC,
             0x1D, (byte)0x89, 0x35, 0x4F, 0x48, (byte)0xFA, 0x37, (byte)0xC2
-        }, bse1.getUid()));
+        }, bse1.getUid());
         assertEquals(255, bse1.getTag());
         assertEquals(32308, bse1.getSize());
 
         EscherBitmapBlip blip1 = (EscherBitmapBlip)bse1.getBlipRecord();
         assertEquals(0x6E00, blip1.getOptions());
         assertEquals(EscherBitmapBlip.RECORD_ID_PNG, blip1.getRecordId());
-        assertTrue(Arrays.equals(new byte[]{
+        assertArrayEquals(new byte[]{
             0x65, 0x07, 0x4A, (byte)0x8D, 0x3E, 0x42, (byte)0x8B, (byte)0xAC,
             0x1D, (byte)0x89, 0x35, 0x4F, 0x48, (byte)0xFA, 0x37, (byte)0xC2
-        }, blip1.getUID()));
+        }, blip1.getUID());
 
         //serialize and read again
         byte[] ser = bse1.serialize();
@@ -66,7 +68,7 @@ public final class TestEscherBlipRecord 
         assertEquals(bse1.getRecordId(), bse2.getRecordId());
         assertEquals(bse1.getBlipTypeWin32(), bse2.getBlipTypeWin32());
         assertEquals(bse1.getBlipTypeMacOS(), bse2.getBlipTypeMacOS());
-        assertTrue(Arrays.equals(bse1.getUid(), bse2.getUid()));
+        assertArrayEquals(bse1.getUid(), bse2.getUid());
         assertEquals(bse1.getTag(), bse2.getTag());
         assertEquals(bse1.getSize(), bse2.getSize());
 
@@ -75,7 +77,7 @@ public final class TestEscherBlipRecord 
         assertEquals(blip1.getRecordId(), blip2.getRecordId());
         assertEquals(blip1.getUID(), blip2.getUID());
 
-        assertTrue(Arrays.equals(blip1.getPicturedata(), blip1.getPicturedata()));
+        assertArrayEquals(blip1.getPicturedata(), blip1.getPicturedata());
     }
 
     //test reading/serializing of a PICT metafile
@@ -90,24 +92,24 @@ public final class TestEscherBlipRecord 
         //System.out.println(bse1);
         assertEquals(EscherBSERecord.BT_WMF, bse1.getBlipTypeWin32());
         assertEquals(EscherBSERecord.BT_PICT, bse1.getBlipTypeMacOS());
-        assertTrue(Arrays.equals(new byte[]{
+        assertArrayEquals(new byte[]{
             (byte)0xC7, 0x15, 0x69, 0x2D, (byte)0xE5, (byte)0x89, (byte)0xA3, 0x6F,
             0x66, 0x03, (byte)0xD6, 0x24, (byte)0xF7, (byte)0xDB, 0x1D, 0x13
-        }, bse1.getUid()));
+        }, bse1.getUid());
         assertEquals(255, bse1.getTag());
         assertEquals(1133, bse1.getSize());
 
         EscherMetafileBlip blip1 = (EscherMetafileBlip)bse1.getBlipRecord();
         assertEquals(0x5430, blip1.getOptions());
         assertEquals(EscherMetafileBlip.RECORD_ID_PICT, blip1.getRecordId());
-        assertTrue(Arrays.equals(new byte[]{
+        assertArrayEquals(new byte[]{
             0x57, 0x32, 0x7B, (byte)0x91, 0x23, 0x5D, (byte)0xDB, 0x36,
             0x7A, (byte)0xDB, (byte)0xFF, 0x17, (byte)0xFE, (byte)0xF3, (byte)0xA7, 0x05
-        }, blip1.getUID()));
-        assertTrue(Arrays.equals(new byte[]{
+        }, blip1.getUID());
+        assertArrayEquals(new byte[]{
             (byte)0xC7, 0x15, 0x69, 0x2D, (byte)0xE5, (byte)0x89, (byte)0xA3, 0x6F,
             0x66, 0x03, (byte)0xD6, 0x24, (byte)0xF7, (byte)0xDB, 0x1D, 0x13
-        }, blip1.getPrimaryUID()));
+        }, blip1.getPrimaryUID());
 
         //serialize and read again
         byte[] ser = bse1.serialize();
@@ -117,7 +119,7 @@ public final class TestEscherBlipRecord 
         assertEquals(bse1.getOptions(), bse2.getOptions());
         assertEquals(bse1.getBlipTypeWin32(), bse2.getBlipTypeWin32());
         assertEquals(bse1.getBlipTypeMacOS(), bse2.getBlipTypeMacOS());
-        assertTrue(Arrays.equals(bse1.getUid(), bse2.getUid()));
+        assertArrayEquals(bse1.getUid(), bse2.getUid());
         assertEquals(bse1.getTag(), bse2.getTag());
         assertEquals(bse1.getSize(), bse2.getSize());
 
@@ -127,7 +129,7 @@ public final class TestEscherBlipRecord 
         assertEquals(blip1.getUID(), blip2.getUID());
         assertEquals(blip1.getPrimaryUID(), blip2.getPrimaryUID());
 
-        assertTrue(Arrays.equals(blip1.getPicturedata(), blip1.getPicturedata()));
+        assertArrayEquals(blip1.getPicturedata(), blip1.getPicturedata());
     }
 
     //integral test: check that the read-write-read round trip is consistent
@@ -138,7 +140,7 @@ public final class TestEscherBlipRecord 
         record.fillFields(data, 0, new DefaultEscherRecordFactory());
 
         byte[] ser = record.serialize();
-        assertTrue(Arrays.equals(data, ser));
+        assertArrayEquals(data, ser);
     }
 
     private byte[] read(File file) {
@@ -169,6 +171,6 @@ public final class TestEscherBlipRecord 
         assertNotNull(remaining);
 
         byte[] ser = bse.serialize();  //serialize and assert against the source data
-        assertTrue(Arrays.equals(data, ser));
+        assertArrayEquals(data, ser);
     }
 }

Modified: poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java Fri May 16 13:25:45 2014
@@ -17,11 +17,11 @@
 
 package org.apache.poi.ddf;
 
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.TestCase;
-import org.apache.poi.util.HexRead;
-import org.apache.poi.util.HexDump;
 
-import java.util.Arrays;
+import org.apache.poi.util.HexDump;
+import org.apache.poi.util.HexRead;
 
 public final class TestEscherOptRecord extends TestCase {
 
@@ -299,7 +299,7 @@ public final class TestEscherOptRecord e
         opt2.fillFields( data1, new DefaultEscherRecordFactory() );
 
         byte[] data2 = opt2.serialize();
-        assertTrue(Arrays.equals(data1, data2));
+        assertArrayEquals(data1, data2);
     }
 
     /**
@@ -319,6 +319,6 @@ public final class TestEscherOptRecord e
         assertEquals(0, p.getNumberOfElementsInArray());
 
         byte[] data2 = opt2.serialize();
-        assertTrue(Arrays.equals(data1, data2));
+        assertArrayEquals(data1, data2);
     }
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java Fri May 16 13:25:45 2014
@@ -16,6 +16,8 @@
 ==================================================================== */
 package org.apache.poi.hssf.model;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -169,6 +171,7 @@ public class TestDrawingAggregate extend
     public void testAllTestSamples(){
         File[] xls = new File(System.getProperty("POI.testdata.path"), "spreadsheet").listFiles(
                 new FilenameFilter() {
+                    @Override
                     public boolean accept(File dir, String name) {
                         return name.endsWith(".xls");
                     }
@@ -471,7 +474,7 @@ public class TestDrawingAggregate extend
             assertEquals(r1.getRecordSize(), r2.getRecordSize());
             if (r1 instanceof Record) {
                 assertEquals(((Record) r1).getSid(), ((Record) r2).getSid());
-                assertTrue(Arrays.equals(((Record) r1).serialize(), ((Record) r2).serialize()));
+                assertArrayEquals(((Record) r1).serialize(), ((Record) r2).serialize());
             }
         }
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java Fri May 16 13:25:45 2014
@@ -17,49 +17,13 @@
 
 package org.apache.poi.hssf.model;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.hssf.record.NameRecord;
 import org.apache.poi.hssf.record.common.UnicodeString;
-import org.apache.poi.ss.formula.constant.ErrorConstant;
-import org.apache.poi.ss.formula.ptg.AbstractFunctionPtg;
-import org.apache.poi.ss.formula.ptg.AddPtg;
-import org.apache.poi.ss.formula.ptg.Area3DPtg;
-import org.apache.poi.ss.formula.ptg.AreaI;
-import org.apache.poi.ss.formula.ptg.AreaPtg;
-import org.apache.poi.ss.formula.ptg.AreaPtgBase;
-import org.apache.poi.ss.formula.ptg.ArrayPtg;
-import org.apache.poi.ss.formula.ptg.AttrPtg;
-import org.apache.poi.ss.formula.ptg.BoolPtg;
-import org.apache.poi.ss.formula.ptg.ConcatPtg;
-import org.apache.poi.ss.formula.ptg.DividePtg;
-import org.apache.poi.ss.formula.ptg.EqualPtg;
-import org.apache.poi.ss.formula.ptg.ErrPtg;
-import org.apache.poi.ss.formula.ptg.FuncPtg;
-import org.apache.poi.ss.formula.ptg.FuncVarPtg;
-import org.apache.poi.ss.formula.ptg.IntPtg;
-import org.apache.poi.ss.formula.ptg.MemAreaPtg;
-import org.apache.poi.ss.formula.ptg.MemFuncPtg;
-import org.apache.poi.ss.formula.ptg.MissingArgPtg;
-import org.apache.poi.ss.formula.ptg.MultiplyPtg;
-import org.apache.poi.ss.formula.ptg.NamePtg;
-import org.apache.poi.ss.formula.ptg.NumberPtg;
-import org.apache.poi.ss.formula.ptg.ParenthesisPtg;
-import org.apache.poi.ss.formula.ptg.PercentPtg;
-import org.apache.poi.ss.formula.ptg.PowerPtg;
-import org.apache.poi.ss.formula.ptg.Ptg;
-import org.apache.poi.ss.formula.ptg.RangePtg;
-import org.apache.poi.ss.formula.ptg.Ref3DPtg;
-import org.apache.poi.ss.formula.ptg.RefPtg;
-import org.apache.poi.ss.formula.ptg.StringPtg;
-import org.apache.poi.ss.formula.ptg.SubtractPtg;
-import org.apache.poi.ss.formula.ptg.UnaryMinusPtg;
-import org.apache.poi.ss.formula.ptg.UnaryPlusPtg;
-import org.apache.poi.ss.formula.ptg.UnionPtg;
 import org.apache.poi.hssf.usermodel.FormulaExtractor;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
@@ -72,6 +36,8 @@ import org.apache.poi.hssf.usermodel.Tes
 import org.apache.poi.ss.formula.FormulaParseException;
 import org.apache.poi.ss.formula.FormulaParser;
 import org.apache.poi.ss.formula.FormulaType;
+import org.apache.poi.ss.formula.constant.ErrorConstant;
+import org.apache.poi.ss.formula.ptg.*;
 import org.apache.poi.ss.usermodel.BaseTestBugzillaIssues;
 import org.apache.poi.ss.usermodel.Name;
 import org.apache.poi.util.HexRead;
@@ -909,7 +875,7 @@ public final class TestFormulaParser ext
 				+ "00 00 00 "      // Array data: 1 col, 1 row
 				+ "02 01 00 00 35" // elem (type=string, len=1, "5")
 		);
-		assertTrue(Arrays.equals(expData, data));
+		assertArrayEquals(expData, data);
 		int initSize = Ptg.getEncodedSizeWithoutArrayData(ptgs);
 		Ptg[] ptgs2 = Ptg.readTokens(initSize, new LittleEndianByteArrayInputStream(data));
 		confirmTokenClasses(ptgs2, ArrayPtg.class, IntPtg.class, FuncVarPtg.class);

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java Fri May 16 13:25:45 2014
@@ -17,8 +17,8 @@
 
 package org.apache.poi.hssf.record;
 
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.TestCase;
-import java.util.Arrays;
 
 /**
  * Tests the AutoFilterInfoRecord class.
@@ -62,6 +62,6 @@ public final class TestAutoFilterInfoRec
         byte[] cln = cloned.serialize();
 
         assertEquals(record.getDataSize(), cloned.getDataSize());
-        assertTrue(Arrays.equals(src, cln));
+        assertArrayEquals(src, cln);
     }
 }
\ No newline at end of file

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoolErrRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoolErrRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoolErrRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoolErrRecord.java Fri May 16 13:25:45 2014
@@ -17,8 +17,7 @@
 
 package org.apache.poi.hssf.record;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
@@ -80,6 +79,6 @@ public final class TestBoolErrRecord ext
 				"00 00 00 00 0F 00 " +
 				"01 00 " // normal number of data bytes
 				);
-		assertTrue(Arrays.equals(expData, outData));
+		assertArrayEquals(expData, outData);
 	}
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java Fri May 16 13:25:45 2014
@@ -17,15 +17,16 @@
 
 package org.apache.poi.hssf.record;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
-import org.apache.poi.util.HexRead;
-
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
+import org.apache.poi.util.HexRead;
+
 /**
  * Tests BoundSheetRecord.
  *
@@ -76,7 +77,7 @@ public final class TestBoundSheetRecord 
 		assertEquals("\u0421\u0442\u0440\u0430\u043D\u0438\u0447\u043A\u0430", bsr.getSheetname());
 
 		byte[] data2 = bsr.serialize();
-		assertTrue(Arrays.equals(data, data2));
+		assertArrayEquals(data, data2);
 	}
 
 	public void testOrdering() {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestColumnInfoRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestColumnInfoRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestColumnInfoRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestColumnInfoRecord.java Fri May 16 13:25:45 2014
@@ -17,8 +17,7 @@
 
 package org.apache.poi.hssf.record;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
@@ -45,7 +44,7 @@ public final class TestColumnInfoRecord 
 		assertEquals(true, cir.getHidden());
 		assertEquals(3, cir.getOutlineLevel());
 		assertEquals(true, cir.getCollapsed());
-		assertTrue(Arrays.equals(data, cir.serialize()));
+		assertArrayEquals(data, cir.serialize());
 	}
 
 	/**
@@ -69,7 +68,7 @@ public final class TestColumnInfoRecord 
 			throw e;
 		}
 		assertEquals(0, in.remaining());
-		assertTrue(Arrays.equals(outData, cir.serialize()));
+		assertArrayEquals(outData, cir.serialize());
 	}
 
 	/**
@@ -83,6 +82,6 @@ public final class TestColumnInfoRecord 
 		RecordInputStream in = TestcaseRecordInputStream.create(inpData);
 		ColumnInfoRecord cir = new ColumnInfoRecord(in);
 		assertEquals(0, in.remaining());
-		assertTrue(Arrays.equals(outData, cir.serialize()));
+		assertArrayEquals(outData, cir.serialize());
 	}
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDrawingRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDrawingRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDrawingRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDrawingRecord.java Fri May 16 13:25:45 2014
@@ -17,6 +17,8 @@
 
 package org.apache.poi.hssf.record;
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -31,6 +33,7 @@ public final class TestDrawingRecord ext
      * Check that RecordFactoryInputStream properly handles continued DrawingRecords
      * See Bugzilla #47548
      */
+    @SuppressWarnings("deprecation")
     public void testReadContinued() throws IOException {
 
         //simulate a continues drawing record
@@ -53,8 +56,8 @@ public final class TestDrawingRecord ext
         assertTrue(rec.get(0) instanceof DrawingRecord);
         assertTrue(rec.get(1) instanceof ContinueRecord);
 
-        assertTrue(Arrays.equals(data1, ((DrawingRecord)rec.get(0)).getData()));
-        assertTrue(Arrays.equals(data2, ((ContinueRecord)rec.get(1)).getData()));
+        assertArrayEquals(data1, ((DrawingRecord)rec.get(0)).getData());
+        assertArrayEquals(data2, ((ContinueRecord)rec.get(1)).getData());
 
     }
 

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEmbeddedObjectRefSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEmbeddedObjectRefSubRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEmbeddedObjectRefSubRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEmbeddedObjectRefSubRecord.java Fri May 16 13:25:45 2014
@@ -17,8 +17,7 @@
 
 package org.apache.poi.hssf.record;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
@@ -57,7 +56,7 @@ public final class TestEmbeddedObjectRef
 		assertEquals(record1.getOLEClassName(), record2.getOLEClassName());
 
 		byte[] ser2 = record1.serialize();
-		assertTrue(Arrays.equals(ser, ser2));
+		assertArrayEquals(ser, ser2);
 	}
 
 	/**
@@ -85,7 +84,7 @@ public final class TestEmbeddedObjectRef
 		assertEquals(record1.getStreamId(), record2.getStreamId());
 
 		byte[] ser2 = record1.serialize();
-		assertTrue(Arrays.equals(ser, ser2));
+		assertArrayEquals(ser, ser2);
 	}
 
 	public void testCameraTool_bug45912() {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java Fri May 16 13:25:45 2014
@@ -18,10 +18,9 @@
 package org.apache.poi.hssf.record;
 
 
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.TestCase;
 
-import java.util.Arrays;
-
 /**
  * Tests the serialization and deserialization of the FtCblsSubRecord
  * class works correctly.
@@ -61,6 +60,6 @@ public final class TestFtCblsSubRecord e
         byte[] cln = cloned.serialize();
 
         assertEquals(record.getDataSize(), cloned.getDataSize());
-        assertTrue(Arrays.equals(src, cln));
+        assertArrayEquals(src, cln);
     }
 }
\ No newline at end of file

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestHyperlinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestHyperlinkRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestHyperlinkRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestHyperlinkRecord.java Fri May 16 13:25:45 2014
@@ -16,8 +16,7 @@
 ==================================================================== */
 package org.apache.poi.hssf.record;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
@@ -345,7 +344,7 @@ public final class TestHyperlinkRecord e
         link = new HyperlinkRecord(is);
         byte[] bytes2 = link.serialize();
         assertEquals(bytes1.length, bytes2.length);
-        assertTrue(Arrays.equals(bytes1, bytes2));
+        assertArrayEquals(bytes1, bytes2);
     }
 
     public void testSerialize(){
@@ -367,7 +366,7 @@ public final class TestHyperlinkRecord e
         byte[] ser = new byte[tmp.length-4];
         System.arraycopy(tmp, 4, ser, 0, ser.length);
         assertEquals(data1.length, ser.length);
-        assertTrue(Arrays.equals(data1, ser));
+        assertArrayEquals(data1, ser);
     }
 
     public void testCreateFileRecord() {
@@ -382,7 +381,7 @@ public final class TestHyperlinkRecord e
         byte[] ser = new byte[tmp.length-4];
         System.arraycopy(tmp, 4, ser, 0, ser.length);
         assertEquals(data2.length, ser.length);
-        assertTrue(Arrays.equals(data2, ser));
+        assertArrayEquals(data2, ser);
     }
 
     public void testCreateDocumentRecord() {
@@ -397,7 +396,7 @@ public final class TestHyperlinkRecord e
         byte[] ser = new byte[tmp.length-4];
         System.arraycopy(tmp, 4, ser, 0, ser.length);
         assertEquals(data4.length, ser.length);
-        assertTrue(Arrays.equals(data4, ser));
+        assertArrayEquals(data4, ser);
     }
 
     public void testCreateEmailtRecord() {
@@ -412,7 +411,7 @@ public final class TestHyperlinkRecord e
         byte[] ser = new byte[tmp.length-4];
         System.arraycopy(tmp, 4, ser, 0, ser.length);
         assertEquals(data3.length, ser.length);
-        assertTrue(Arrays.equals(data3, ser));
+        assertArrayEquals(data3, ser);
     }
 
     public void testClone() {
@@ -421,7 +420,7 @@ public final class TestHyperlinkRecord e
             RecordInputStream is = TestcaseRecordInputStream.create(HyperlinkRecord.sid, data[i]);
             HyperlinkRecord link = new HyperlinkRecord(is);
             HyperlinkRecord clone = (HyperlinkRecord)link.clone();
-            assertTrue(Arrays.equals(link.serialize(), clone.serialize()));
+            assertArrayEquals(link.serialize(), clone.serialize());
         }
 
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestLbsDataSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestLbsDataSubRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestLbsDataSubRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestLbsDataSubRecord.java Fri May 16 13:25:45 2014
@@ -18,9 +18,11 @@
 package org.apache.poi.hssf.record;
 
 
+import static org.junit.Assert.assertArrayEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
+import java.io.IOException;
 
 import junit.framework.TestCase;
 
@@ -143,10 +145,10 @@ public final class TestLbsDataSubRecord 
         RecordInputStream in2 = TestcaseRecordInputStream.create(ser);
         ObjRecord record2 = new ObjRecord(in2);
         byte[] ser2 = record2.serialize();
-        assertTrue(Arrays.equals(ser, ser2));
+        assertArrayEquals(ser, ser2);
     }
 
-    public void test_LbsDropData(){
+    public void test_LbsDropData() throws IOException{
         byte[] data = HexRead.readFromString(
                                  //LbsDropData
                                  "0A, 00, " + //flags
@@ -157,12 +159,20 @@ public final class TestLbsDataSubRecord 
                                  "00");        //padding byte
 
         LittleEndianInputStream in = new LittleEndianInputStream(new ByteArrayInputStream(data));
-
-        LbsDataSubRecord.LbsDropData lbs = new LbsDataSubRecord.LbsDropData(in);
-
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        lbs.serialize(new LittleEndianOutputStream(baos));
-
-        assertTrue(Arrays.equals(data, baos.toByteArray()));
+        try {
+            LbsDataSubRecord.LbsDropData lbs = new LbsDataSubRecord.LbsDropData(in);
+    
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            LittleEndianOutputStream out = new LittleEndianOutputStream(baos);
+            try {
+                lbs.serialize(out);
+        
+                assertArrayEquals(data, baos.toByteArray());
+            } finally {
+                out.close();
+            }
+        } finally {
+            in.close();
+        }
     }
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java Fri May 16 13:25:45 2014
@@ -17,11 +17,10 @@
 
 package org.apache.poi.hssf.record;
 
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
-import java.util.Arrays;
-
 import org.apache.poi.util.HexRead;
 
 /**
@@ -84,7 +83,7 @@ public final class TestNoteRecord extend
         //finally check that the serialized data is the same
         byte[] src = record.serialize();
         byte[] cln = cloned.serialize();
-        assertTrue(Arrays.equals(src, cln));
+        assertArrayEquals(src, cln);
     }
     
     public void testUnicodeAuthor() {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java Fri May 16 13:25:45 2014
@@ -18,10 +18,9 @@
 package org.apache.poi.hssf.record;
 
 
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.TestCase;
 
-import java.util.Arrays;
-
 /**
  * Tests the serialization and deserialization of the NoteRecord
  * class works correctly.  Test data taken directly from a real
@@ -63,6 +62,6 @@ public final class TestNoteStructureSubR
         byte[] cln = cloned.serialize();
 
         assertEquals(record.getDataSize(), cloned.getDataSize());
-        assertTrue(Arrays.equals(src, cln));
+        assertArrayEquals(src, cln);
     }
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestObjRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestObjRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestObjRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestObjRecord.java Fri May 16 13:25:45 2014
@@ -17,7 +17,8 @@
 
 package org.apache.poi.hssf.record;
 
-import java.util.Arrays;
+import static org.junit.Assert.assertArrayEquals;
+
 import java.util.List;
 
 import junit.framework.AssertionFailedError;
@@ -76,7 +77,7 @@ public final class TestObjRecord extends
         assertEquals(26, recordBytes.length - 4);
         byte[] subData = new byte[recdata.length];
         System.arraycopy(recordBytes, 4, subData, 0, subData.length);
-        assertTrue(Arrays.equals(recdata, subData));
+        assertArrayEquals(recdata, subData);
     }
 
     public void testConstruct() {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecalcIdRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecalcIdRecord.java?rev=1595190&r1=1595189&r2=1595190&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecalcIdRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestRecalcIdRecord.java Fri May 16 13:25:45 2014
@@ -17,8 +17,7 @@
 
 package org.apache.poi.hssf.record;
 
-import java.util.Arrays;
-
+import static org.junit.Assert.assertArrayEquals;
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
@@ -67,6 +66,6 @@ public final class TestRecalcIdRecord ex
 			throw e;
 		}
 		assertEquals(0, in.remaining());
-		assertTrue(Arrays.equals(r.serialize(), goodData));
+		assertArrayEquals(r.serialize(), goodData);
 	}
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message