### Question:
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);  }### Answer:
@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); }
@Test public void notInvokedWhenMatcherDoesntMatch() { when(matcher.matches(Matchers.<ExecutionContext>any(), Matchers.<OperationKey>any(), Matchers.<Object[]>any())).thenReturn(false); matchingInterceptor.invoke(null, key, null, null); verify(processor, never()).invoke(null, key, null, null); }