commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-imaging git commit: Improve various unit tests style, closes #29.
Date Thu, 20 Jul 2017 20:29:47 GMT
Repository: commons-imaging
Updated Branches:
  refs/heads/master a32cb5b3d -> 6962d8b98


Improve various unit tests style, closes #29.

Project: http://git-wip-us.apache.org/repos/asf/commons-imaging/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-imaging/commit/6962d8b9
Tree: http://git-wip-us.apache.org/repos/asf/commons-imaging/tree/6962d8b9
Diff: http://git-wip-us.apache.org/repos/asf/commons-imaging/diff/6962d8b9

Branch: refs/heads/master
Commit: 6962d8b98a018e32a0ae0cb0bbd3ba9fab361b8c
Parents: a32cb5b
Author: TheRealHaui <notifications@github.com>
Authored: Thu Jul 20 13:29:44 2017 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Thu Jul 20 13:29:44 2017 -0700

----------------------------------------------------------------------
 .../apache/commons/imaging/ImageDumpTest.java   | 16 +-----------
 .../common/RgbBufferedImageFactoryTest.java     | 11 --------
 .../common/bytesource/ByteSourceTest.java       | 18 +++----------
 .../common/itu_t4/HuffmanTreeExceptionTest.java | 11 --------
 .../imaging/common/itu_t4/T4_T6_TablesTest.java | 11 --------
 .../imaging/formats/bmp/BmpWriterRgbTest.java   | 21 ++++-----------
 .../formats/jpeg/iptc/IptcTypeLookupTest.java   | 15 ++---------
 .../formats/jpeg/segments/AppnSegmentTest.java  | 11 --------
 .../formats/jpeg/segments/JfifSegmentTest.java  | 17 ++++--------
 .../formats/jpeg/segments/SosSegmentTest.java   | 14 ----------
 .../formats/jpeg/xmp/JpegXmpParserTest.java     | 11 --------
 .../imaging/formats/pcx/RleReaderTest.java      | 11 --------
 .../formats/png/chunks/PngChunkTextTest.java    | 11 --------
 .../ScanlineFilterAverageTest.java              | 11 --------
 .../ScanlineFilterPaethTest.java                | 11 --------
 .../scanlinefilters/ScanlineFilterUpTest.java   | 13 +---------
 .../TransparencyFilterIndexedColorTest.java     | 11 --------
 .../imaging/formats/pnm/PbmFileInfoTest.java    | 17 +++---------
 .../formats/pnm/WhiteSpaceReaderTest.java       | 11 --------
 .../formats/psd/ImageResourceBlockTest.java     | 11 --------
 .../formats/psd/ImageResourceTypeTest.java      | 14 ----------
 .../psd/dataparsers/DataParserCmykTest.java     | 13 +---------
 .../dataparsers/DataParserGrayscaleTest.java    | 11 --------
 .../psd/dataparsers/DataParserIndexedTest.java  | 11 --------
 .../psd/dataparsers/DataParserLabTest.java      | 11 --------
 .../imaging/formats/tiff/JpegImageDataTest.java | 10 --------
 .../imaging/formats/tiff/TiffTagsTest.java      | 11 --------
 .../tiff/fieldtypes/FieldTypeByteTest.java      | 27 +++-----------------
 .../tiff/fieldtypes/FieldTypeLongTest.java      | 10 --------
 .../tiff/fieldtypes/FieldTypeShortTest.java     | 10 --------
 .../formats/tiff/fieldtypes/FieldTypeTest.java  | 11 --------
 .../formats/tiff/taginfos/TagInfoByteTest.java  | 10 --------
 .../formats/tiff/taginfos/TagInfoSByteTest.java | 11 --------
 .../tiff/taginfos/TagInfoSBytesTest.java        | 11 --------
 .../formats/tiff/taginfos/TagInfoSLongTest.java | 11 --------
 .../tiff/taginfos/TagInfoSShortTest.java        | 11 --------
 .../tiff/taginfos/TagInfoSShortsTest.java       | 11 --------
 .../tiff/taginfos/TagInfoUnknownTest.java       | 11 --------
 .../imaging/palette/SimplePaletteTest.java      |  7 -----
 39 files changed, 26 insertions(+), 459 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/ImageDumpTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/ImageDumpTest.java b/src/test/java/org/apache/commons/imaging/ImageDumpTest.java
