/** {@inheritDoc} */
 @Override
 public void setUp() throws Exception {
   super.setUp();
   LoggerUtil.setGlobalLevel(Level.OFF);
   this.expected = 123;
   this.message = new LongMessage(this.expected);
 }
 /** {@inheritDoc} */
 @Override
 public void start(BundleContext context) throws Exception {
   LoggerUtil.setGlobalLevel(Level.INFO);
   this.logger = Logger.getLogger(this.getClass().getCanonicalName());
   this.logger.info(
       Locale.getString(
           GroovySimpleMessageActivator.class, "ACTIVATING_GROOVYSIMPLEMESSAGE")); // $NON-NLS-1$
   context.registerService(JanusApplication.class.getName(), this, null);
 }
  /** {@inheritDoc} */
  @Override
  public void setUpUnitaryBench(AgentNumberBenchRun run) throws Exception {
    super.setUpUnitaryBench(run);
    Kernels.killAll();
    LoggerUtil.setLoggingEnable(false);
    Kernel kernel = Kernels.create();

    this.emitter = new Emitter();
    kernel.launchLightAgent(this.emitter, run.getNumberOfAgents());

    while (!this.emitter.getState().isAlive()) {
      Thread.yield();
    }
  }