/* ========================================================================
 * JCommon : a free general purpose class library for the Java(tm) platform
 * ========================================================================
 *
 * (C) Copyright 2000-2016, by Object Refinery Limited and Contributors.
 * 
 * Project Info:  http://www.jfree.org/jcommon/index.html
 *
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License as published by 
 * the Free Software Foundation; either version 2.1 of the License, or 
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 * 
 * -------------------
 * PaintUtilsTest.java
 * -------------------
 * (C) Copyright 2005-2016, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 * *
 * Changes
 * -------
 * 23-Feb-2005 : Version 1 (DG);
 *
 */

package org.jfree.chart.util;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Paint;

import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

/**
 * Some tests for the {@link PaintUtils} class.
 */
public class PaintUtilsTest {

    /**
     * Some checks for the equal(Paint, Paint) method.
     */
    @Test
    public void testEqual() {
        Paint p1 = Color.red;
        Paint p2 = Color.blue;
        Paint p3 = new Color(1, 2, 3, 4);
        Paint p4 = new Color(1, 2, 3, 4);
        Paint p5 = new GradientPaint(
            1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.yellow
        );
        Paint p6 = new GradientPaint(
            1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.yellow
        );
        Paint p7 = new GradientPaint(
            1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue
        );
        assertTrue(PaintUtils.equal(null, null));
        assertFalse(PaintUtils.equal(p1, null));
        assertFalse(PaintUtils.equal(null, p1));
        assertFalse(PaintUtils.equal(p1, p2));
        assertTrue(PaintUtils.equal(p3, p3));
        assertTrue(PaintUtils.equal(p3, p4));
        assertTrue(PaintUtils.equal(p5, p6));
        assertFalse(PaintUtils.equal(p5, p7));
    }

}

@@ -59,63 +59,37 @@
 ====
-=============%0A * JCommon : a free general purpose class
+%0A * JFreeChart : a free chart
  lib
@@ -181,29 +181,16 @@
 ========
-======
-=======
 %0A *%0A * (
@@ -260,17 +260,16 @@
 tors.%0A *
- 
 %0A * Proj
@@ -305,14 +305,17 @@
 rg/j
-common
+freechart
 /ind
@@ -399,17 +399,16 @@
 odify it
- 
 %0A * unde
@@ -475,17 +475,16 @@
 ished by
- 
 %0A * the 
@@ -546,17 +546,16 @@
 ense, or
- 
 %0A * (at 
@@ -659,17 +659,16 @@
 ful, but
- 
 %0A * WITH
@@ -737,17 +737,16 @@
 TABILITY
- 
 %0A * or F
@@ -811,17 +811,16 @@
 l Public
- 
 %0A * Lice
@@ -1064,17 +1064,16 @@
 301,
- 
 %0A * USA.
   %0A 
@@ -1072,18 +1072,16 @@
 USA.
-  
 %0A *%0A * %5B
 Java
@@ -1080,30 +1080,27 @@
  * %5B
-Java is a trademark or
+Oracle and Java are
  reg
@@ -1120,85 +1120,108 @@
 mark
+s
  of 
-Sun Microsystems, Inc. %0A * in the United States and o
+Oracle and/or its affiliates. %0A * Other names may be trademarks of 
 the
+i
 r 
-countrie
+respective owner
 s.%5D%0A *
- 
 %0A * 
@@ -1306,17 +1306,17 @@
 ight 200
-5
+8
 -2016, b
@@ -1340,16 +1340,33 @@
  Limited
+ and Contributors
 .%0A *%0A * 
@@ -1454,18 +1454,16 @@
    -;%0A *
- *
 %0A * Chan
@@ -1484,18 +1484,18 @@
 %0A * 
-23
+08
 -Feb-200
 5 : 
@@ -1490,17 +1490,17 @@
 -Feb-200
-5
+8
  : Versi
@@ -1510,16 +1510,117 @@
 1 (DG);%0A
+ * 14-Jan-2009 : Updated testEquals() for new field (DG);%0A * 11-Jan-2016 : Copied from JCommon (DG);%0A
  *%0A */%0A%0A

Fix header