@Test
public void testOnStartup() throws Exception
{

    WarInitializer warInitializer = new WarInitializer();
    // Create a mock servlet context.
    ServletContext servletContext = new ExtendedMockServletContext();
    // Call the various init methods of the WAR initializer to make sure they don't throw exceptions.
    // Since everything is mocked that the WAR initializer modifies, there's no real way to validate it so we'll consider the methods not throwing
    // an exception a successful test case.
    // Note that we are NOT calling the initContextLoaderListener method because the application JUnits will set the application context for us.
    // If we re-initialize it here, other JUnits could fail.
    warInitializer.initDispatchServlet(servletContext);
    warInitializer.initDelegatingFilterProxy(servletContext);
    warInitializer.initLog4JMdcLoggingFilter(servletContext);
    warInitializer.initCharacterEncodingFilter(servletContext);
    warInitializer.initRequestLoggingFilter(servletContext);
    warInitializer.initServletMapping(servletContext);
}