### Question:
RaveContextLoaderListener extends ContextLoaderListener { @Override public void contextInitialized(ServletContextEvent event) { super.contextInitialized(event); WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(event.getServletContext()); OverridablePropertyPlaceholderConfigurer configurer = (OverridablePropertyPlaceholderConfigurer) context.getBean(PORTAL_PROPERTY_PLACEHOLDER_BEAN_NAME); event.getServletContext().setAttribute(APPLICATION_PROPERTIES_KEY, configurer.getResolvedProps()); }  @Override void contextInitialized(ServletContextEvent event);  }### Answer:
@Test public void contextInitialized() { raveContextLoaderListener.contextInitialized(servletContextEvent); @SuppressWarnings("unchecked") Map<String, String> props = (Map<String, String>) servletContextEvent.getServletContext().getAttribute("applicationProperties"); assertThat(props.size(), is(2)); assertThat(props.get("portal.testprop1"), is("hello")); assertThat(props.get("portal.testprop2"), is("goodbye")); }