index 7e75e0f..8ee5e0c 100644
--- a/src/test/java/org/apache/commons/imaging/ImageDumpTest.java
+++ b/src/test/java/org/apache/commons/imaging/ImageDumpTest.java
@@ -7,38 +7,24 @@ import java.awt.image.BufferedImage;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link ImageDump}.
- *
- * @date 13.07.2017
- * @see ImageDump
- *
- **/
-public class ImageDumpTest{
-
+public class ImageDumpTest {
 
     @Test
     public void testDumpColorSpace() {
-
         ImageDump imageDump = new ImageDump();
         ColorSpace colorSpace = ColorSpace.getInstance(1004);
         imageDump.dumpColorSpace("Ku&]N>!4'C#Jzn+", colorSpace);
 
         assertEquals(3, colorSpace.getNumComponents());
-
     }
 
-
     @Test
     public void testDump() {
-
         ImageDump imageDump = new ImageDump();
         BufferedImage bufferedImage = new BufferedImage(10, 10, 10);
         imageDump.dump(bufferedImage);
 
         assertEquals(10, bufferedImage.getHeight());
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java b/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java
index 4cf44f2..a608a7c 100644
--- a/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java
+++ b/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java
@@ -7,19 +7,10 @@ import java.awt.image.DirectColorModel;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link RgbBufferedImageFactory}.
- *
- * @date 13.07.2017
- * @see RgbBufferedImageFactory
- *
- **/
 public class RgbBufferedImageFactoryTest{
 
-
     @Test
     public void testGetColorBufferedImageThrowsIllegalArgumentException() {
-
         RgbBufferedImageFactory rgbBufferedImageFactory = new RgbBufferedImageFactory();
 
         try {
@@ -29,8 +20,6 @@ public class RgbBufferedImageFactoryTest{
             assertEquals("Width (0) and height (0) cannot be <= 0",e.getMessage());
             assertEquals(DirectColorModel.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java b/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java
index 664a235..65f791c 100644
--- a/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java
+++ b/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceTest.java
@@ -22,9 +22,7 @@ import org.junit.Test;
 
 import java.io.*;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 public abstract class ByteSourceTest extends ImagingTest {
     protected File createTempFile(final byte src[]) throws IOException {
@@ -67,19 +65,11 @@ public abstract class ByteSourceTest extends ImagingTest {
         return new byte[][]{emptyArray, single, simple, zeroes, longArray,};
     }
 
-    @Test
+    @Test(expected = NullPointerException.class)
     public void testGetInputStreamThrowsNullPointerException() throws IOException {
+        ByteSourceArray byteSourceArray = new ByteSourceArray(null);
 
-        ByteSourceArray byteSourceArray = new ByteSourceArray((byte[]) null);
-
-        try {
-            byteSourceArray.getInputStream(0L);
-            fail("Expecting exception: NullPointerException");
-        } catch (NullPointerException e) {
-            assertEquals(ByteArrayInputStream.class.getName(), e.getStackTrace()[0].getClassName());
-        }
-
+        byteSourceArray.getInputStream(0L);
     }
 
-}
-
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/common/itu_t4/HuffmanTreeExceptionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/common/itu_t4/HuffmanTreeExceptionTest.java b/src/test/java/org/apache/commons/imaging/common/itu_t4/HuffmanTreeExceptionTest.java
index c03bc4b..5d14550 100644
--- a/src/test/java/org/apache/commons/imaging/common/itu_t4/HuffmanTreeExceptionTest.java
+++ b/src/test/java/org/apache/commons/imaging/common/itu_t4/HuffmanTreeExceptionTest.java
@@ -4,25 +4,14 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertFalse;
 
-/**
- * Unit tests for class {@link HuffmanTreeException}.
- *
- * @date 13.07.2017
- * @see HuffmanTreeException
- *
- **/
 public class HuffmanTreeExceptionTest{
 
-
     @Test
     public void testCreatesHuffmanTreeExceptionTakingString() {
-
         HuffmanTreeException huffmanTreeException = new HuffmanTreeException("");
         HuffmanTreeException huffmanTreeExceptionTwo = new HuffmanTreeException("", huffmanTreeException);
 
         assertFalse(huffmanTreeExceptionTwo.equals(huffmanTreeException));
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/common/itu_t4/T4_T6_TablesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/common/itu_t4/T4_T6_TablesTest.java b/src/test/java/org/apache/commons/imaging/common/itu_t4/T4_T6_TablesTest.java
index 2406ebb..1820011 100644
--- a/src/test/java/org/apache/commons/imaging/common/itu_t4/T4_T6_TablesTest.java
+++ b/src/test/java/org/apache/commons/imaging/common/itu_t4/T4_T6_TablesTest.java
@@ -6,27 +6,16 @@ import java.util.Arrays;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link T4_T6_Tables}.
- *
- * @date 13.07.2017
- * @see T4_T6_Tables
- *
- **/
 public class T4_T6_TablesTest{
 
-
   @Test
   public void testCreatesT4_T6_TablesTakingNoArgumentsAndCallsWriteBits() {
-
       T4_T6_Tables t4_T6_Tables = new T4_T6_Tables();
       BitArrayOutputStream bitArrayOutputStream = new BitArrayOutputStream(2309);
       t4_T6_Tables.EOL16.writeBits(bitArrayOutputStream);
 
       assertEquals(2, bitArrayOutputStream.size());
       assertEquals("[0, 1]", Arrays.toString(bitArrayOutputStream.toByteArray()));
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/bmp/BmpWriterRgbTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/bmp/BmpWriterRgbTest.java b/src/test/java/org/apache/commons/imaging/formats/bmp/BmpWriterRgbTest.java
index 7217365..081dd4e 100644
--- a/src/test/java/org/apache/commons/imaging/formats/bmp/BmpWriterRgbTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/bmp/BmpWriterRgbTest.java
@@ -3,33 +3,22 @@ package org.apache.commons.imaging.formats.bmp;
 import org.junit.Test;
 
 import java.awt.image.BufferedImage;
-import java.util.Arrays;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link BmpWriterRgb}.
- *
- * @date 13.07.2017
- * @see BmpWriterRgb
- *
- **/
 public class BmpWriterRgbTest{
 
-
     @Test
     public void testGetImageData() {
-
         BmpWriterRgb bmpWriterRgb = new BmpWriterRgb();
         BufferedImage bufferedImage = new BufferedImage(2, 2, 5);
         byte[] byteArray = bmpWriterRgb.getImageData(bufferedImage);
 
-        assertEquals( 24, bmpWriterRgb.getBitsPerPixel() );
-        assertEquals( 0, bmpWriterRgb.getPaletteSize() );
-        assertEquals( 16, byteArray.length );
-        assertEquals( "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", Arrays.toString(byteArray) );
-
+        assertEquals(24, bmpWriterRgb.getBitsPerPixel());
+        assertEquals(0, bmpWriterRgb.getPaletteSize());
+        assertEquals(16, byteArray.length);
+        assertArrayEquals(new byte[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, byteArray);
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypeLookupTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypeLookupTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypeLookupTest.java
index 57bd791..4e66f8a 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypeLookupTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypeLookupTest.java
@@ -4,25 +4,14 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link IptcTypeLookup}.
- *
- * @date 13.07.2017
- * @see IptcTypeLookup
- *
- **/
 public class IptcTypeLookupTest{
 
-
     @Test
     public void testGetIptcTypeWithPositive() {
-
         IptcType iptcType = IptcTypeLookup.getIptcType(1117);
 
-        assertEquals( 1117, iptcType.getType() );
-        assertEquals( "Unknown", iptcType.getName() );
-
+        assertEquals(1117, iptcType.getType());
+        assertEquals("Unknown", iptcType.getName());
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/AppnSegmentTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/AppnSegmentTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/AppnSegmentTest.java
index 28192ea..31aa914 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/AppnSegmentTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/AppnSegmentTest.java
@@ -8,25 +8,14 @@ import java.io.InputStream;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link AppnSegment}.
- *
- * @date 13.07.2017
- * @see AppnSegment
- *
- **/
 public class AppnSegmentTest{
 
-
   @Test
   public void testCreatesAppnSegment() throws IOException {
-
       InputStream inputStream = new ByteArrayInputStream(new byte[0]);
       AppnSegment appnSegment = new AppnSegment(0, 0, inputStream);
 
       assertEquals("[Segment: APPN (APP-65504) (Unknown)]", appnSegment.toString());
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java
index 0a78806..65ebfe8 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java
@@ -1,35 +1,28 @@
 package org.apache.commons.imaging.formats.jpeg.segments;
 
+import org.apache.commons.imaging.ImageReadException;
 import org.junit.Test;
 
+import java.io.IOException;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link JfifSegment}.
- *
- * @date 13.07.2017
- * @see JfifSegment
- *
- **/
 public class JfifSegmentTest{
 
-
   @Test
-  public void testCreatesJfifSegment() {
-
+  public void testCreatesJfifSegment() throws IOException {
       byte[] byteArray = new byte[25];
       JfifSegment jfifSegment = null;
 
       try {
         jfifSegment = new JfifSegment((-2275), byteArray);
         fail("Expecting exception: Exception");
-      } catch(Throwable e) {
+      } catch(ImageReadException e) {
          assertEquals("Not a Valid JPEG File: missing JFIF string",e.getMessage());
          assertEquals(JfifSegment.class.getName(), e.getStackTrace()[0].getClassName());
       }
 
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/SosSegmentTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/SosSegmentTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/SosSegmentTest.java
index ddd8baa..642b145 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/SosSegmentTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/SosSegmentTest.java
@@ -6,32 +6,20 @@ import java.io.IOException;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link SosSegment}.
- *
- * @date 13.07.2017
- * @see SosSegment
- *
- **/
 public class SosSegmentTest{
 
-
   @Test
   public void testGetComponentsTakingNoArguments() throws IOException {
-
       byte[] byteArray = new byte[5];
       SosSegment sosSegment = new SosSegment((-1044), byteArray);
       sosSegment.getComponents();
 
       assertEquals(0, sosSegment.successiveApproximationBitHigh);
       assertEquals(0, sosSegment.successiveApproximationBitLow);
-
   }
 
-
   @Test
   public void testCreatesSosSegmentTakingThreeArguments() throws IOException {
-
       byte[] byteArray = new byte[5];
       SosSegment sosSegment = new SosSegment((-1044), byteArray);
 
@@ -39,8 +27,6 @@ public class SosSegmentTest{
       assertEquals(0, sosSegment.successiveApproximationBitHigh);
 
       assertEquals("[Segment: SOS (Unknown)]", sosSegment.toString());
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java
index f1592f1..cd8df1a 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java
@@ -5,19 +5,10 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link JpegXmpParser}.
- *
- * @date 13.07.2017
- * @see JpegXmpParser
- *
- **/
 public class JpegXmpParserTest{
 
-
     @Test
     public void testCreatesJpegXmpParserAndCallsParseXmpJpegSegment() {
-
         JpegXmpParser jpegXmpParser = new JpegXmpParser();
         byte[] byteArray = new byte[1];
 
@@ -28,8 +19,6 @@ public class JpegXmpParserTest{
             assertEquals("Invalid JPEG XMP Segment.",e.getMessage());
             assertEquals(JpegXmpParser.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java b/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java
index de2f7bc..6432532 100644
--- a/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java
@@ -7,19 +7,10 @@ import java.io.ByteArrayInputStream;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link RleReader}.
- *
- * @date 13.07.2017
- * @see RleReader
- *
- **/
 public class RleReaderTest{
 
-
     @Test
     public void testReadWithNonNull() {
-
         RleReader rleReader = new RleReader(false);
         byte[] byteArray = new byte[1];
         ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray, (byte) (-64), (byte) (-64));
@@ -31,8 +22,6 @@ public class RleReaderTest{
             assertEquals("Premature end of file reading image data",e.getMessage());
             assertEquals(RleReader.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java b/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java
index 0824e81..b7bd9b2 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java
@@ -5,19 +5,10 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link PngChunkText}.
- *
- * @date 13.07.2017
- * @see PngChunkText
- *
- **/
 public class PngChunkTextTest{
 
-
     @Test
     public void testCreatesPngChunkText() {
-
         byte[] byteArray = new byte[0];
         PngChunkText pngChunkText = null;
 
@@ -28,8 +19,6 @@ public class PngChunkTextTest{
             assertEquals("PNG tEXt chunk keyword is not terminated.",e.getMessage());
             assertEquals(PngChunkText.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterAverageTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterAverageTest.java b/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterAverageTest.java
index bb76c05..f93d58c 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterAverageTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterAverageTest.java
@@ -7,26 +7,15 @@ import java.io.IOException;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link ScanlineFilterAverage}.
- *
- * @date 13.07.2017
- * @see ScanlineFilterAverage
- *
- **/
 public class ScanlineFilterAverageTest{
 
-
   @Test
   public void testUnfilterWithNull() throws IOException, ImageReadException {
-
       ScanlineFilterAverage scanlineFilterAverage = new ScanlineFilterAverage(2);
       byte[] byteArray = new byte[9];
       scanlineFilterAverage.unfilter(byteArray, byteArray, (byte[]) null);
 
       assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray);
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterPaethTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterPaethTest.java b/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterPaethTest.java
index 03a0c06..be786b6 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterPaethTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterPaethTest.java
@@ -7,26 +7,15 @@ import java.io.IOException;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link ScanlineFilterPaeth}.
- *
- * @date 13.07.2017
- * @see ScanlineFilterPaeth
- *
- **/
 public class ScanlineFilterPaethTest{
 
-
   @Test
   public void testUnfilter() throws IOException, ImageReadException {
-
       ScanlineFilterPaeth scanlineFilterPaeth = new ScanlineFilterPaeth(0);
       byte[] byteArray = new byte[5];
       scanlineFilterPaeth.unfilter(byteArray, byteArray, (byte[]) null);
 
       assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0, (byte)0}, byteArray);
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterUpTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterUpTest.java b/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterUpTest.java
index 7030356..382189e 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterUpTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterUpTest.java
@@ -7,26 +7,15 @@ import java.io.IOException;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link ScanlineFilterUp}.
- *
- * @date 13.07.2017
- * @see ScanlineFilterUp
- *
- **/
-public class ScanlineFilterUpTest{
-
+public class ScanlineFilterUpTest {
 
   @Test
   public void testUnfilterWithNull() throws IOException, ImageReadException {
-
       ScanlineFilterUp scanlineFilterUp = new ScanlineFilterUp();
       byte[] byteArray = new byte[4];
       scanlineFilterUp.unfilter(byteArray, byteArray, (byte[]) null);
 
       assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0}, byteArray);
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java b/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java
index cc92ee9..c9dcc43 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java
@@ -5,19 +5,10 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link TransparencyFilterIndexedColor}.
- *
- * @date 13.07.2017
- * @see TransparencyFilterIndexedColor
- *
- **/
 public class TransparencyFilterIndexedColorTest{
 
-
     @Test
     public void testFilterWithNegativeAndNegative() {
-
         byte[] byteArray = new byte[0];
         TransparencyFilterIndexedColor transparencyFilterIndexedColor = new TransparencyFilterIndexedColor(byteArray);
 
@@ -28,8 +19,6 @@ public class TransparencyFilterIndexedColorTest{
             assertEquals("TransparencyFilterIndexedColor index: -398, bytes.length: 0",e.getMessage());
             assertEquals(TransparencyFilterIndexedColor.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java b/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java
index 0f982c3..b9241cd 100644
--- a/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java
@@ -9,33 +9,22 @@ import java.io.InputStream;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link PbmFileInfo}.
- *
- * @date 13.07.2017
- * @see PbmFileInfo
- *
- **/
 public class PbmFileInfoTest{
 
-
   @Test
   public void testGetRGBThrowsIOException() throws IOException {
-
       PbmFileInfo pbmFileInfo = new PbmFileInfo(2764, 354, true);
       byte[] byteArray = new byte[2];
-      ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray);
-      byteArrayInputStream.read(byteArray);
+      InputStream inputStream = new ByteArrayInputStream(byteArray);
+      inputStream.read(byteArray);
 
       try { 
-        pbmFileInfo.getRGB((InputStream) byteArrayInputStream);
+        pbmFileInfo.getRGB(inputStream);
         fail("Expecting exception: IOException");
       } catch(IOException e) {
          assertEquals("PBM: Unexpected EOF",e.getMessage());
          assertEquals(PbmFileInfo.class.getName(), e.getStackTrace()[0].getClassName());
       }
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/pnm/WhiteSpaceReaderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/pnm/WhiteSpaceReaderTest.java b/src/test/java/org/apache/commons/imaging/formats/pnm/WhiteSpaceReaderTest.java
index 8c9ba06..3d7a99e 100644
--- a/src/test/java/org/apache/commons/imaging/formats/pnm/WhiteSpaceReaderTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/pnm/WhiteSpaceReaderTest.java
@@ -8,19 +8,10 @@ import java.util.Arrays;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link WhiteSpaceReader}.
- *
- * @date 13.07.2017
- * @see WhiteSpaceReader
- *
- **/
 public class WhiteSpaceReaderTest{
 
-
   @Test
   public void testReadLineReturningNonEmptyString() throws IOException {
-
       byte[] byteArray = new byte[6];
       byteArray[4] = (byte)13;
       ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray);
@@ -28,8 +19,6 @@ public class WhiteSpaceReaderTest{
 
       assertEquals(6, byteArrayInputStream.available());
       assertEquals("[0, 0, 0, 0]", Arrays.toString( whiteSpaceReader.readLine().getBytes() ) );
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceBlockTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceBlockTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceBlockTest.java
index c75b044..d51a1a7 100644
--- a/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceBlockTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceBlockTest.java
@@ -6,25 +6,14 @@ import java.io.UnsupportedEncodingException;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link ImageResourceBlock}.
- *
- * @date 13.07.2017
- * @see ImageResourceBlock
- *
- **/
 public class ImageResourceBlockTest{
 
-
     @Test
     public void testCreatesImageResourceBlockAndCallsGetName() throws UnsupportedEncodingException {
-
         byte[] byteArray = new byte[3];
         ImageResourceBlock imageResourceBlock = new ImageResourceBlock(0, byteArray, byteArray);
 
         assertEquals( new String(byteArray, "ISO-8859-1"), imageResourceBlock.getName());
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceTypeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceTypeTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceTypeTest.java
index 095c3c0..98b5ad7 100644
--- a/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceTypeTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/psd/ImageResourceTypeTest.java
@@ -4,34 +4,20 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link ImageResourceType}.
- *
- * @date 13.07.2017
- * @see ImageResourceType
- *
- **/
 public class ImageResourceTypeTest{
 
-
     @Test
     public void testGetDescriptionWithPositive() {
-
         String string = ImageResourceType.getDescription(2309);
 
         assertEquals("Path Information (saved paths).", string);
-
     }
 
-
     @Test
     public void testGetDescriptionWithZero() {
-
         String string = ImageResourceType.getDescription(0);
 
         assertEquals("Unknown", string);
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserCmykTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserCmykTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserCmykTest.java
index 2df22c4..cedc2e3 100644
--- a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserCmykTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserCmykTest.java
@@ -4,24 +4,13 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link DataParserCmyk}.
- *
- * @date 13.07.2017
- * @see DataParserCmyk
- *
- **/
-public class DataParserCmykTest{
-
+public class DataParserCmykTest {
 
     @Test
     public void testGetBasicChannelsCount() {
-
         DataParserCmyk dataParserCmyk = new DataParserCmyk();
 
         assertEquals(4, dataParserCmyk.getBasicChannelsCount());
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserGrayscaleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserGrayscaleTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserGrayscaleTest.java
index 837a83b..f982149 100644
--- a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserGrayscaleTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserGrayscaleTest.java
@@ -4,24 +4,13 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link DataParserGrayscale}.
- *
- * @date 13.07.2017
- * @see DataParserGrayscale
- *
- **/
 public class DataParserGrayscaleTest{
 
-
   @Test
   public void testGetBasicChannelsCount() {
-
       DataParserGrayscale dataParserGrayscale = new DataParserGrayscale();
 
       assertEquals(1, dataParserGrayscale.getBasicChannelsCount());
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java
index b6a7236..2a6ab34 100644
--- a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java
@@ -5,19 +5,10 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link DataParserIndexed}.
- *
- * @date 13.07.2017
- * @see DataParserIndexed
- *
- **/
 public class DataParserIndexedTest{
 
-
   @Test
   public void testFailsToCreateDataParserIndexedThrowsArrayIndexOutOfBoundsException() {
-
       byte[] byteArray = new byte[24];
       DataParserIndexed dataParserIndexed = null;
 
@@ -28,8 +19,6 @@ public class DataParserIndexedTest{
          assertEquals("256",e.getMessage());
          assertEquals(DataParserIndexed.class.getName(), e.getStackTrace()[0].getClassName());
       }
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLabTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLabTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLabTest.java
index 6e95119..4310d18 100644
--- a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLabTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLabTest.java
@@ -4,24 +4,13 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link DataParserLab}.
- *
- * @date 13.07.2017
- * @see DataParserLab
- *
- **/
 public class DataParserLabTest{
 
-
   @Test
   public void testGetBasicChannelsCount() {
-
       DataParserLab dataParserLab = new DataParserLab();
 
       assertEquals(3, dataParserLab.getBasicChannelsCount());
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java
index a13c444..7786748 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java
@@ -4,19 +4,10 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link JpegImageData}.
- *
- * @date 13.07.2017
- * @see JpegImageData
- *
- **/
 public class JpegImageDataTest{
 
-
     @Test
     public void testCreatesJpegImageDataAndCallsGetElementDescription() {
-
         byte[] byteArray = new byte[5];
         JpegImageData jpegImageData = new JpegImageData((-1L), 1, byteArray);
         String string = jpegImageData.getElementDescription(true);
@@ -24,5 +15,4 @@ public class JpegImageDataTest{
         assertEquals("Jpeg image data: 5 bytes", string);
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagsTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagsTest.java
index 180194f..ef0f81b 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagsTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffTagsTest.java
@@ -5,25 +5,14 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link TiffTags}.
- *
- * @date 13.07.2017
- * @see TiffTags
- *
- **/
 public class TiffTagsTest{
 
-
     @Test
     public void testGetTagWithNegativeAndPositive() {
-
         TagInfo tagInfo = TiffTags.getTag((-1), 50933);
 
         assertEquals((-1), tagInfo.tag);
         assertEquals( "Unknown Tag", tagInfo.name );
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeByteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeByteTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeByteTest.java
index 8d6b482..d0b2ba4 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeByteTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeByteTest.java
@@ -1,37 +1,18 @@
 package org.apache.commons.imaging.formats.tiff.fieldtypes;
 
+import org.apache.commons.imaging.ImageWriteException;
 import org.junit.Test;
 
 import java.nio.ByteOrder;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-/**
- * Unit tests for class {@link FieldTypeByte}.
- *
- * @date 13.07.2017
- * @see FieldTypeByte
- *
- **/
 public class FieldTypeByteTest{
 
-
-  @Test
-  public void testWriteDataWithNull() {
-
+  @Test(expected = ImageWriteException.class)
+  public void testWriteDataWithNull() throws ImageWriteException {
       FieldTypeByte fieldTypeByte = FieldType.UNDEFINED;
       ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
 
-      try { 
-        fieldTypeByte.writeData( null, byteOrder);
-        fail("Expecting exception: Exception");
-      } catch(Exception e) {
-         assertEquals("Invalid data: null (null)",e.getMessage());
-         assertEquals(FieldTypeByte.class.getName(), e.getStackTrace()[0].getClassName());
-      }
-
+      fieldTypeByte.writeData( null, byteOrder);
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLongTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLongTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLongTest.java
index a288ab1..8596203 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLongTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLongTest.java
@@ -7,18 +7,10 @@ import java.nio.ByteOrder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link FieldTypeLong}.
- *
- * @date 13.07.2017
- * @see FieldTypeLong
- **/
 public class FieldTypeLongTest {
 
-
     @Test
     public void testWriteDataWithNonNull() {
-
         FieldTypeLong fieldTypeLong = FieldType.IFD;
         ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
 
@@ -29,8 +21,6 @@ public class FieldTypeLongTest {
             assertEquals("Invalid data: BIG_ENDIAN (java.nio.ByteOrder)", e.getMessage());
             assertEquals(FieldTypeLong.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeShortTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeShortTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeShortTest.java
index 7437995..6d4529f 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeShortTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeShortTest.java
@@ -7,18 +7,10 @@ import java.nio.ByteOrder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link FieldTypeShort}.
- *
- * @date 13.07.2017
- * @see FieldTypeShort
- **/
 public class FieldTypeShortTest {
 
-
     @Test
     public void testCreatesFieldTypeShortAndCallsWriteData() {
-
         FieldTypeShort fieldTypeShort = new FieldTypeShort(1234, "");
         ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
 
@@ -29,8 +21,6 @@ public class FieldTypeShortTest {
             assertEquals("Invalid data:  (java.lang.String)", e.getMessage());
             assertEquals(FieldTypeShort.class.getName(), e.getStackTrace()[0].getClassName());
         }
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java
index 09998e8..5eb65a9 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java
@@ -5,19 +5,10 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-/**
- * Unit tests for class {@link FieldType}.
- *
- * @date 13.07.2017
- * @see FieldType
- *
- **/
 public class FieldTypeTest{
 
-
   @Test
   public void testGetFieldTypeWithNegative() {
-
       try { 
         FieldType.getFieldType((-748));
         fail("Expecting exception: Exception");
@@ -25,8 +16,6 @@ public class FieldTypeTest{
          assertEquals("Field type -748 is unsupported",e.getMessage());
          assertEquals(FieldType.class.getName(), e.getStackTrace()[0].getClassName());
       }
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoByteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoByteTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoByteTest.java
index 30967b4..17eb219 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoByteTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoByteTest.java
@@ -7,24 +7,14 @@ import java.nio.ByteOrder;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link TagInfoByte}.
- *
- * @date 13.07.2017
- * @see TagInfoByte
- **/
 public class TagInfoByteTest {
 
-
     @Test
     public void testCreatesTagInfoByteTakingFourArgumentsAndCallsEncodeValue() {
-
         TiffDirectoryType tiffDirectoryType = TiffDirectoryType.TIFF_DIRECTORY_IFD0;
         TagInfoByte tagInfoByte = new TagInfoByte("", 347, tiffDirectoryType);
 
         assertArrayEquals(new byte[]{(byte) 0}, tagInfoByte.encodeValue((ByteOrder) null, (byte) 0));
-
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSByteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSByteTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSByteTest.java
index 18836ef..12bcadc 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSByteTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSByteTest.java
@@ -7,27 +7,16 @@ import java.nio.ByteOrder;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link TagInfoSByte}.
- *
- * @date 13.07.2017
- * @see TagInfoSByte
- *
- **/
 public class TagInfoSByteTest{
 
-
   @Test
   public void testCreatesTagInfoSByteAndCallsEncodeValue() {
-
       TiffDirectoryType tiffDirectoryType = TiffDirectoryType.EXIF_DIRECTORY_GPS;
       TagInfoSByte tagInfoSByte = new TagInfoSByte("", 0, tiffDirectoryType);
       ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
       byte[] byteArray = tagInfoSByte.encodeValue(byteOrder, (byte)6);
 
       assertArrayEquals(new byte[] {(byte)6}, byteArray);
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSBytesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSBytesTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSBytesTest.java
index 6652821..60796a7 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSBytesTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSBytesTest.java
@@ -7,19 +7,10 @@ import java.nio.ByteOrder;
 
 import static org.junit.Assert.assertSame;
 
-/**
- * Unit tests for class {@link TagInfoSBytes}.
- *
- * @date 13.07.2017
- * @see TagInfoSBytes
- *
- **/
 public class TagInfoSBytesTest{
 
-
   @Test
   public void testCreatesTagInfoSBytesAndCallsEncodeValue() {
-
       TiffDirectoryType tiffDirectoryType = TiffDirectoryType.TIFF_DIRECTORY_IFD3;
       TagInfoSBytes tagInfoSBytes = new TagInfoSBytes("", (-198), 10, tiffDirectoryType);
       ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
@@ -27,8 +18,6 @@ public class TagInfoSBytesTest{
       byte[] byteArrayTwo = tagInfoSBytes.encodeValue(byteOrder, byteArray);
 
       assertSame(byteArrayTwo, byteArray);
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSLongTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSLongTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSLongTest.java
index 07170a4..966bc07 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSLongTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSLongTest.java
@@ -7,26 +7,15 @@ import java.nio.ByteOrder;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link TagInfoSLong}.
- *
- * @date 13.07.2017
- * @see TagInfoSLong
- *
- **/
 public class TagInfoSLongTest{
 
-
   @Test
   public void testEncodeValue() {
-
       TiffDirectoryType tiffDirectoryType = TiffDirectoryType.TIFF_DIRECTORY_IFD0;
       TagInfoSLong tagInfoSLong = new TagInfoSLong("ttq{\"0r{s}'RQ", (-1770), tiffDirectoryType);
       ByteOrder byteOrder = ByteOrder.nativeOrder();
 
       assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0}, tagInfoSLong.encodeValue(byteOrder, 0));
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortTest.java
index e34a4ba..063448b 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortTest.java
@@ -7,26 +7,15 @@ import java.nio.ByteOrder;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link TagInfoSShort}.
- *
- * @date 13.07.2017
- * @see TagInfoSShort
- *
- **/
 public class TagInfoSShortTest{
 
-
   @Test
   public void testGetValue() {
-
       TiffDirectoryType tiffDirectoryType = TiffDirectoryType.TIFF_DIRECTORY_IFD3;
       TagInfoSShort tagInfoSShort = new TagInfoSShort("n1SN[2cj\"2),+O", (-1785), tiffDirectoryType);
       ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
 
       assertEquals((short) (-10231), tagInfoSShort.getValue(null, tagInfoSShort.encodeValue(byteOrder, (short) 2520)));
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortsTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortsTest.java
index 429556c..4292d07 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortsTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShortsTest.java
@@ -7,27 +7,16 @@ import java.nio.ByteOrder;
 
 import static org.junit.Assert.assertArrayEquals;
 
-/**
- * Unit tests for class {@link TagInfoSShorts}.
- *
- * @date 13.07.2017
- * @see TagInfoSShorts
- *
- **/
 public class TagInfoSShortsTest{
 
-
   @Test
   public void testEncodeValue() {
-
       TiffDirectoryType tiffDirectoryType = TiffDirectoryType.TIFF_DIRECTORY_IFD0;
       TagInfoSShorts tagInfoSShorts = new TagInfoSShorts("", 2269, 2269, tiffDirectoryType);
       ByteOrder byteOrder = ByteOrder.nativeOrder();
       short[] shortArray = new short[2];
 
       assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0}, tagInfoSShorts.encodeValue(byteOrder, shortArray));
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoUnknownTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoUnknownTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoUnknownTest.java
index b2b432e..e2d2cb0 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoUnknownTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoUnknownTest.java
@@ -5,25 +5,14 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link TagInfoUnknown}.
- *
- * @date 13.07.2017
- * @see TagInfoUnknown
- *
- **/
 public class TagInfoUnknownTest{
 
-
   @Test
   public void testCreatesTagInfoUnknown() {
-
       TiffDirectoryType tiffDirectoryType = TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD;
       TagInfoUnknown tagInfoUnknown = new TagInfoUnknown("", 2670, tiffDirectoryType);
 
       assertEquals((-1), TagInfo.LENGTH_UNKNOWN);
-
   }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/6962d8b9/src/test/java/org/apache/commons/imaging/palette/SimplePaletteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/imaging/palette/SimplePaletteTest.java b/src/test/java/org/apache/commons/imaging/palette/SimplePaletteTest.java
index 014fd69..831a038 100644
--- a/src/test/java/org/apache/commons/imaging/palette/SimplePaletteTest.java
+++ b/src/test/java/org/apache/commons/imaging/palette/SimplePaletteTest.java
@@ -4,13 +4,6 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-/**
- * Unit tests for class {@link SimplePalette}.
- *
- * @date 13.07.2017
- * @see SimplePalette
- *
- **/
 public class SimplePaletteTest{
 
 


Mime
View raw message