public void testAnnotateWithMixin() {
Aspects aspects = new Aspects();
aspects.interceptor(Pointcuts.instancesOf(SecureObject.class),
Pointcuts.ALL_METHODS, new AccessInterceptor((MethodAccessManager) callAccessManager.proxy()));
aspects.mixin(Pointcuts.instancesOf(SecureObject.class),
OwnableMixin.class, new Closure() {
public void execute(Object o) {
}
});
callAccessManager.expects(atLeastOnce()).method("checkPermission").will(returnValue(false));