### Question:
SwitchInterceptor implements Interceptor, Serializable { @Override public Object intercept(Invocation invocation) throws Throwable { for (Pair<InvocationMatcher, Interceptor> currentCase : cases) { if (currentCase.getLeft().matches(invocation)) { return currentCase.getRight().intercept(invocation); } } return invocation.proceed(); } SwitchInterceptor(); @Override Object intercept(Invocation invocation); CaseBuilder when(InvocationMatcher matcher);  }### Answer:
@Test public void testWithNoAdvice() throws Throwable { SwitchInterceptor interceptor = new SwitchInterceptor(); Method method = Echo.class.getMethod("echoBack", String.class); Invocation invocation = new MockInvocation(method, "foo", "foo"); assertEquals("foo", interceptor.intercept(invocation)); }