### Question:
InterceptorService implements IInterceptorService, IInterceptorBroadcaster { @Override public boolean callHooks(Pointcut thePointcut, HookParams theParams) { assert haveAppropriateParams(thePointcut, theParams); assert thePointcut.getReturnType() == void.class || thePointcut.getReturnType() == boolean.class; Object retValObj = doCallHooks(thePointcut, theParams, true); return (Boolean) retValObj; } 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 testCallHooksInvokedWithWrongParameters() { InterceptorService svc = new InterceptorService(); Integer msg = 123; CanonicalSubscription subs = new CanonicalSubscription(); HookParams params = new HookParams(msg, subs); try { svc.callHooks(Pointcut.TEST_RB, params); fail(); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), containsString("Invalid params for pointcut " + Pointcut.TEST_RB + " - Wanted java.lang.String,java.lang.String but found ")); } }