1515 */
1616package org .openrewrite .java ;
1717
18- import org .junit .jupiter .api .Disabled ;
1918import org .junit .jupiter .api .Test ;
2019import org .junit .jupiter .params .ParameterizedTest ;
2120import org .junit .jupiter .params .provider .CsvSource ;
3029
3130import java .util .HashSet ;
3231import java .util .List ;
32+ import java .util .Set ;
3333import java .util .function .Consumer ;
3434
3535import static java .util .Collections .emptySet ;
@@ -80,9 +80,11 @@ private static Consumer<RecipeSpec> baseTest(String scope, String expected) {
8080 @ Override
8181 public J .CompilationUnit visitCompilationUnit (J .CompilationUnit cu , ExecutionContext executionContext ) {
8282 J .CompilationUnit c = super .visitCompilationUnit (cu , executionContext );
83- //noinspection RedundantCast
84- assertThat (getCursor ().getMessage ("variables" , emptySet ()))
85- .containsExactlyInAnyOrder ((Object []) expected .split ("," ));
83+ Set <String > variables = getCursor ().getMessage ("variables" );
84+ if (variables != null ) {
85+ assertThat (variables )
86+ .containsExactlyInAnyOrder (expected .split ("," ));
87+ }
8688 return c ;
8789 }
8890
@@ -98,7 +100,6 @@ public J.Identifier visitIdentifier(J.Identifier identifier, ExecutionContext p)
98100 }));
99101 }
100102
101- @ Disabled
102103 @ Test
103104 void doNotAddPackagePrivateNameFromSuperClass () {
104105 rewriteRun (
@@ -364,7 +365,6 @@ public Integer get() {
364365 );
365366 }
366367
367- @ Disabled
368368 @ Test
369369 void superClass () {
370370 rewriteRun (
0 commit comments