### Question:
SpringFacesIntegration extends WebApplicationObjectSupport implements
		ApplicationListener<ContextRefreshedEvent> { public static void postConstructApplicationEvent(ExternalContext externalContext, Application application) { externalContext.getApplicationMap().put(APPLICATION_ATTRIBUTE, application); if (isInstalled(externalContext)) { getCurrentInstance(externalContext).publishPostConstructApplicationEvent(application); } }  void onApplicationEvent(ContextRefreshedEvent event); static boolean isInstalled(ServletContext servletContext); static boolean isInstalled(ExternalContext externalContext); static Date getLastRefreshedDate(ServletContext servletContext); static Date getLastRefreshedDate(ExternalContext externalContext); static SpringFacesIntegration getCurrentInstance(ServletContext servletContext); static SpringFacesIntegration getCurrentInstance(ExternalContext externalContext); static void postConstructApplicationEvent(ExternalContext externalContext, Application application);  }### Answer:
@Test public void shouldPublishPostConstructApplicationEventWhenSpringFirst() throws Exception { createSpringFacesIntegration(); Application application = mock(Application.class); SpringFacesIntegration.postConstructApplicationEvent(this.externalContext, application); verify(this.applicationContext).publishEvent(this.applicationEventCaptor.capture()); assertThat(this.applicationEventCaptor.getValue().getSource(), is(sameInstance((Object) application))); }