@Test public void setApplicationContextTest() { PowerMockito.mockStatic(LazyInitRegistration.class); LazyInitRegistration.register(lazyDelegateFilterMock); Set<LazyDelegateFilter<? extends Filter>> registrations = new HashSet<LazyDelegateFilter<? extends Filter>>(); registrations.add(lazyDelegateFilterMock); when(LazyInitRegistration.getRegistrations()).thenReturn(registrations); new LazyInitRegistration().setApplicationContext(applicationContextMock); assertEquals(LazyInitRegistration.APPLICATION_CONTEXT, applicationContextMock); PowerMockito.verifyStatic(LazyInitRegistration.class); LazyInitRegistration.lazyInit(lazyDelegateFilterMock); }
@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { APPLICATION_CONTEXT = applicationContext; for (LazyDelegateFilter<? extends Filter> lazyDelegateFilter : getRegistrations()) { lazyInit(lazyDelegateFilter); } }
LazyInitRegistration implements ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { APPLICATION_CONTEXT = applicationContext; for (LazyDelegateFilter<? extends Filter> lazyDelegateFilter : getRegistrations()) { lazyInit(lazyDelegateFilter); } } }
LazyInitRegistration implements ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { APPLICATION_CONTEXT = applicationContext; for (LazyDelegateFilter<? extends Filter> lazyDelegateFilter : getRegistrations()) { lazyInit(lazyDelegateFilter); } }  }
LazyInitRegistration implements ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { APPLICATION_CONTEXT = applicationContext; for (LazyDelegateFilter<? extends Filter> lazyDelegateFilter : getRegistrations()) { lazyInit(lazyDelegateFilter); } }  @Override void setApplicationContext(ApplicationContext applicationContext); }
LazyInitRegistration implements ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { APPLICATION_CONTEXT = applicationContext; for (LazyDelegateFilter<? extends Filter> lazyDelegateFilter : getRegistrations()) { lazyInit(lazyDelegateFilter); } }  @Override void setApplicationContext(ApplicationContext applicationContext);  }