@Test public void invokedWhenMatcherMatches() { when(matcher.matches(Matchers.<ExecutionContext>any(), Matchers.<OperationKey>any(), Matchers.<Object[]>any())).thenReturn(true); matchingInterceptor.invoke(null, key, null, null); verify(processor).invoke(null, key, null, null); }
@Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result) { if (matcher == null || matcher.matches(ctx, key, args)) { return postProcessor.invoke(ctx, key, args, result); } return new InterceptorResult(InterceptorState.CONTINUE); }
PostMatchingInterceptor implements ExecutionPostProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result) { if (matcher == null || matcher.matches(ctx, key, args)) { return postProcessor.invoke(ctx, key, args, result); } return new InterceptorResult(InterceptorState.CONTINUE); } }
PostMatchingInterceptor implements ExecutionPostProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result) { if (matcher == null || matcher.matches(ctx, key, args)) { return postProcessor.invoke(ctx, key, args, result); } return new InterceptorResult(InterceptorState.CONTINUE); } PostMatchingInterceptor(ExecutionPostProcessor postProcessor); }
PostMatchingInterceptor implements ExecutionPostProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result) { if (matcher == null || matcher.matches(ctx, key, args)) { return postProcessor.invoke(ctx, key, args, result); } return new InterceptorResult(InterceptorState.CONTINUE); } PostMatchingInterceptor(ExecutionPostProcessor postProcessor); @Override InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result); @Override String getName(); void setMatcher(Matcher matcher); }
PostMatchingInterceptor implements ExecutionPostProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result) { if (matcher == null || matcher.matches(ctx, key, args)) { return postProcessor.invoke(ctx, key, args, result); } return new InterceptorResult(InterceptorState.CONTINUE); } PostMatchingInterceptor(ExecutionPostProcessor postProcessor); @Override InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args, ExecutionResult result); @Override String getName(); void setMatcher(Matcher matcher);  }