瀏覽代碼

SEC-3109: Fix web tests

Rob Winch 9 年之前
父節點
當前提交
4cc2ffaa2d

+ 3 - 3
web/src/test/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestFilterTests.java

@@ -319,7 +319,7 @@ public class SecurityContextHolderAwareRequestFilterTests {
         verify(asyncContext).start(runnableCaptor.capture());
         DelegatingSecurityContextRunnable wrappedRunnable = (DelegatingSecurityContextRunnable) runnableCaptor
                 .getValue();
-        assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, SecurityContext.class))
+        assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegateSecurityContext"))
                 .isEqualTo(context);
         assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegate"))
                 .isEqualTo(runnable);
@@ -346,7 +346,7 @@ public class SecurityContextHolderAwareRequestFilterTests {
         verify(asyncContext).start(runnableCaptor.capture());
         DelegatingSecurityContextRunnable wrappedRunnable = (DelegatingSecurityContextRunnable) runnableCaptor
                 .getValue();
-        assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, SecurityContext.class))
+        assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegateSecurityContext"))
                 .isEqualTo(context);
         assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegate"))
                 .isEqualTo(runnable);
@@ -373,7 +373,7 @@ public class SecurityContextHolderAwareRequestFilterTests {
         verify(asyncContext).start(runnableCaptor.capture());
         DelegatingSecurityContextRunnable wrappedRunnable = (DelegatingSecurityContextRunnable) runnableCaptor
                 .getValue();
-        assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, SecurityContext.class))
+        assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegateSecurityContext"))
                 .isEqualTo(context);
         assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegate"))
                 .isEqualTo(runnable);