ClearCacheAction implements Runnable { @Override public void run() { final IPluginCacheManager iPluginCacheManager = PentahoSystem.get( IPluginCacheManager.class ); if ( iPluginCacheManager != null ) { final IReportContentCache cache = iPluginCacheManager.getCache(); if ( cache != null ) { cache.cleanup(); } } }  @Override void run();  }
@Test public void runNoBean() { new ClearCacheAction().run(); }
@Test public void run() { final IReportContentCache mock = mock( IReportContentCache.class ); PentahoSystem.registerObject( new PluginCacheManagerImpl( mock ), IPluginCacheManager.class ); new ClearCacheAction().run(); verify( mock, times( 1 ) ).cleanup(); PentahoSystem.shutdown(); }