diff --git a/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java b/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java index 9f812ebf3a..fd6f51b5ce 100644 --- a/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java +++ b/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java @@ -3,14 +3,15 @@ package org.springframework.security.intercept.method.aopalliance; import org.junit.After; import org.junit.Test; import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.security.AccessDeniedException; +import org.springframework.security.AuthenticationCredentialsNotFoundException; import org.springframework.security.ITargetObject; import org.springframework.security.util.InMemoryXmlApplicationContext; /** * Tests for SEC-428. * - * @author Luke Taylor - * + * @author Luke Taylor */ public class MethodSecurityInterceptorWithAopConfigTests { static final String AUTH_PROVIDER_XML = @@ -38,7 +39,7 @@ public class MethodSecurityInterceptorWithAopConfigTests { } } - @Test + @Test(expected=AuthenticationCredentialsNotFoundException.class) public void securityInterceptorIsAppliedWhenUsedWithAopConfig() { setContext( "" +