File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
inject/hk2/src/test/java/org/glassfish/jersey/inject/hk2 Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1717package org .glassfish .jersey .inject .hk2 ;
1818
1919import java .lang .reflect .Type ;
20+ import java .util .HashSet ;
21+ import java .util .Set ;
2022import java .util .concurrent .atomic .AtomicInteger ;
2123import java .util .concurrent .atomic .AtomicReference ;
2224import java .util .function .Supplier ;
@@ -374,9 +376,17 @@ public void testDisposeComposedObjectWithPerLookupFields() {
374376
375377 // All instances should be the same because they are request scoped.
376378 ComposedObject instance = injectionManager .getInstance (ComposedObject .class );
377- assertEquals ("1" , instance .first );
378- assertEquals ("2" , instance .second );
379- assertEquals ("3" , instance .third );
379+ Set <String > set1 = new HashSet <String >() {{
380+ add ("1" );
381+ add ("2" );
382+ add ("3" );
383+ }};
384+ Set <String > set2 = new HashSet <String >() {{
385+ add (instance .first .toString ());
386+ add (instance .second .toString ());
387+ add (instance .third .toString ());
388+ }};
389+ assertEquals (set1 , set2 );
380390 });
381391
382392 Supplier <String > cleanedSupplier = atomicSupplier .get ();
You can’t perform that action at this time.
0 commit comments