@Override
 protected void onSetUp() throws Exception {
   System.out.println("onSetUp");
   super.onSetUp();
   //
   System.setProperty("red5.deployment.type", "junit");
   if (pss == null) {
     pss = (PlaylistSubscriberStream) applicationContext.getBean("playlistSubscriberStream");
     //
     pss.setBandwidthController(
         (IBWControlService) applicationContext.getBean(IBWControlService.KEY));
     //
     Context ctx = new Context();
     ctx.setApplicationContext(applicationContext);
     Scope scope = new DummyScope();
     scope.setName("");
     scope.setContext(ctx);
     pss.setScope(scope);
     //
     ISchedulingService schedulingService =
         (ISchedulingService) applicationContext.getBean(ISchedulingService.BEAN_NAME);
     IConsumerService consumerService =
         (IConsumerService) applicationContext.getBean(IConsumerService.KEY);
     IProviderService providerService =
         (IProviderService) applicationContext.getBean(IProviderService.BEAN_NAME);
     // create and get the engine
     PlayEngine engine = pss.createEngine(schedulingService, consumerService, providerService);
     // mock the message output
     engine.setMessageOut(new DummyMessageOut());
   }
 }
 protected void onSetUp() throws Exception {
   System.out.println("setup");
   adCodeProcessor =
       (AdCodeProcessor) ContextAwareSpringBean.APP_CONTEXT.getBean("adCodeProcessor");
   bannerDAO = (IBannerDAO) ContextAwareSpringBean.APP_CONTEXT.getBean("bannerDAO1");
   adPlaceDAO = (IAdPlaceDAO) ContextAwareSpringBean.APP_CONTEXT.getBean("adPlaceDAO1");
   dataSource = (DataSource) ContextAwareSpringBean.APP_CONTEXT.getBean("dataSource1");
   jdbcTemplate = new JdbcTemplate(dataSource);
   Properties appProps = new Properties();
   InputStream is = this.getClass().getClassLoader().getResourceAsStream("app.properties");
   appProps.load(is);
   ApplicationConstants.AD_FORMATS_MAP = ApplicationConstants.initializeAdFormats(appProps);
   super.onSetUp();
 }
 @Override
 protected void onTearDown() throws Exception {
   System.out.println("onTearDown");
   super.onTearDown();
 }
 @Override
 protected void onSetUp() throws Exception {
   counterAspect.reset();
   super.onSetUp();
 }
 protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory) {
   beanFactory.registerCustomEditor(Dictionary.class, PropertiesEditor.class);
   super.customizeBeanFactory(beanFactory);
 }
 protected void onSetUp() throws Exception {
   testAspectForTestImpl1.count = 0;
   testAspectForAbstractTestImpl.count = 0;
   testInterceptor.count = 0;
   super.onSetUp();
 }