/* ===========================================================
 * JFreeChart : a free chart library for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
 *
 * Project Info:  http://www.jfree.org/jfreechart/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.
 *
 * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. 
 * Other names may be trademarks of their respective owners.]
 *
 * -----------------------------
 * AreaRendererEndTypeTests.java
 * -----------------------------
 * (C) Copyright 2004-2008, by Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * Changes
 * -------
 * 29-Apr-2004 : Version 1 (DG);
 *
 */

package org.jfree.chart.renderer.junit;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.jfree.chart.renderer.AreaRendererEndType;

/**
 * Tests for the {@link AreaRendererEndType} class.
 */
public class AreaRendererEndTypeTests extends TestCase {

    /**
     * Returns the tests as a test suite.
     *
     * @return The test suite.
     */
    public static Test suite() {
        return new TestSuite(AreaRendererEndTypeTests.class);
    }

    /**
     * Constructs a new set of tests.
     *
     * @param name  the name of the tests.
     */
    public AreaRendererEndTypeTests(String name) {
        super(name);
    }

    /**
     * A test for the equals() method.
     */
    public void testEquals() {
        assertEquals(AreaRendererEndType.LEVEL, AreaRendererEndType.LEVEL);
        assertEquals(AreaRendererEndType.TAPER, AreaRendererEndType.TAPER);
        assertEquals(
            AreaRendererEndType.TRUNCATE, AreaRendererEndType.TRUNCATE
        );
    }

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        AreaRendererEndType t1 = AreaRendererEndType.TAPER;
        AreaRendererEndType t2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(t1);
            out.close();

            ObjectInput in = new ObjectInputStream(
                new ByteArrayInputStream(buffer.toByteArray())
            );
            t2 = (AreaRendererEndType) in.readObject();
            in.close();
        }
        catch (Exception e) {
            System.out.println(e.toString());
        }
        assertEquals(t1, t2);
        boolean same = t1 == t2;
        assertEquals(true, same);
    }

}

@@ -1344,10 +1344,10 @@
 4-20
-08
+13
 , by
@@ -1656,32 +1656,60 @@
 ayOutputStream;%0A
+import java.io.IOException;%0A
 import java.io.O
@@ -2935,20 +2935,62 @@
 zation()
+ throws IOException, ClassNotFoundException
  %7B%0A
-%0A
         
@@ -3075,43 +3075,18 @@
 e t2
- = null;%0A%0A        try %7B%0A   
+;%0A
         
  Byt
@@ -3081,17 +3081,16 @@
         
- 
 ByteArra
@@ -3145,28 +3145,24 @@
 ();%0A        
-    
 ObjectOutput
@@ -3204,28 +3204,24 @@
 r);%0A        
- 
-   
 out.writeObj
@@ -3233,28 +3233,24 @@
 1);%0A        
-   
- 
 out.close();
@@ -3250,21 +3250,16 @@
 lose();%0A
-%0A    
         
@@ -3301,25 +3301,8 @@
 eam(
-%0A                
 new 
@@ -3318,24 +3318,41 @@
 InputStream(
+%0A                
 buffer.toByt
@@ -3364,28 +3364,11 @@
 y())
-%0A            );%0A    
+);%0A
     
@@ -3423,20 +3423,16 @@
         
-   
- 
 in.close
@@ -3439,104 +3439,8 @@
 ();%0A
-        %7D%0A        catch (Exception e) %7B%0A            System.out.println(e.toString());%0A        %7D%0A
     

Remove System.err.println.