@Test
public void shutdown() throws Exception {

  MicroPlatform microPlatform = MicroPlatformFactory.create();
  final IPentahoAsyncExecutor asyncExecutor = mock( IPentahoAsyncExecutor.class );
  final IReportContentCache cache = mock( IReportContentCache.class );
  final AsyncSystemListener asyncSystemListener = new AsyncSystemListener();
  microPlatform.define( "IPentahoAsyncExecutor", asyncExecutor );
  microPlatform.define( "IReportContentCache", cache );
  microPlatform.addLifecycleListener( asyncSystemListener );
  microPlatform.start();
  microPlatform.stop();
  verify( asyncExecutor, times( 1 ) ).shutdown();
  verify( cache, times( 1 ) ).cleanup();
  microPlatform = null;
}