public void testAdvisorReturnsTrueWhenMethodInvocationIsDefined()
throws Exception {
Class<TargetObject> clazz = TargetObject.class;
Method method = clazz.getMethod("countLength", new Class[] {String.class});
MethodSecurityMetadataSource mds = mock(MethodSecurityMetadataSource.class);
when(mds.getAttributes(method, clazz)).thenReturn(SecurityConfig.createList("ROLE_A"));
MethodSecurityMetadataSourceAdvisor advisor = new MethodSecurityMetadataSourceAdvisor("", mds ,"");
assertTrue(advisor.getPointcut().getMethodMatcher().matches(method, clazz));
}