SolutionContextListener implements ServletContextListener { public void contextDestroyed( final ServletContextEvent event ) { PentahoSystem.shutdown(); if ( LocaleHelper.getLocale() == null ) { LocaleHelper.setLocale( Locale.getDefault() ); } logger.info( Messages.getInstance().getString( "SolutionContextListener.INFO_SYSTEM_EXITING" ) ); }  void contextInitialized( final ServletContextEvent event ); void showInitializationMessage( final boolean initOk, final String fullyQualifiedServerUrl ); void contextDestroyed( final ServletContextEvent event );  }
@Test public void testContextDestroyed() throws Exception { solutionContextListener.contextDestroyed( contextEvent ); assertEquals( PentahoSystem.SYSTEM_NOT_INITIALIZED, PentahoSystem.getInitializedStatus() ); }