<commit_before>package org.squbs.testkit

import akka.testkit.{ImplicitSender, TestKit}
import org.scalatest.{Suite, BeforeAndAfterAll}
import org.squbs.unicomplex.{Bootstrap, Unicomplex}

/**
 * Copyright (c) 2013 eBay, Inc.
 * All rights reserved.
 *
 * Contributors:
 * asucharitakul
 */
abstract class SqubsTestKit extends TestKit(Unicomplex.actorSystem) with ImplicitSender with Suite with BeforeAndAfterAll {

  override protected def beforeAll() {
    Bootstrap.main(Array.empty[String])
  }

  override protected def afterAll() {
    Unicomplex.actorSystem.shutdown()
  }
}<commit_msg>1. Removed JUnit runner - not needed. 2. Ensured SqubsTestKit object is initialized and terminated only once.<commit_after>package org.squbs.testkit

import akka.testkit.{ImplicitSender, TestKit}
import org.scalatest.{Suite, BeforeAndAfterAll}
import org.squbs.unicomplex.{Bootstrap, Unicomplex}

/**
 * Copyright (c) 2013 eBay, Inc.
 * All rights reserved.
 *
 * Contributors:
 * asucharitakul
 */
object SqubsTestKit {
  sys.addShutdownHook {
    Unicomplex.actorSystem.shutdown()
  }
  Bootstrap.main(Array.empty[String])

  private def checkInit(instance: SqubsTestKit) {
    // No op. Just need to ensure SqubsTestKit object is initialized.
  }
}

abstract class SqubsTestKit extends TestKit(Unicomplex.actorSystem)
with ImplicitSender with Suite with BeforeAndAfterAll {

  override protected def beforeAll() {
    SqubsTestKit.checkInit(this)
  }
}
{'fraction_non_alphanumeric': 0.09530386740331492, 'fraction_numerical': 0.006906077348066298, 'mean_word_length': 4.7047244094488185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6958833', 'n_tokens_mistral': 489, 'n_tokens_neox': 461, 'n_words': 113}