Improves annotation support (#161)
[jpf-core.git] / src / tests / gov / nasa / jpf / test / vm / basic / AnnotationHashCodeEqualsTest.java
1 package gov.nasa.jpf.test.vm.basic;
2
3 import org.junit.Test;
4
5 import gov.nasa.jpf.test.vm.basic.AnnotationToStringTest.*;
6 import gov.nasa.jpf.util.test.TestJPF;
7
8 public class AnnotationHashCodeEqualsTest extends TestJPF {
9   public class C0 {
10     @A0(f1 = true, f2 = false)
11     public int f1;
12
13     @A0(f1 = true, f2 = false)
14     public int f2;
15
16     @A0(f1 = false, f2 = true)
17     public int f3;
18   }
19
20   @Test
21   public void testBooleanAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
22     if(verifyNoPropertyViolation()) {
23       Class<?> klass = C0.class;
24       A0 a = klass.getDeclaredField("f1").getAnnotation(A0.class);
25       A0 b = klass.getDeclaredField("f2").getAnnotation(A0.class);
26       A0 c = klass.getDeclaredField("f3").getAnnotation(A0.class);
27       assertEquals(a, b);
28       assertEquals(a.hashCode(), b.hashCode());
29       assertFalse(c.equals(b));
30       assertFalse(c.equals(a));
31     }
32   }
33
34   public class C1 {
35     @A1(f1 = { true, false }, f2 = { false, true })
36     public int f1;
37
38     @A1(f1 = { true, false }, f2 = { false, true })
39     public int f2;
40
41     @A1(f1 = { false, true }, f2 = { true, false })
42     public int f3;
43   }
44
45   @Test
46   public void testBooleanArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
47     if(verifyNoPropertyViolation()) {
48       Class<?> klass = C1.class;
49       A1 a = klass.getDeclaredField("f1").getAnnotation(A1.class);
50       A1 b = klass.getDeclaredField("f2").getAnnotation(A1.class);
51       A1 c = klass.getDeclaredField("f3").getAnnotation(A1.class);
52       assertEquals(a, b);
53       assertEquals(a.hashCode(), b.hashCode());
54       assertFalse(c.equals(b));
55       assertFalse(c.equals(a));
56     }
57   }
58
59   public class C2 {
60     @A2(f1 = 2, f2 = 3)
61     public int f1;
62
63     @A2(f1 = 2, f2 = 3)
64     public int f2;
65
66     @A2(f1 = 3, f2 = 2)
67     public int f3;
68   }
69
70   @Test
71   public void testByteAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
72     if(verifyNoPropertyViolation()) {
73       Class<?> klass = C2.class;
74       A2 a = klass.getDeclaredField("f1").getAnnotation(A2.class);
75       A2 b = klass.getDeclaredField("f2").getAnnotation(A2.class);
76       A2 c = klass.getDeclaredField("f3").getAnnotation(A2.class);
77       assertEquals(a, b);
78       assertEquals(a.hashCode(), b.hashCode());
79       assertFalse(c.equals(b));
80       assertFalse(c.equals(a));
81     }
82   }
83
84   public class C3 {
85     @A3(f1 = { 2, 3 }, f2 = { 3, 2 })
86     public int f1;
87
88     @A3(f1 = { 2, 3 }, f2 = { 3, 2 })
89     public int f2;
90
91     @A3(f1 = { 3, 2 }, f2 = { 2, 3 })
92     public int f3;
93   }
94
95   @Test
96   public void testByteArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
97     if(verifyNoPropertyViolation()) {
98       Class<?> klass = C3.class;
99       A3 a = klass.getDeclaredField("f1").getAnnotation(A3.class);
100       A3 b = klass.getDeclaredField("f2").getAnnotation(A3.class);
101       A3 c = klass.getDeclaredField("f3").getAnnotation(A3.class);
102       assertEquals(a, b);
103       assertEquals(a.hashCode(), b.hashCode());
104       assertFalse(c.equals(b));
105       assertFalse(c.equals(a));
106     }
107   }
108
109   public class C4 {
110     @A4(f1 = 'a', f2 = 'b')
111     public int f1;
112
113     @A4(f1 = 'a', f2 = 'b')
114     public int f2;
115
116     @A4(f1 = 'b', f2 = 'a')
117     public int f3;
118   }
119
120   @Test
121   public void testCharAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
122     if(verifyNoPropertyViolation()) {
123       Class<?> klass = C4.class;
124       A4 a = klass.getDeclaredField("f1").getAnnotation(A4.class);
125       A4 b = klass.getDeclaredField("f2").getAnnotation(A4.class);
126       A4 c = klass.getDeclaredField("f3").getAnnotation(A4.class);
127       assertEquals(a, b);
128       assertEquals(a.hashCode(), b.hashCode());
129       assertFalse(c.equals(b));
130       assertFalse(c.equals(a));
131     }
132   }
133
134   public class C5 {
135     @A5(f1 = { 'a', 'b' }, f2 = { 'b', 'a' })
136     public int f1;
137
138     @A5(f1 = { 'a', 'b' }, f2 = { 'b', 'a' })
139     public int f2;
140
141     @A5(f1 = { 'b', 'a' }, f2 = { 'a', 'b' })
142     public int f3;
143   }
144
145   @Test
146   public void testCharArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
147     if(verifyNoPropertyViolation()) {
148       Class<?> klass = C5.class;
149       A5 a = klass.getDeclaredField("f1").getAnnotation(A5.class);
150       A5 b = klass.getDeclaredField("f2").getAnnotation(A5.class);
151       A5 c = klass.getDeclaredField("f3").getAnnotation(A5.class);
152       assertEquals(a, b);
153       assertEquals(a.hashCode(), b.hashCode());
154       assertFalse(c.equals(b));
155       assertFalse(c.equals(a));
156     }
157   }
158
159   public class C6 {
160     @A6(f1 = 0, f2 = 1)
161     public int f1;
162
163     @A6(f1 = 0, f2 = 1)
164     public int f2;
165
166     @A6(f1 = 1, f2 = 0)
167     public int f3;
168   }
169
170   @Test
171   public void testShortAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
172     if(verifyNoPropertyViolation()) {
173       Class<?> klass = C6.class;
174       A6 a = klass.getDeclaredField("f1").getAnnotation(A6.class);
175       A6 b = klass.getDeclaredField("f2").getAnnotation(A6.class);
176       A6 c = klass.getDeclaredField("f3").getAnnotation(A6.class);
177       assertEquals(a, b);
178       assertEquals(a.hashCode(), b.hashCode());
179       assertFalse(c.equals(b));
180       assertFalse(c.equals(a));
181     }
182   }
183
184   public class C7 {
185     @A7(f1 = { 0, 1 }, f2 = { 1, 0 })
186     public int f1;
187
188     @A7(f1 = { 0, 1 }, f2 = { 1, 0 })
189     public int f2;
190
191     @A7(f1 = { 1, 0 }, f2 = { 0, 1 })
192     public int f3;
193   }
194
195   @Test
196   public void testShortArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
197     if(verifyNoPropertyViolation()) {
198       Class<?> klass = C7.class;
199       A7 a = klass.getDeclaredField("f1").getAnnotation(A7.class);
200       A7 b = klass.getDeclaredField("f2").getAnnotation(A7.class);
201       A7 c = klass.getDeclaredField("f3").getAnnotation(A7.class);
202       assertEquals(a, b);
203       assertEquals(a.hashCode(), b.hashCode());
204       assertFalse(c.equals(b));
205       assertFalse(c.equals(a));
206     }
207   }
208
209   public class C8 {
210     @A8(f1 = 4, f2 = 5)
211     public int f1;
212
213     @A8(f1 = 4, f2 = 5)
214     public int f2;
215
216     @A8(f1 = 5, f2 = 4)
217     public int f3;
218   }
219
220   @Test
221   public void testIntAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
222     if(verifyNoPropertyViolation()) {
223       Class<?> klass = C8.class;
224       A8 a = klass.getDeclaredField("f1").getAnnotation(A8.class);
225       A8 b = klass.getDeclaredField("f2").getAnnotation(A8.class);
226       A8 c = klass.getDeclaredField("f3").getAnnotation(A8.class);
227       assertEquals(a, b);
228       assertEquals(a.hashCode(), b.hashCode());
229       assertFalse(c.equals(b));
230       assertFalse(c.equals(a));
231     }
232   }
233
234   public class C9 {
235     @A9(f1 = { 4, 5 }, f2 = { 5, 4 })
236     public int f1;
237
238     @A9(f1 = { 4, 5 }, f2 = { 5, 4 })
239     public int f2;
240
241     @A9(f1 = { 5, 4 }, f2 = { 4, 5 })
242     public int f3;
243   }
244
245   @Test
246   public void testIntArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
247     if(verifyNoPropertyViolation()) {
248       Class<?> klass = C9.class;
249       A9 a = klass.getDeclaredField("f1").getAnnotation(A9.class);
250       A9 b = klass.getDeclaredField("f2").getAnnotation(A9.class);
251       A9 c = klass.getDeclaredField("f3").getAnnotation(A9.class);
252       assertEquals(a, b);
253       assertEquals(a.hashCode(), b.hashCode());
254       assertFalse(c.equals(b));
255       assertFalse(c.equals(a));
256     }
257   }
258
259   public class C10 {
260     @A10(f1 = 9L, f2 = 10L)
261     public int f1;
262
263     @A10(f1 = 9L, f2 = 10L)
264     public int f2;
265
266     @A10(f1 = 10L, f2 = 9L)
267     public int f3;
268   }
269
270   @Test
271   public void testLongAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
272     if(verifyNoPropertyViolation()) {
273       Class<?> klass = C10.class;
274       A10 a = klass.getDeclaredField("f1").getAnnotation(A10.class);
275       A10 b = klass.getDeclaredField("f2").getAnnotation(A10.class);
276       A10 c = klass.getDeclaredField("f3").getAnnotation(A10.class);
277       assertEquals(a, b);
278       assertEquals(a.hashCode(), b.hashCode());
279       assertFalse(c.equals(b));
280       assertFalse(c.equals(a));
281     }
282   }
283
284   public class C11 {
285     @A11(f1 = { 9L, 10L }, f2 = { 10L, 9L })
286     public int f1;
287
288     @A11(f1 = { 9L, 10L }, f2 = { 10L, 9L })
289     public int f2;
290
291     @A11(f1 = { 10L, 9L }, f2 = { 9L, 10L })
292     public int f3;
293   }
294
295   @Test
296   public void testLongArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
297     if(verifyNoPropertyViolation()) {
298       Class<?> klass = C11.class;
299       A11 a = klass.getDeclaredField("f1").getAnnotation(A11.class);
300       A11 b = klass.getDeclaredField("f2").getAnnotation(A11.class);
301       A11 c = klass.getDeclaredField("f3").getAnnotation(A11.class);
302       assertEquals(a, b);
303       assertEquals(a.hashCode(), b.hashCode());
304       assertFalse(c.equals(b));
305       assertFalse(c.equals(a));
306     }
307   }
308
309   public class C12 {
310     @A12(f1 = 0.5f, f2 = 2.0f)
311     public int f1;
312
313     @A12(f1 = 0.5f, f2 = 2.0f)
314     public int f2;
315
316     @A12(f1 = 2.0f, f2 = 0.5f)
317     public int f3;
318   }
319
320   @Test
321   public void testFloatAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
322     if(verifyNoPropertyViolation()) {
323       Class<?> klass = C12.class;
324       A12 a = klass.getDeclaredField("f1").getAnnotation(A12.class);
325       A12 b = klass.getDeclaredField("f2").getAnnotation(A12.class);
326       A12 c = klass.getDeclaredField("f3").getAnnotation(A12.class);
327       assertEquals(a, b);
328       assertEquals(a.hashCode(), b.hashCode());
329       assertFalse(c.equals(b));
330       assertFalse(c.equals(a));
331     }
332   }
333
334   public class C13 {
335     @A13(f1 = { 0.5f, 2.0f }, f2 = { 2.0f, 0.5f })
336     public int f1;
337
338     @A13(f1 = { 0.5f, 2.0f }, f2 = { 2.0f, 0.5f })
339     public int f2;
340
341     @A13(f1 = { 2.0f, 0.5f }, f2 = { 0.5f, 2.0f })
342     public int f3;
343   }
344
345   @Test
346   public void testFloatArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
347     if(verifyNoPropertyViolation()) {
348       Class<?> klass = C13.class;
349       A13 a = klass.getDeclaredField("f1").getAnnotation(A13.class);
350       A13 b = klass.getDeclaredField("f2").getAnnotation(A13.class);
351       A13 c = klass.getDeclaredField("f3").getAnnotation(A13.class);
352       assertEquals(a, b);
353       assertEquals(a.hashCode(), b.hashCode());
354       assertFalse(c.equals(b));
355       assertFalse(c.equals(a));
356     }
357   }
358
359   public class C14 {
360     @A14(f1 = 2.0, f2 = 3.5)
361     public int f1;
362
363     @A14(f1 = 2.0, f2 = 3.5)
364     public int f2;
365
366     @A14(f1 = 3.5, f2 = 2.0)
367     public int f3;
368   }
369
370   @Test
371   public void testDoubleAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
372     if(verifyNoPropertyViolation()) {
373       Class<?> klass = C14.class;
374       A14 a = klass.getDeclaredField("f1").getAnnotation(A14.class);
375       A14 b = klass.getDeclaredField("f2").getAnnotation(A14.class);
376       A14 c = klass.getDeclaredField("f3").getAnnotation(A14.class);
377       assertEquals(a, b);
378       assertEquals(a.hashCode(), b.hashCode());
379       assertFalse(c.equals(b));
380       assertFalse(c.equals(a));
381     }
382   }
383
384   public class C15 {
385     @A15(f1 = { 2.0, 3.5 }, f2 = { 3.5, 2.0 })
386     public int f1;
387
388     @A15(f1 = { 2.0, 3.5 }, f2 = { 3.5, 2.0 })
389     public int f2;
390
391     @A15(f1 = { 3.5, 2.0 }, f2 = { 2.0, 3.5 })
392     public int f3;
393   }
394
395   @Test
396   public void testDoubleArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
397     if(verifyNoPropertyViolation()) {
398       Class<?> klass = C15.class;
399       A15 a = klass.getDeclaredField("f1").getAnnotation(A15.class);
400       A15 b = klass.getDeclaredField("f2").getAnnotation(A15.class);
401       A15 c = klass.getDeclaredField("f3").getAnnotation(A15.class);
402       assertEquals(a, b);
403       assertEquals(a.hashCode(), b.hashCode());
404       assertFalse(c.equals(b));
405       assertFalse(c.equals(a));
406     }
407   }
408
409   public class C16 {
410     @A16(f1 = "Hello", f2 = "World")
411     public int f1;
412
413     @A16(f1 = "Hello", f2 = "World")
414     public int f2;
415
416     @A16(f1 = "World", f2 = "Hello")
417     public int f3;
418   }
419
420   @Test
421   public void testStringAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
422     if(verifyNoPropertyViolation()) {
423       Class<?> klass = C16.class;
424       A16 a = klass.getDeclaredField("f1").getAnnotation(A16.class);
425       A16 b = klass.getDeclaredField("f2").getAnnotation(A16.class);
426       A16 c = klass.getDeclaredField("f3").getAnnotation(A16.class);
427       assertEquals(a, b);
428       assertEquals(a.hashCode(), b.hashCode());
429       assertFalse(c.equals(b));
430       assertFalse(c.equals(a));
431     }
432   }
433
434   public class C17 {
435     @A17(f1 = { "Hello", "World" }, f2 = { "World", "Hello" })
436     public int f1;
437
438     @A17(f1 = { "Hello", "World" }, f2 = { "World", "Hello" })
439     public int f2;
440
441     @A17(f1 = { "World", "Hello" }, f2 = { "Hello", "World" })
442     public int f3;
443   }
444
445   @Test
446   public void testStringArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
447     if(verifyNoPropertyViolation()) {
448       Class<?> klass = C17.class;
449       A17 a = klass.getDeclaredField("f1").getAnnotation(A17.class);
450       A17 b = klass.getDeclaredField("f2").getAnnotation(A17.class);
451       A17 c = klass.getDeclaredField("f3").getAnnotation(A17.class);
452       assertEquals(a, b);
453       assertEquals(a.hashCode(), b.hashCode());
454       assertFalse(c.equals(b));
455       assertFalse(c.equals(a));
456     }
457   }
458
459   public class C18 {
460     @A18(f1 = String.class, f2 = Integer.class)
461     public int f1;
462
463     @A18(f1 = String.class, f2 = Integer.class)
464     public int f2;
465
466     @A18(f1 = Integer.class, f2 = String.class)
467     public int f3;
468   }
469
470   @Test
471   public void testClassAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
472     if(verifyNoPropertyViolation()) {
473       Class<?> klass = C18.class;
474       A18 a = klass.getDeclaredField("f1").getAnnotation(A18.class);
475       A18 b = klass.getDeclaredField("f2").getAnnotation(A18.class);
476       A18 c = klass.getDeclaredField("f3").getAnnotation(A18.class);
477       assertEquals(a, b);
478       assertEquals(a.hashCode(), b.hashCode());
479       assertFalse(c.equals(b));
480       assertFalse(c.equals(a));
481     }
482   }
483
484   public class C19 {
485     @A19(f1 = { String.class, Integer.class }, f2 = { Integer.class, String.class })
486     public int f1;
487
488     @A19(f1 = { String.class, Integer.class }, f2 = { Integer.class, String.class })
489     public int f2;
490
491     @A19(f1 = { Integer.class, String.class }, f2 = { String.class, Integer.class })
492     public int f3;
493   }
494
495   @Test
496   public void testClassArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
497     if(verifyNoPropertyViolation()) {
498       Class<?> klass = C19.class;
499       A19 a = klass.getDeclaredField("f1").getAnnotation(A19.class);
500       A19 b = klass.getDeclaredField("f2").getAnnotation(A19.class);
501       A19 c = klass.getDeclaredField("f3").getAnnotation(A19.class);
502       assertEquals(a, b);
503       assertEquals(a.hashCode(), b.hashCode());
504       assertFalse(c.equals(b));
505       assertFalse(c.equals(a));
506     }
507   }
508
509   public class C20 {
510     @A20(f1 = EnumConsts.FIRST, f2 = EnumConsts.SECOND)
511     public int f1;
512
513     @A20(f1 = EnumConsts.FIRST, f2 = EnumConsts.SECOND)
514     public int f2;
515
516     @A20(f1 = EnumConsts.SECOND, f2 = EnumConsts.FIRST)
517     public int f3;
518   }
519
520   @Test
521   public void testEnumConstsAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
522     if(verifyNoPropertyViolation()) {
523       Class<?> klass = C20.class;
524       A20 a = klass.getDeclaredField("f1").getAnnotation(A20.class);
525       A20 b = klass.getDeclaredField("f2").getAnnotation(A20.class);
526       A20 c = klass.getDeclaredField("f3").getAnnotation(A20.class);
527       assertEquals(a, b);
528       assertEquals(a.hashCode(), b.hashCode());
529       assertFalse(c.equals(b));
530       assertFalse(c.equals(a));
531     }
532   }
533
534   public class C21 {
535     @A21(f1 = { EnumConsts.FIRST, EnumConsts.SECOND }, f2 = { EnumConsts.SECOND, EnumConsts.FIRST })
536     public int f1;
537
538     @A21(f1 = { EnumConsts.FIRST, EnumConsts.SECOND }, f2 = { EnumConsts.SECOND, EnumConsts.FIRST })
539     public int f2;
540
541     @A21(f1 = { EnumConsts.SECOND, EnumConsts.FIRST }, f2 = { EnumConsts.FIRST, EnumConsts.SECOND })
542     public int f3;
543   }
544
545   @Test
546   public void testEnumConstsArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
547     if(verifyNoPropertyViolation()) {
548       Class<?> klass = C21.class;
549       A21 a = klass.getDeclaredField("f1").getAnnotation(A21.class);
550       A21 b = klass.getDeclaredField("f2").getAnnotation(A21.class);
551       A21 c = klass.getDeclaredField("f3").getAnnotation(A21.class);
552       assertEquals(a, b);
553       assertEquals(a.hashCode(), b.hashCode());
554       assertFalse(c.equals(b));
555       assertFalse(c.equals(a));
556     }
557   }
558   
559   public class C22 {
560     @A22(f1 = @Nested1(fields = @A16(f1 = "Hello", f2 = "World")), f2 = @Nested2(fields = @A1(f1 = false, f2 = false)))
561     public int f1;
562     
563     @A22(f1 = @Nested1(fields = @A16(f1 = "Hello", f2 = "World")), f2 = @Nested2(fields = @A1(f1 = false, f2 = false)))
564     public int f2;
565     
566     @A22(f1 = @Nested1(fields = @A16(f1 = "Hola", f2 = "Mundo")), f2 = @Nested2(fields = @A1(f1 = true, f2 = true)))
567     public int f3;
568   }
569   
570   @Test
571   public void testAnnotationAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
572     if(verifyNoPropertyViolation()) {
573       Class<?> klass = C22.class;
574       A22 a = klass.getDeclaredField("f1").getAnnotation(A22.class);
575       A22 b = klass.getDeclaredField("f2").getAnnotation(A22.class);
576       A22 c = klass.getDeclaredField("f3").getAnnotation(A22.class);
577       assertEquals(a, b);
578       assertEquals(a.hashCode(), b.hashCode());
579       assertFalse(c.equals(b));
580       assertFalse(c.equals(a));
581     }
582   }
583   
584   public class C23 {
585     @A23(f1 = {
586         @Nested1(fields = @A16(f1 = "Hello", f2 = "World")), 
587         @Nested1(fields = @A16(f1 = "Bonjour", f2 = "Monde"))
588     }, f2 = {
589         @Nested2(fields = @A1(f1 = false, f2 = false)),
590         @Nested2(fields = @A1(f1 = true, f2 = true))
591     })
592     public int f1;
593     
594     @A23(f1 = {
595         @Nested1(fields = @A16(f1 = "Hello", f2 = "World")), 
596         @Nested1(fields = @A16(f1 = "Bonjour", f2 = "Monde"))
597     }, f2 = {
598         @Nested2(fields = @A1(f1 = false, f2 = false)),
599         @Nested2(fields = @A1(f1 = true, f2 = true))
600     })
601     public int f2;
602     
603     @A23(f1 = {
604         @Nested1(fields = @A16(f1 = "Hola", f2 = "Mundo")), 
605         @Nested1(fields = @A16(f1 = "Bonjour", f2 = "Monde"))
606     }, f2 = {
607         @Nested2(fields = @A1(f1 = false, f2 = true)),
608         @Nested2(fields = @A1(f1 = true, f2 = false))
609     })    public int f3;
610   }
611   
612   @Test
613   public void testAnnotationArrayAttributeHashCodeEquals() throws NoSuchFieldException, SecurityException {
614     if(verifyNoPropertyViolation()) {
615       Class<?> klass = C23.class;
616       A23 a = klass.getDeclaredField("f1").getAnnotation(A23.class);
617       A23 b = klass.getDeclaredField("f2").getAnnotation(A23.class);
618       A23 c = klass.getDeclaredField("f3").getAnnotation(A23.class);
619       assertEquals(a, b);
620       assertEquals(a.hashCode(), b.hashCode());
621       assertFalse(c.equals(b));
622       assertFalse(c.equals(a));
623     }
624   }
625
626 }