### Question:
InterceptorService implements IInterceptorService, IInterceptorBroadcaster { @Override public boolean registerInterceptor(Object theInterceptor) { synchronized (myRegistryMutex) { if (isInterceptorAlreadyRegistered(theInterceptor)) { return false; } List<HookInvoker> addedInvokers = scanInterceptorAndAddToInvokerMultimap(theInterceptor, myGlobalInvokers); if (addedInvokers.isEmpty()) { ourLog.warn("Interceptor registered with no valid hooks - Type was: {}", theInterceptor.getClass().getName()); return false; } myInterceptors.add(theInterceptor); sortByOrderAnnotation(myInterceptors); return true; } } InterceptorService();  InterceptorService(String theName); boolean isThreadlocalInvokersEnabled(); void setThreadlocalInvokersEnabled(boolean theThreadlocalInvokersEnabled); @Override @VisibleForTesting void registerAnonymousInterceptor(Pointcut thePointcut, IAnonymousInterceptor theInterceptor); void setName(String theName); @Override void registerAnonymousInterceptor(Pointcut thePointcut, int theOrder, IAnonymousInterceptor theInterceptor); @Override List<Object> getAllRegisteredInterceptors(); @Override @VisibleForTesting void unregisterAllInterceptors(); @Override void unregisterInterceptors(@Nullable Collection<?> theInterceptors); @Override void registerInterceptors(@Nullable Collection<?> theInterceptors); @Override void unregisterInterceptorsIf(Predicate<Object> theShouldUnregisterFunction); @Override boolean registerThreadLocalInterceptor(Object theInterceptor); @Override void unregisterThreadLocalInterceptor(Object theInterceptor); @Override boolean registerInterceptor(Object theInterceptor); @Override boolean unregisterInterceptor(Object theInterceptor); @Override Object callHooksAndReturnObject(Pointcut thePointcut, HookParams theParams); @Override boolean hasHooks(Pointcut thePointcut); @Override boolean callHooks(Pointcut thePointcut, HookParams theParams);  }### Answer:
@Test public void testInterceptorWithAnnotationDefinedOnInterface() { InterceptorService svc = new InterceptorService(); TestInterceptorWithAnnotationDefinedOnInterface_Class interceptor = new TestInterceptorWithAnnotationDefinedOnInterface_Class(); svc.registerInterceptor(interceptor); assertEquals(1, interceptor.getRegisterCount()); }