title: my Google Guice method interceptor doesn't execute but Why?
body: <p>So I am testing a simple Google Guice interceptor - </p>
  
  <p>My Annotation - </p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD)
  public @interface AppOpsOperation {
  
  }
  </code></pre>
  
  <p>My Interceptor</p>
  
  <pre><code>public class AppOpsOperationDecorator implements MethodInterceptor {
  
      private ServiceCallStack callStack = null ;
  
      @Inject
      public void setServiceCallStack(ServiceCallStack stack ){
          callStack = stack ;
      }
  
      @Override
      public Object invoke(MethodInvocation arg0) throws Throwable {
  
          // Retrieve the call stack 
          // exclude service population if caller service is the same service 
          // else push the current service onto top of stack 
  
          System.out.println("Intercepting method  -- ::  " + arg0.getMethod().getName());
          System.out.println("On object             - ::  " + arg0.getThis().getClass().getName());
          System.out.println("On accessible object  - ::  " + arg0.getStaticPart().getClass().getName());
          return invocation.proceed();
      }
  
  }
  </code></pre>
  
  <p>And now my Service interface and method </p>
  
  <pre><code>public interface MockCalledService extends AppOpsService {
  
  @AppOpsOperation
  public String methodOneCalled(String some);
  
  @AppOpsOperation
  public String methodTwoCalled(String some);
  }
  
  public class MockCalledServiceImpl extends BaseAppOpsService implements MockCalledService {
  
  @Override
  @AppOpsOperation
  public String methodOneCalled(String some) {
      System.out.println("MockCalledServiceImpl.methodOneCalled()");
      return this.getClass().getCanonicalName() + "methodOneCalled";
  }
  
  @Override
  public String methodTwoCalled(String some) {
      System.out.println("MockCalledServiceImpl.methodTwoCalled()");
      return this.getClass().getCanonicalName() + "methodTwoCalled";
  }
  
  }
  </code></pre>
  
  <p>And my Guice test module </p>
  
  <pre><code>public class MockTestGuiceModule extends AbstractModule {
  
  @Override
  protected void configure() {
  
      bind(ServiceCallStack.class).toInstance(new ServiceCallStack());
  
      AppOpsOperationDecorator decorator = new AppOpsOperationDecorator() ;
  
      requestInjection(decorator);
  
      bindInterceptor(Matchers.any(), Matchers.annotatedWith(AppOpsOperation.class), 
               decorator);
  
      bind(MockCalledService.class).toInstance(new MockCalledServiceImpl());
  }
  
  }
  </code></pre>
  
  <p>This interceptor doesn't execute when I run the test below - </p>
  
  <pre><code>public class AppOpsOperationDecoratorTest {
  
  private Injector injector = null ;
  
  @Before
  public void init(){
      injector =  Guice.createInjector(new MockTestGuiceModule());
  }
  
  @Test
  public void testDecoratorInvocation() {
  
      MockCalledService called = injector.getInstance(MockCalledService.class);
  
      called.methodOneCalled("Test String");
  
  }
  
  }
  </code></pre>
  
  <p>Can you please highlight what I am doing wrong ?</p>