@Test public void initTest() throws Exception { PowerMockito.mockStatic(LazyInitRegistration.class); LazyDelegateFilter<Filter> delegateFilter = new LazyDelegateFilter<Filter>(filterMock.getClass()); delegateFilter.delegate = filterMock; delegateFilter.init(filterConfigMock); assertSame(filterConfigMock, delegateFilter.filterConfig); verify(filterMock, times(0)).init(Mockito.any(FilterConfig.class)); PowerMockito.verifyStatic(LazyInitRegistration.class); LazyInitRegistration.lazyInit(delegateFilter); }
@Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; LazyInitRegistration.lazyInit(this); }
LazyDelegateFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; LazyInitRegistration.lazyInit(this); } }
LazyDelegateFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; LazyInitRegistration.lazyInit(this); } LazyDelegateFilter(Class<? extends T> delegateClass); }
LazyDelegateFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; LazyInitRegistration.lazyInit(this); } LazyDelegateFilter(Class<? extends T> delegateClass); void lazyInit(); @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy(); InitHook<T> getInitHook(); void setInitHook(InitHook<T> initHook); Class<? extends T> getDelegateClass(); }
LazyDelegateFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; LazyInitRegistration.lazyInit(this); } LazyDelegateFilter(Class<? extends T> delegateClass); void lazyInit(); @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy(); InitHook<T> getInitHook(); void setInitHook(InitHook<T> initHook); Class<? extends T> getDelegateClass();  }