@Test public void testAddFilter() throws Exception { final Target target = mock(Target.class); final FilterManager filterManager = new FilterManager(); verifyZeroInteractions(target); final Filter filter = mock(Filter.class); when(filter.execute(any(Order.class))).thenReturn("filter"); filterManager.addFilter(filter); final Order order = mock(Order.class); assertEquals("filter", filterManager.filterRequest(order)); verify(filter, times(1)).execute(any(Order.class)); verifyZeroInteractions(target, filter, order); }
public void addFilter(Filter filter) { filterChain.addFilter(filter); }
FilterManager { public void addFilter(Filter filter) { filterChain.addFilter(filter); } }
FilterManager { public void addFilter(Filter filter) { filterChain.addFilter(filter); } FilterManager(); }
FilterManager { public void addFilter(Filter filter) { filterChain.addFilter(filter); } FilterManager(); void addFilter(Filter filter); String filterRequest(Order order); }
FilterManager { public void addFilter(Filter filter) { filterChain.addFilter(filter); } FilterManager(); void addFilter(Filter filter); String filterRequest(Order order);  }