diff --git a/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java b/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java
index 094faba..49a0cbf 100644
--- a/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java
+++ b/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java
@@ -116,8 +116,11 @@ public abstract class TestApiBase {
@AfterClass(alwaysRun=true)
public void tearDown() {
try {
- busService.getBus().register(testListener);
+ busService.getBus().unregister(testListener);
((DefaultBusService) busService).stopBus();
+ if (helper != null) {
+ helper.stopMysql();
+ }
} catch (Exception e) {
log.warn("Failed to tearDown test properly ", e);
}