MockControl mockContext = MockControl.createNiceControl(ServletContext.class);
ServletContext context = (ServletContext)mockContext.getMock();
ServletContextEvent event = new ServletContextEvent(context);
ServletContextHolderListener listener = new ServletContextHolderListener();
listener.contextInitialized(event);
assertSame(ServletContextHolderListener.getServletContext(), context);
listener.contextDestroyed(event);
assertNull(ServletContextHolderListener.getServletContext());