3434 */
3535public class ClassLoaderObjectInputStreamTest {
3636
37- /*
37+ /**
3838 * Note: This test case tests the simplest functionality of ObjectInputStream. IF we really wanted to test
3939 * ClassLoaderObjectInputStream we would probably need to create a transient Class Loader. -TO
4040 */
41-
4241 private enum E {
4342 A , B , C
4443 }
4544
46- private static final class Test implements Serializable {
45+ private static final class TestFixture implements Serializable {
4746 private static final long serialVersionUID = 1L ;
4847 private final int i ;
4948
5049 private final Object o ;
5150
5251 private final E e ;
5352
54- Test (final int i , final Object o ) {
53+ TestFixture (final int i , final Object o ) {
5554 this .i = i ;
5655 this .e = E .A ;
5756 this .o = o ;
@@ -66,8 +65,8 @@ private boolean equalObject(final Object other) {
6665
6766 @ Override
6867 public boolean equals (final Object other ) {
69- if (other instanceof Test ) {
70- final Test tOther = (Test ) other ;
68+ if (other instanceof TestFixture ) {
69+ final TestFixture tOther = (TestFixture ) other ;
7170 return this .i == tOther .i & this .e == tOther .e & equalObject (tOther .o );
7271 }
7372 return false ;
@@ -101,7 +100,7 @@ public void testLong() throws Exception {
101100
102101 @ org .junit .jupiter .api .Test
103102 public void testObject1 () throws Exception {
104- final Test input = new Test (123 , null );
103+ final TestFixture input = new TestFixture (123 , null );
105104 final InputStream bais = new ByteArrayInputStream (SerializationUtils .serialize (input ));
106105 try (ClassLoaderObjectInputStream clois = new ClassLoaderObjectInputStream (getClass ().getClassLoader (), bais )) {
107106 final Object result = clois .readObject ();
@@ -111,7 +110,7 @@ public void testObject1() throws Exception {
111110
112111 @ org .junit .jupiter .api .Test
113112 public void testObject2 () throws Exception {
114- final Test input = new Test (123 , 0 );
113+ final TestFixture input = new TestFixture (123 , 0 );
115114 final InputStream bais = new ByteArrayInputStream (SerializationUtils .serialize (input ));
116115 try (ClassLoaderObjectInputStream clois = new ClassLoaderObjectInputStream (getClass ().getClassLoader (), bais )) {
117116 final Object result = clois .readObject ();
0 commit comments