1313import  io .opentelemetry .javaagent .tooling .muzzle .references .Flag .ManifestationFlag ;
1414import  io .opentelemetry .javaagent .tooling .muzzle .references .Source ;
1515import  java .util .HashMap ;
16- import  java .util .List ;
1716import  java .util .Map ;
18- import  java .util .stream .Collectors ;
1917import  muzzle .HelperReferenceWrapperTestClasses ;
2018import  net .bytebuddy .pool .TypePool ;
2119import  org .junit .jupiter .api .BeforeAll ;
@@ -73,7 +71,6 @@ void shouldWrapHelperTypes() {
7371        new  HelperReferenceWrapper .Factory (typePool , references , helperClassPredicate )
7472            .create (helperClass );
7573
76-     // helperWrapper assertions 
7774    assertThat (helperWrapper .isAbstract ()).isFalse ();
7875
7976    assertThat (helperWrapper .getMethods ())
@@ -101,7 +98,7 @@ void shouldWrapHelperTypes() {
10198        .satisfies (
10299            baseHelper  -> {
103100              assertThat (baseHelper .isAbstract ()).isTrue ();
104-               assertThat (baseHelper .getMethods (). collect ( Collectors . toList ()) )
101+               assertThat (baseHelper .getMethods ())
105102                  .hasSize (2 )
106103                  .satisfies (
107104                      method  -> {
@@ -144,9 +141,7 @@ void shouldWrapHelperTypes() {
144141                            .satisfies (
145142                                wrapper  -> {
146143                                  assertThat (wrapper .isAbstract ()).isTrue ();
147-                                   List <HelperReferenceWrapper .Method > interface1Methods  =
148-                                       wrapper .getMethods ().collect (Collectors .toList ());
149-                                   assertThat (interface1Methods )
144+                                   assertThat (wrapper .getMethods ())
150145                                      .hasSize (1 )
151146                                      .satisfies (
152147                                          method  -> {
@@ -156,8 +151,7 @@ void shouldWrapHelperTypes() {
156151                                          },
157152                                          atIndex (0 ));
158153                                  assertThat (wrapper .hasSuperTypes ()).isFalse ();
159-                                   assertThat (wrapper .getSuperTypes ().collect (Collectors .toList ()))
160-                                       .isEmpty ();
154+                                   assertThat (wrapper .getSuperTypes ()).isEmpty ();
161155                                },
162156                                atIndex (1 ));
163157                      },
@@ -166,11 +160,8 @@ void shouldWrapHelperTypes() {
166160            atIndex (0 ))
167161        .satisfies (
168162            interface2  -> {
169-               // interface2 assertions 
170163              assertThat (interface2 .isAbstract ()).isTrue ();
171-               List <HelperReferenceWrapper .Method > interface2Methods  =
172-                   interface2 .getMethods ().collect (Collectors .toList ());
173-               assertThat (interface2Methods )
164+               assertThat (interface2 .getMethods ())
174165                  .hasSize (1 )
175166                  .satisfies (
176167                      method  -> {
@@ -180,7 +171,7 @@ void shouldWrapHelperTypes() {
180171                      },
181172                      atIndex (0 ));
182173              assertThat (interface2 .hasSuperTypes ()).isFalse ();
183-               assertThat (interface2 .getSuperTypes (). collect ( Collectors . toList ()) ).isEmpty ();
174+               assertThat (interface2 .getSuperTypes ()).isEmpty ();
184175            },
185176            atIndex (1 ));
186177  }
0 commit comments