Advised advised = (Advised) myObject;Advisor[] advisors =advised.getAdvisors();int oldAdvisorCount =advisors.length;System.out.println(oldAdvisorCount +" advisors");// Add an advice like an interceptor without a pointcut// Will match all proxied methods// Can use for interceptors, before, after returning or throws adviceadvised.addAdvice(newDebugInterceptor());// Add selective advice using a pointcutadvised.addAdvisor(newDefaultPointcutAdvisor(mySpecialPointcut, myAdvice));assertEquals("Added two advisors", oldAdvisorCount +2,advised.getAdvisors().length);