Browse Source

Move @Mock annotations

Update a couple of tests to use the more traditional `@Mock` annotation
placement.

Issue gh-8945
Phillip Webb 5 years ago
parent
commit
1e840cc854

+ 2 - 1
aspects/src/test/java/org/springframework/security/access/intercept/aspectj/aspect/AnnotationSecurityAspectTests.java

@@ -59,7 +59,8 @@ public class AnnotationSecurityAspectTests {
 
 	private AffirmativeBased adm;
 
-	private @Mock AuthenticationManager authman;
+	@Mock
+	private AuthenticationManager authman;
 
 	private TestingAuthenticationToken anne = new TestingAuthenticationToken("anne", "", "ROLE_A");
 

+ 8 - 4
core/src/test/java/org/springframework/security/access/intercept/aspectj/AspectJMethodSecurityInterceptorTests.java

@@ -68,13 +68,17 @@ public class AspectJMethodSecurityInterceptorTests {
 
 	private AspectJMethodSecurityInterceptor interceptor;
 
-	private @Mock AccessDecisionManager adm;
+	@Mock
+	private AccessDecisionManager adm;
 
-	private @Mock MethodSecurityMetadataSource mds;
+	@Mock
+	private MethodSecurityMetadataSource mds;
 
-	private @Mock AuthenticationManager authman;
+	@Mock
+	private AuthenticationManager authman;
 
-	private @Mock AspectJCallback aspectJCallback;
+	@Mock
+	private AspectJCallback aspectJCallback;
 
 	private ProceedingJoinPoint joinPoint;