killbill-memoizeit

invoice: update tests setup * Add logging around each test *

7/7/2012 10:02:56 PM

Changes

Details

diff --git a/invoice/src/test/java/com/ning/billing/invoice/api/migration/TestDefaultInvoiceMigrationApi.java b/invoice/src/test/java/com/ning/billing/invoice/api/migration/TestDefaultInvoiceMigrationApi.java
index cdc620b..5ce310f 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/api/migration/TestDefaultInvoiceMigrationApi.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/api/migration/TestDefaultInvoiceMigrationApi.java
@@ -23,14 +23,11 @@ import java.util.UUID;
 
 import org.joda.time.DateTime;
 import org.mockito.Mockito;
-import org.skife.jdbi.v2.Handle;
-import org.skife.jdbi.v2.IDBI;
-import org.skife.jdbi.v2.TransactionCallback;
-import org.skife.jdbi.v2.TransactionStatus;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.Guice;
 import org.testng.annotations.Test;
@@ -44,13 +41,11 @@ import com.ning.billing.catalog.api.BillingPeriod;
 import com.ning.billing.catalog.api.Currency;
 import com.ning.billing.catalog.api.Plan;
 import com.ning.billing.catalog.api.PlanPhase;
-import com.ning.billing.dbi.MysqlTestingHelper;
 import com.ning.billing.entitlement.api.SubscriptionTransitionType;
 import com.ning.billing.entitlement.api.billing.BillingModeType;
 import com.ning.billing.entitlement.api.user.Subscription;
 import com.ning.billing.invoice.InvoiceDispatcher;
 import com.ning.billing.invoice.MockBillingEventSet;
-import com.ning.billing.invoice.TestInvoiceDispatcher;
 import com.ning.billing.invoice.api.Invoice;
 import com.ning.billing.invoice.api.InvoiceMigrationApi;
 import com.ning.billing.invoice.api.InvoiceNotifier;
@@ -71,11 +66,10 @@ import com.ning.billing.util.callcontext.UserType;
 import com.ning.billing.util.clock.Clock;
 import com.ning.billing.util.clock.ClockMock;
 import com.ning.billing.util.globallocker.GlobalLocker;
-import com.ning.billing.util.io.IOUtils;
 
 @Guice(modules = {MockModuleNoEntitlement.class})
 public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
-    final Logger log = LoggerFactory.getLogger(TestDefaultInvoiceMigrationApi.class);
+    private final Logger log = LoggerFactory.getLogger(TestDefaultInvoiceMigrationApi.class);
 
     @Inject
     InvoiceUserApi invoiceUserApi;
@@ -85,13 +79,12 @@ public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
 
     @Inject
     private InvoiceGenerator generator;
+
     @Inject
     private InvoiceDao invoiceDao;
-    @Inject
-    private GlobalLocker locker;
 
     @Inject
-    private MysqlTestingHelper helper;
+    private GlobalLocker locker;
 
     @Inject
     private BusService busService;
@@ -114,48 +107,23 @@ public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
     private UUID migrationInvoiceId;
     private UUID regularInvoiceId;
 
-    private IDBI dbi;
-
     private static final BigDecimal MIGRATION_INVOICE_AMOUNT = new BigDecimal("100.00");
     private static final Currency MIGRATION_INVOICE_CURRENCY = Currency.USD;
 
     private final Clock clock = new ClockMock();
 
-    //@BeforeTest(groups = {"slow"})
-    public void cleanup() {
-        if (dbi != null) {
-            dbi.inTransaction(new TransactionCallback<Void>() {
-                @Override
-                public Void inTransaction(final Handle h, final TransactionStatus status)
-                        throws Exception {
-                    h.execute("truncate table invoices");
-                    h.execute("truncate table invoice_items");
-                    h.execute("truncate table invoice_payments");
-                    return null;
-                }
-            });
-        }
+    @BeforeSuite(groups = "slow")
+    public void setup() throws Exception {
+        busService.getBus().start();
     }
 
-    @BeforeSuite(groups = {"slow"})
-    public void setup() throws Exception {
-        log.info("Starting set up");
+    @BeforeMethod(groups = "slow")
+    public void setupMethod() throws Exception {
         accountId = UUID.randomUUID();
         subscriptionId = UUID.randomUUID();
         date_migrated = clock.getUTCNow().minusYears(1);
         date_regular = clock.getUTCNow();
 
-        final String invoiceDdl = IOUtils.toString(TestInvoiceDispatcher.class.getResourceAsStream("/com/ning/billing/invoice/ddl.sql"));
-        final String utilDdl = IOUtils.toString(TestInvoiceDispatcher.class.getResourceAsStream("/com/ning/billing/util/ddl.sql"));
-
-        helper.startMysql();
-
-        helper.initDb(invoiceDdl);
-        helper.initDb(utilDdl);
-        dbi = helper.getDBI();
-        cleanup();
-        busService.getBus().start();
-
         account = Mockito.mock(Account.class);
         Mockito.when(accountUserApi.getAccountById(accountId)).thenReturn(account);
         Mockito.when(account.getCurrency()).thenReturn(Currency.USD);
@@ -166,11 +134,10 @@ public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
         regularInvoiceId = generateRegularInvoice();
     }
 
-    @AfterSuite(groups = {"slow"})
+    @AfterSuite(groups = "slow")
     public void tearDown() {
         try {
             ((DefaultBusService) busService).stopBus();
-            helper.stopMysql();
         } catch (Exception e) {
             log.warn("Failed to tearDown test properly ", e);
         }
@@ -232,7 +199,7 @@ public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
         return invoice.getId();
     }
 
-    @Test(groups = {"slow"}, enabled = true)
+    @Test(groups = "slow")
     public void testUserApiAccess() {
         final List<Invoice> byAccount = invoiceUserApi.getInvoicesByAccount(accountId);
         Assert.assertEquals(byAccount.size(), 1);
@@ -247,7 +214,7 @@ public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
     }
 
     // Check migration invoice IS returned for payment api calls
-    @Test(groups = {"slow"}, enabled = true)
+    @Test(groups = "slow")
     public void testPaymentApi() {
         final List<Invoice> allByAccount = invoicePaymentApi.getAllInvoicesByAccount(accountId);
         Assert.assertEquals(allByAccount.size(), 2);
@@ -256,7 +223,7 @@ public class TestDefaultInvoiceMigrationApi extends InvoicingTestBase {
     }
 
     // ACCOUNT balance should reflect total of migration and non-migration invoices
-    @Test(groups = {"slow"}, enabled = true)
+    @Test(groups = "slow")
     public void testBalance() {
         final Invoice migrationInvoice = invoiceDao.getById(migrationInvoiceId);
         final Invoice regularInvoice = invoiceDao.getById(regularInvoiceId);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/api/MockInvoicePaymentApi.java b/invoice/src/test/java/com/ning/billing/invoice/api/MockInvoicePaymentApi.java
index dbd1f08..87183b4 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/api/MockInvoicePaymentApi.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/api/MockInvoicePaymentApi.java
@@ -170,7 +170,6 @@ public class MockInvoicePaymentApi implements InvoicePaymentApi {
     public InvoicePayment createRefund(UUID paymentId,
             BigDecimal amount, boolean isInvoiceAdjusted, UUID paymentCookieId, CallContext context)
             throws InvoiceApiException {
-        // TODO Auto-generated method stub
         return null;
     }
 }
diff --git a/invoice/src/test/java/com/ning/billing/invoice/api/user/TestEventJson.java b/invoice/src/test/java/com/ning/billing/invoice/api/user/TestEventJson.java
index 1dff8cb..848a8e6 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/api/user/TestEventJson.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/api/user/TestEventJson.java
@@ -13,6 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
+
 package com.ning.billing.invoice.api.user;
 
 import java.math.BigDecimal;
@@ -23,14 +24,15 @@ import org.testng.Assert;
 import org.testng.annotations.Test;
 
 import com.ning.billing.catalog.api.Currency;
-import com.ning.billing.invoice.api.NullInvoiceEvent;
+import com.ning.billing.invoice.InvoiceTestSuite;
 import com.ning.billing.invoice.api.InvoiceCreationEvent;
+import com.ning.billing.invoice.api.NullInvoiceEvent;
 import com.ning.billing.util.jackson.ObjectMapper;
 
-public class TestEventJson {
+public class TestEventJson extends InvoiceTestSuite {
     private final ObjectMapper mapper = new ObjectMapper();
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testInvoiceCreationEvent() throws Exception {
 
         final InvoiceCreationEvent e = new DefaultInvoiceCreationEvent(UUID.randomUUID(), UUID.randomUUID(), new BigDecimal(12.0), Currency.USD, new DateTime(), UUID.randomUUID());
@@ -42,7 +44,7 @@ public class TestEventJson {
         Assert.assertTrue(obj.equals(e));
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testEmptyInvoiceEvent() throws Exception {
 
         final NullInvoiceEvent e = new DefaultNullInvoiceEvent(UUID.randomUUID(), new DateTime(), UUID.randomUUID());
diff --git a/invoice/src/test/java/com/ning/billing/invoice/dao/InvoiceDaoTestBase.java b/invoice/src/test/java/com/ning/billing/invoice/dao/InvoiceDaoTestBase.java
index c1c40af..78db034 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/dao/InvoiceDaoTestBase.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/dao/InvoiceDaoTestBase.java
@@ -27,6 +27,7 @@ import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 
+import com.ning.billing.KillbillTestSuiteWithEmbeddedDB;
 import com.ning.billing.config.InvoiceConfig;
 import com.ning.billing.dbi.MysqlTestingHelper;
 import com.ning.billing.invoice.generator.DefaultInvoiceGenerator;
@@ -42,7 +43,6 @@ import com.ning.billing.util.callcontext.CallContext;
 import com.ning.billing.util.callcontext.TestCallContext;
 import com.ning.billing.util.clock.Clock;
 import com.ning.billing.util.clock.ClockMock;
-import com.ning.billing.util.io.IOUtils;
 import com.ning.billing.util.tag.api.DefaultTagUserApi;
 import com.ning.billing.util.tag.api.user.TagEventBuilder;
 import com.ning.billing.util.tag.dao.AuditedTagDao;
@@ -57,7 +57,6 @@ public class InvoiceDaoTestBase extends InvoicingTestBase {
     protected final TagEventBuilder tagEventBuilder = new TagEventBuilder();
 
     protected IDBI dbi;
-    private MysqlTestingHelper mysqlTestingHelper;
     protected InvoiceDao invoiceDao;
     protected InvoiceItemSqlDao invoiceItemSqlDao;
     protected InvoicePaymentSqlDao invoicePaymentDao;
@@ -98,23 +97,16 @@ public class InvoiceDaoTestBase extends InvoicingTestBase {
         }
     }
 
-    @BeforeClass(groups={"slow"})
+    @BeforeClass(groups = "slow")
     protected void setup() throws IOException {
 
         loadSystemPropertiesFromClasspath("/resource.properties");
 
-        mysqlTestingHelper = new MysqlTestingHelper();
+        final MysqlTestingHelper mysqlTestingHelper = KillbillTestSuiteWithEmbeddedDB.getMysqlTestingHelper();
         dbi = mysqlTestingHelper.getDBI();
 
-        final String invoiceDdl = IOUtils.toString(DefaultInvoiceDao.class.getResourceAsStream("/com/ning/billing/invoice/ddl.sql"));
-        final String utilDdl = IOUtils.toString(DefaultInvoiceDao.class.getResourceAsStream("/com/ning/billing/util/ddl.sql"));
-
         clock = new ClockMock();
 
-        mysqlTestingHelper.startMysql();
-        mysqlTestingHelper.initDb(invoiceDdl);
-        mysqlTestingHelper.initDb(utilDdl);
-
         bus = new InMemoryBus();
         bus.start();
 
@@ -128,34 +120,15 @@ public class InvoiceDaoTestBase extends InvoicingTestBase {
         invoiceItemSqlDao = dbi.onDemand(InvoiceItemSqlDao.class);
         invoicePaymentDao = dbi.onDemand(InvoicePaymentSqlDao.class);
 
-
-
         context = new TestCallContext("Invoice Dao Tests");
         generator = new DefaultInvoiceGenerator(clock, invoiceConfig);
 
-
-
         assertTrue(true);
     }
 
-    @BeforeMethod(groups={"slow"})
-    public void cleanupData() {
-        dbi.inTransaction(new TransactionCallback<Void>() {
-            @Override
-            public Void inTransaction(final Handle h, final TransactionStatus status)
-                    throws Exception {
-                h.execute("truncate table invoices");
-                h.execute("truncate table invoice_items");
-                h.execute("truncate table invoice_payments");
-                return null;
-            }
-        });
-    }
-
-    @AfterClass(groups={"slow"})
+    @AfterClass(groups = "slow")
     protected void tearDown() {
         bus.stop();
-        mysqlTestingHelper.stopMysql();
         assertTrue(true);
     }
 }
diff --git a/invoice/src/test/java/com/ning/billing/invoice/dao/TestDefaultInvoiceDao.java b/invoice/src/test/java/com/ning/billing/invoice/dao/TestDefaultInvoiceDao.java
index 169f2ff..e0f3ea0 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/dao/TestDefaultInvoiceDao.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/dao/TestDefaultInvoiceDao.java
@@ -25,6 +25,7 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import com.ning.billing.invoice.InvoiceTestSuite;
 import com.ning.billing.invoice.notification.NextBillingDatePoster;
 import com.ning.billing.util.api.TagUserApi;
 import com.ning.billing.util.callcontext.CallContext;
@@ -37,7 +38,7 @@ import com.ning.billing.util.tag.dao.MockTagDefinitionDao;
 import com.ning.billing.util.tag.dao.TagDao;
 import com.ning.billing.util.tag.dao.TagDefinitionDao;
 
-public class TestDefaultInvoiceDao {
+public class TestDefaultInvoiceDao extends InvoiceTestSuite {
     private TagUserApi tagUserApi;
     private DefaultInvoiceDao dao;
 
diff --git a/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceDao.java b/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceDao.java
index d4d0e93..fb7bf9c 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceDao.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceDao.java
@@ -69,7 +69,7 @@ import static org.testng.Assert.assertTrue;
 
 public class TestInvoiceDao extends InvoiceDaoTestBase {
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testCreationAndRetrievalByAccount() {
         final UUID accountId = UUID.randomUUID();
         final Invoice invoice = new DefaultInvoice(accountId, clock.getUTCNow(), clock.getUTCNow(), Currency.USD);
@@ -88,7 +88,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertTrue(thisInvoice.getBalance().compareTo(BigDecimal.ZERO) == 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoicePayment() {
         final UUID accountId = UUID.randomUUID();
         final Invoice invoice = new DefaultInvoice(accountId, clock.getUTCNow(), clock.getUTCNow(), Currency.USD);
@@ -122,13 +122,13 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(retrievedInvoice.getPaidAmount().compareTo(new BigDecimal("11.00")), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testRetrievalForNonExistentInvoiceId() {
         final Invoice invoice = invoiceDao.getById(UUID.randomUUID());
         assertNull(invoice);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAddPayment1() {
         final UUID accountId = UUID.randomUUID();
         final DateTime targetDate = new DateTime(2011, 10, 6, 0, 0, 0, 0);
@@ -147,7 +147,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(invoice.getNumberOfPayments(), 1);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAddPayment2() {
         final UUID accountId = UUID.randomUUID();
         final DateTime targetDate = new DateTime(2011, 10, 6, 0, 0, 0, 0);
@@ -161,7 +161,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(invoice.getLastPaymentDate().compareTo(paymentDate), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoicesBySubscriptionForRecurringItems() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -237,7 +237,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(items4.size(), 1);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoicesBySubscriptionForFixedItems() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -313,7 +313,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(items4.size(), 1);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoicesBySubscriptionForRecurringAndFixedItems() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -416,7 +416,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(items4.size(), 2);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoicesForAccountAfterDate() {
         final UUID accountId = UUID.randomUUID();
         final DateTime targetDate1 = new DateTime(2011, 10, 6, 0, 0, 0, 0);
@@ -444,7 +444,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(invoices.size(), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalance() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -474,7 +474,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(balance.compareTo(rate1.add(rate2).subtract(payment1)), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithCredit() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -498,7 +498,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(balance.compareTo(BigDecimal.ZERO), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithNoPayments() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -524,7 +524,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(balance.compareTo(rate1.add(rate2)), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithNoInvoiceItems() {
         final UUID accountId = UUID.randomUUID();
         final DateTime targetDate1 = new DateTime(2011, 10, 6, 0, 0, 0, 0);
@@ -539,12 +539,12 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(balance.compareTo(BigDecimal.ZERO.subtract(payment1)), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithRefundNoAdj() throws InvoiceApiException {
         testAccountBalanceWithRefundInternal(false);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithRefundAndAdj() throws InvoiceApiException {
         testAccountBalanceWithRefundInternal(true);
     }
@@ -588,28 +588,28 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         }
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithSmallRefundAndCBANoAdj() throws InvoiceApiException {
         BigDecimal refundAmount = new BigDecimal("-7.00");
         BigDecimal expectedBalance = new BigDecimal("-3.00");
         testAccountBalanceWithRefundAndCBAInternal(false, refundAmount, expectedBalance);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithSmallRefundAndCBAWithAdj() throws InvoiceApiException {
         BigDecimal refundAmount = new BigDecimal("-7.00");
         BigDecimal expectedBalance = new BigDecimal("-3.00");
         testAccountBalanceWithRefundAndCBAInternal(true, refundAmount, expectedBalance);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithLargeRefundAndCBANoAdj() throws InvoiceApiException {
         BigDecimal refundAmount = new BigDecimal("-20.00");
         BigDecimal expectedBalance = new BigDecimal("10.00");
         testAccountBalanceWithRefundAndCBAInternal(false, refundAmount, expectedBalance);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithLargeRefundAndCBAWithAdj() throws InvoiceApiException {
         BigDecimal refundAmount = new BigDecimal("-20.00");
         BigDecimal expectedBalance = BigDecimal.ZERO;
@@ -682,7 +682,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
 
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAccountBalanceWithAllSortsOfThings() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -770,7 +770,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
 
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetUnpaidInvoicesByAccountId() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -830,7 +830,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
      * this test verifies that immediate changes give the correct results
      *
      */
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoiceGenerationForImmediateChanges() throws InvoiceApiException, CatalogApiException {
         final UUID accountId = UUID.randomUUID();
         final List<Invoice> invoiceList = new ArrayList<Invoice>();
@@ -885,7 +885,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(savedInvoice2.getBalance(), FIFTEEN);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoiceForFreeTrial() throws InvoiceApiException, CatalogApiException {
         final Currency currency = Currency.USD;
         final DefaultPrice price = new DefaultPrice(BigDecimal.ZERO, Currency.USD);
@@ -917,7 +917,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         return subscription;
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoiceForFreeTrialWithRecurringDiscount() throws InvoiceApiException, CatalogApiException {
         final Currency currency = Currency.USD;
 
@@ -976,14 +976,14 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         //invoiceDao.create(invoice3, invoice3.getTargetDate().getDayOfMonth(), context);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoiceForEmptyEventSet() throws InvoiceApiException {
         final BillingEventSet events = new MockBillingEventSet();
         final Invoice invoice = generator.generateInvoice(UUID.randomUUID(), events, null, new DateTime(), Currency.USD);
         assertNull(invoice);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testMixedModeInvoicePersistence() throws InvoiceApiException, CatalogApiException {
         final Currency currency = Currency.USD;
         final DefaultPrice zeroPrice = new DefaultPrice(BigDecimal.ZERO, Currency.USD);
@@ -1026,7 +1026,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertEquals(savedInvoice.getBalance().compareTo(cheapAmount), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoiceNumber() throws InvoiceApiException {
         final Currency currency = Currency.USD;
         final DateTime targetDate1 = DateTime.now().plusMonths(1);
@@ -1069,7 +1069,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertNotNull(invoice2.getInvoiceNumber());
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testAddingWrittenOffTag() throws InvoiceApiException, TagApiException {
         final Subscription subscription = getZombieSubscription();
 
@@ -1100,7 +1100,7 @@ public class TestInvoiceDao extends InvoiceDaoTestBase {
         assertTrue(tags.containsKey(ControlTagType.WRITTEN_OFF.toString()));
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testRemoveWrittenOffTag() throws InvoiceApiException, TagApiException {
         final Subscription subscription = getZombieSubscription();
 
diff --git a/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceItemDao.java b/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceItemDao.java
index 78bbdd6..11825c2 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceItemDao.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceItemDao.java
@@ -35,8 +35,7 @@ import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertTrue;
 
 public class TestInvoiceItemDao extends InvoiceDaoTestBase {
-
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testInvoiceItemCreation() {
         final UUID accountId = UUID.randomUUID();
         final UUID invoiceId = UUID.randomUUID();
@@ -64,7 +63,7 @@ public class TestInvoiceItemDao extends InvoiceDaoTestBase {
         // assertEquals(thisItem.getCreatedDate().compareTo(item.getCreatedDate()), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoiceItemsBySubscriptionId() {
         final UUID accountId = UUID.randomUUID();
         final UUID subscriptionId = UUID.randomUUID();
@@ -85,7 +84,7 @@ public class TestInvoiceItemDao extends InvoiceDaoTestBase {
         assertEquals(items.size(), 3);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoiceItemsByInvoiceId() {
         final UUID accountId = UUID.randomUUID();
         final UUID invoiceId = UUID.randomUUID();
@@ -107,7 +106,7 @@ public class TestInvoiceItemDao extends InvoiceDaoTestBase {
         assertEquals(items.size(), 5);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetInvoiceItemsByAccountId() {
         final UUID accountId = UUID.randomUUID();
         final UUID bundleId = UUID.randomUUID();
@@ -131,7 +130,7 @@ public class TestInvoiceItemDao extends InvoiceDaoTestBase {
         assertEquals(items.size(), 1);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testCreditBalanceInvoiceSqlDao() {
         final UUID invoiceId = UUID.randomUUID();
         final UUID accountId = UUID.randomUUID();
@@ -144,7 +143,7 @@ public class TestInvoiceItemDao extends InvoiceDaoTestBase {
         assertEquals(savedItem, creditInvoiceItem);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testFixedPriceInvoiceSqlDao() {
         final UUID invoiceId = UUID.randomUUID();
         final UUID accountId = UUID.randomUUID();
diff --git a/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGenerator.java b/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGenerator.java
index 65f9289..d41e6c1 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGenerator.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGenerator.java
@@ -101,7 +101,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         this.generator = new DefaultInvoiceGenerator(clock, invoiceConfig);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testWithNullEventSetAndNullInvoiceSet() throws InvoiceApiException {
         final UUID accountId = UUID.randomUUID();
         final Invoice invoice = generator.generateInvoice(accountId, null, null, new DateTime(), Currency.USD);
@@ -109,7 +109,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertNull(invoice);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testWithEmptyEventSet() throws InvoiceApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -119,7 +119,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertNull(invoice);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testWithSingleMonthlyEvent() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -155,7 +155,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         return sub;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testWithSingleMonthlyEventWithLeadingProRation() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -181,7 +181,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice.getBalance(), expectedAmount);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTwoMonthlySubscriptionsWithAlignedBillingDates() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -210,7 +210,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice.getBalance(), rate1.add(rate2).setScale(NUMBER_OF_DECIMALS));
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testOnePlan_TwoMonthlyPhases_ChangeImmediate() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -247,7 +247,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice.getBalance(), expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testOnePlan_ThreeMonthlyPhases_ChangeEOT() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -278,7 +278,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice.getBalance(), rate1.add(rate2).add(TWO.multiply(rate3)).setScale(NUMBER_OF_DECIMALS));
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSingleEventWithExistingInvoice() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
 
@@ -305,7 +305,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
     }
 
     // TODO: modify this test to keep a running total of expected invoice amount over time
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testMultiplePlansWithUtterChaos() throws InvoiceApiException, CatalogApiException {
         // plan 1: change of phase from trial to discount followed by immediate cancellation; (covers phase change, cancel, pro-ration)
         // plan 2: single plan that moves from trial to discount to evergreen; BCD = 10 (covers phase change)
@@ -466,7 +466,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         testInvoiceGeneration(accountId, events, invoices, buildDateTime(2011, 10, 10), 1, expectedAmount);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testZeroDollarEvents() throws InvoiceApiException, CatalogApiException {
         final Plan plan = new MockPlan();
         final PlanPhase planPhase = createMockMonthlyPlanPhase(ZERO);
@@ -479,7 +479,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice.getNumberOfItems(), 1);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testEndDateIsCorrect() throws InvoiceApiException, CatalogApiException {
         final Plan plan = new MockPlan();
         final PlanPhase planPhase = createMockMonthlyPlanPhase(ZERO);
@@ -496,7 +496,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertDatesEqualRounded(item.getEndDate(), startDate.plusMonths(1));
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testFixedPriceLifeCycle() throws InvoiceApiException {
         final UUID accountId = UUID.randomUUID();
         final Subscription subscription = createZombieSubscription();
@@ -539,7 +539,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(item.getStartDate().compareTo(changeDate), 0);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testMixedModeLifeCycle() throws InvoiceApiException, CatalogApiException {
         // create a subscription with a fixed price and recurring price
         final Plan plan1 = new MockPlan();
@@ -574,7 +574,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice2.getBalance(), FIVE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testFixedModePlanChange() throws InvoiceApiException, CatalogApiException {
         // create a subscription with a fixed price and recurring price
         final Plan plan1 = new MockPlan();
@@ -612,7 +612,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice2.getBalance(), fixedCost2);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testInvoiceGenerationFailureScenario() throws InvoiceApiException, CatalogApiException {
         final BillingEventSet events = new MockBillingEventSet();
         final UUID subscriptionId = UUID.randomUUID();
@@ -667,7 +667,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice4.getNumberOfItems(), 7);
     }
 
-    @Test(groups = {"fast"}, expectedExceptions = {InvoiceApiException.class})
+    @Test(groups = "fast", expectedExceptions = {InvoiceApiException.class})
     public void testTargetDateRestrictionFailure() throws InvoiceApiException, CatalogApiException {
         final DateTime targetDate = DateTime.now().plusMonths(60);
         final BillingEventSet events = new MockBillingEventSet();
@@ -730,7 +730,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertEquals(invoice.getBalance(), expectedAmount);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testAddOnInvoiceGeneration() throws CatalogApiException, InvoiceApiException {
         final DateTime april25 = new DateTime(2012, 4, 25, 0, 0, 0, 0);
 
@@ -876,7 +876,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         }
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testAutoInvoiceOffAccount() throws Exception {
         final MockBillingEventSet events = new MockBillingEventSet();
         events.setAccountInvoiceOff(true);
@@ -944,7 +944,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
         assertTrue(invoice3.getBalance().compareTo(FIFTEEN.multiply(TWO).add(TWELVE)) == 0);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testAccountCredit() throws CatalogApiException, InvoiceApiException {
         final BillingEventSet billingEventSet = new MockBillingEventSet();
 
@@ -995,7 +995,7 @@ public class TestDefaultInvoiceGenerator extends InvoicingTestBase {
                          + ", CHARGE_AMOUNT = " + invoice.getChargedAmount()
                          + ", ADJ_AMOUNT = " + invoice.getCreditAdjAmount());
 
-        for (InvoiceItem cur : invoice.getInvoiceItems()) {
+        for (final InvoiceItem cur : invoice.getInvoiceItems()) {
             log.info(cur.toString());
         }
         log.info("--------------------  END DETAIL ----------------------");
diff --git a/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGeneratorUnit.java b/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGeneratorUnit.java
index 53066ea..1afb905 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGeneratorUnit.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGeneratorUnit.java
@@ -13,11 +13,8 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.billing.invoice.generator;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.testng.Assert.assertEquals;
+package com.ning.billing.invoice.generator;
 
 import java.math.BigDecimal;
 import java.util.LinkedList;
@@ -37,11 +34,15 @@ import com.ning.billing.invoice.model.CreditBalanceAdjInvoiceItem;
 import com.ning.billing.invoice.model.FixedPriceInvoiceItem;
 import com.ning.billing.invoice.model.RecurringInvoiceItem;
 import com.ning.billing.invoice.model.RepairAdjInvoiceItem;
+import com.ning.billing.invoice.tests.InvoicingTestBase;
 import com.ning.billing.util.clock.Clock;
 import com.ning.billing.util.clock.ClockMock;
 
-public class TestDefaultInvoiceGeneratorUnit  {
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.testng.Assert.assertEquals;
 
+public class TestDefaultInvoiceGeneratorUnit extends InvoicingTestBase {
     private DefaultInvoiceGenerator gen;
     private Clock clock;
 
@@ -59,7 +60,7 @@ public class TestDefaultInvoiceGeneratorUnit  {
         }
     }
 
-    @BeforeClass(groups = {"fast"})
+    @BeforeClass(groups = "fast")
     public void setup() {
         clock = new ClockMock();
         gen = new TestDefaultInvoiceGeneratorMock(clock, new InvoiceConfig() {
@@ -67,14 +68,17 @@ public class TestDefaultInvoiceGeneratorUnit  {
             public boolean isNotificationProcessingOff() {
                 return false;
             }
+
             @Override
             public boolean isEmailNotificationsEnabled() {
                 return false;
             }
+
             @Override
             public long getSleepTimeMs() {
                 return 100;
             }
+
             @Override
             public int getNumberOfMonthsInFuture() {
                 return 5;
@@ -82,143 +86,139 @@ public class TestDefaultInvoiceGeneratorUnit  {
         });
     }
 
-    @Test(groups = {"fast"}, enabled= true)
+    @Test(groups = "fast")
     public void testRemoveCancellingInvoiceItemsFixedPrice() {
-
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
-
-        BigDecimal amount = new BigDecimal("12.00");
-        BigDecimal rate2 = new BigDecimal("14.85");
-        BigDecimal amount2 = rate2;
-        List<InvoiceItem> items =  new LinkedList<InvoiceItem>();
-        InvoiceItem item1 = new FixedPriceInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount, currency);
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
+
+        final BigDecimal amount = new BigDecimal("12.00");
+        final BigDecimal rate2 = new BigDecimal("14.85");
+        final BigDecimal amount2 = rate2;
+        final List<InvoiceItem> items = new LinkedList<InvoiceItem>();
+        final InvoiceItem item1 = new FixedPriceInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount, currency);
         items.add(item1);
         items.add(new RepairAdjInvoiceItem(invoiceId, accountId, startDate, endDate, amount.negate(), currency, item1.getId()));
         items.add(new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount2, rate2, currency));
         gen.removeCancellingInvoiceItems(items);
         assertEquals(items.size(), 1);
-        InvoiceItem leftItem = items.get(0);
+        final InvoiceItem leftItem = items.get(0);
         assertEquals(leftItem.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(leftItem.getAmount(), amount2);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testRemoveCancellingInvoiceItemsRecurringPrice() {
-
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
-
-        BigDecimal rate1 = new BigDecimal("12.00");
-        BigDecimal amount1 = rate1;
-        BigDecimal rate2 = new BigDecimal("14.85");
-        BigDecimal amount2 = rate2;
-        List<InvoiceItem> items =  new LinkedList<InvoiceItem>();
-        InvoiceItem item1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
+
+        final BigDecimal rate1 = new BigDecimal("12.00");
+        final BigDecimal amount1 = rate1;
+        final BigDecimal rate2 = new BigDecimal("14.85");
+        final BigDecimal amount2 = rate2;
+        final List<InvoiceItem> items = new LinkedList<InvoiceItem>();
+        final InvoiceItem item1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
         items.add(item1);
         items.add(new RepairAdjInvoiceItem(invoiceId, accountId, startDate, endDate, amount1.negate(), currency, item1.getId()));
         items.add(new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount2, rate2, currency));
         gen.removeCancellingInvoiceItems(items);
         assertEquals(items.size(), 1);
-        InvoiceItem leftItem = items.get(0);
+        final InvoiceItem leftItem = items.get(0);
         assertEquals(leftItem.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(leftItem.getAmount(), amount2);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testRemoveDuplicatedInvoiceItemsFixedPrice() {
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
 
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
-
-        BigDecimal amount1 = new BigDecimal("12.00");
+        final BigDecimal amount1 = new BigDecimal("12.00");
 
-        BigDecimal amount2 = new BigDecimal("14.85");
+        final BigDecimal amount2 = new BigDecimal("14.85");
 
-        BigDecimal rate3 = new BigDecimal("14.85");
-        BigDecimal amount3 = rate3;
+        final BigDecimal rate3 = new BigDecimal("14.85");
+        final BigDecimal amount3 = rate3;
 
-        List<InvoiceItem> existing =  new LinkedList<InvoiceItem>();
-        InvoiceItem item1 = new FixedPriceInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, currency);
+        final List<InvoiceItem> existing = new LinkedList<InvoiceItem>();
+        final InvoiceItem item1 = new FixedPriceInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, currency);
         existing.add(item1);
 
-        List<InvoiceItem> proposed =  new LinkedList<InvoiceItem>();
-        InvoiceItem other = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount3, rate3, currency, null);
+        final List<InvoiceItem> proposed = new LinkedList<InvoiceItem>();
+        final InvoiceItem other = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount3, rate3, currency, null);
         proposed.add(item1);
         proposed.add(other);
 
         gen.removeDuplicatedInvoiceItems(proposed, existing);
         assertEquals(existing.size(), 0);
         assertEquals(proposed.size(), 1);
-        InvoiceItem leftItem = proposed.get(0);
+        final InvoiceItem leftItem = proposed.get(0);
         assertEquals(leftItem.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(leftItem.getAmount(), amount2);
     }
 
-    @Test(groups = {"fast"})
-    public void testRemoveDuplicatedInvoiceItemsRecuringPrice() {
+    @Test(groups = "fast")
+    public void testRemoveDuplicatedInvoiceItemsRecurringPrice() {
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
 
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
+        final BigDecimal rate1 = new BigDecimal("12.00");
+        final BigDecimal amount1 = rate1;
 
-        BigDecimal rate1 = new BigDecimal("12.00");
-        BigDecimal amount1 = rate1;
+        final BigDecimal rate2 = new BigDecimal("14.85");
+        final BigDecimal amount2 = rate2;
 
-        BigDecimal rate2 = new BigDecimal("14.85");
-        BigDecimal amount2 = rate2;
-
-        List<InvoiceItem> existing =  new LinkedList<InvoiceItem>();
-        InvoiceItem item1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
+        final List<InvoiceItem> existing = new LinkedList<InvoiceItem>();
+        final InvoiceItem item1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
         existing.add(item1);
 
-        List<InvoiceItem> proposed =  new LinkedList<InvoiceItem>();
-        InvoiceItem other = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount2, rate2, currency, null);
+        final List<InvoiceItem> proposed = new LinkedList<InvoiceItem>();
+        final InvoiceItem other = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount2, rate2, currency, null);
         proposed.add(item1);
         proposed.add(other);
 
         gen.removeDuplicatedInvoiceItems(proposed, existing);
         assertEquals(existing.size(), 0);
         assertEquals(proposed.size(), 1);
-        InvoiceItem leftItem = proposed.get(0);
+        final InvoiceItem leftItem = proposed.get(0);
         assertEquals(leftItem.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(leftItem.getAmount(), amount2);
     }
 
     // STEPH same as testRemoveCancellingInvoiceItemsFixedPrice: should we have one for FixedPrice?
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testAddRepairedItemsItemsRecurringPrice() {
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
 
-        BigDecimal rate1 = new BigDecimal("12.00");
-        BigDecimal amount1 = rate1;
+        final BigDecimal rate1 = new BigDecimal("12.00");
+        final BigDecimal amount1 = rate1;
 
-        BigDecimal rate2 = new BigDecimal("14.85");
-        BigDecimal amount2 = rate2;
+        final BigDecimal rate2 = new BigDecimal("14.85");
+        final BigDecimal amount2 = rate2;
 
-        UUID firstInvoiceId = UUID.randomUUID();
-        List<InvoiceItem> existing =  new LinkedList<InvoiceItem>();
-        InvoiceItem item1 = new RecurringInvoiceItem(firstInvoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
+        final UUID firstInvoiceId = UUID.randomUUID();
+        final List<InvoiceItem> existing = new LinkedList<InvoiceItem>();
+        final InvoiceItem item1 = new RecurringInvoiceItem(firstInvoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
         existing.add(item1);
 
-        List<InvoiceItem> proposed =  new LinkedList<InvoiceItem>();
-        InvoiceItem other = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount2, rate2, currency, null);
+        final List<InvoiceItem> proposed = new LinkedList<InvoiceItem>();
+        final InvoiceItem other = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, endDate, nextEndDate, amount2, rate2, currency, null);
         proposed.add(other);
 
         gen.addRepairedItems(existing, proposed);
         assertEquals(existing.size(), 1);
         assertEquals(proposed.size(), 2);
-        InvoiceItem leftItem1 = proposed.get(0);
+        final InvoiceItem leftItem1 = proposed.get(0);
         assertEquals(leftItem1.getInvoiceId(), invoiceId);
         assertEquals(leftItem1.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(leftItem1.getAmount(), amount2);
 
-        InvoiceItem newItem2 = proposed.get(1);
+        final InvoiceItem newItem2 = proposed.get(1);
         assertEquals(newItem2.getInvoiceId(), firstInvoiceId);
         assertEquals(newItem2.getInvoiceItemType(), InvoiceItemType.REPAIR_ADJ);
         assertEquals(newItem2.getAmount(), item1.getAmount().negate());
@@ -226,109 +226,105 @@ public class TestDefaultInvoiceGeneratorUnit  {
 
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testGenerateCreditsForPastRepairedInvoices() {
 
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
 
-        BigDecimal rate1 = new BigDecimal("10.00");
-        BigDecimal amount1 = rate1;
+        final BigDecimal rate1 = new BigDecimal("10.00");
+        final BigDecimal amount1 = rate1;
 
-        List<InvoiceItem> existing =  new LinkedList<InvoiceItem>();
-        InvoiceItem item1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
+        final List<InvoiceItem> existing = new LinkedList<InvoiceItem>();
+        final InvoiceItem item1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
         existing.add(item1);
 
-
-        UUID existingInvoiceId = UUID.randomUUID();
-        List<Invoice> existingInvoices = new LinkedList<Invoice>();
-        Invoice existingInvoice = mock(Invoice.class);
+        final UUID existingInvoiceId = UUID.randomUUID();
+        final List<Invoice> existingInvoices = new LinkedList<Invoice>();
+        final Invoice existingInvoice = mock(Invoice.class);
         when(existingInvoice.getId()).thenReturn(existingInvoiceId);
         when(existingInvoice.getBalance()).thenReturn(BigDecimal.ZERO);
         when(existingInvoice.getInvoiceItems()).thenReturn(existing);
 
-        BigDecimal rate2 = new BigDecimal("20.0");
-        BigDecimal amount2 = rate2;
+        final BigDecimal rate2 = new BigDecimal("20.0");
+        final BigDecimal amount2 = rate2;
 
-        List<InvoiceItem> proposed =  new LinkedList<InvoiceItem>();
-        InvoiceItem reversedItem1 = new RepairAdjInvoiceItem(existingInvoiceId, accountId, startDate, nextEndDate, item1.getAmount().negate(), currency, item1.getId());
-        InvoiceItem newItem1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount2, rate2, currency, null);
+        final List<InvoiceItem> proposed = new LinkedList<InvoiceItem>();
+        final InvoiceItem reversedItem1 = new RepairAdjInvoiceItem(existingInvoiceId, accountId, startDate, nextEndDate, item1.getAmount().negate(), currency, item1.getId());
+        final InvoiceItem newItem1 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount2, rate2, currency, null);
         proposed.add(reversedItem1);
         proposed.add(newItem1);
 
         gen.generateCBAForExistingInvoices(accountId, existingInvoices, proposed, currency);
 
         assertEquals(proposed.size(), 3);
-        InvoiceItem reversedItemCheck1 = proposed.get(0);
+        final InvoiceItem reversedItemCheck1 = proposed.get(0);
         assertEquals(reversedItemCheck1.getInvoiceId(), existingInvoiceId);
         assertEquals(reversedItemCheck1.getInvoiceItemType(), InvoiceItemType.REPAIR_ADJ);
         assertEquals(reversedItemCheck1.getAmount(), item1.getAmount().negate());
         assertEquals(reversedItemCheck1.getLinkedItemId(), item1.getId());
 
-        InvoiceItem newItemCheck1 = proposed.get(1);
+        final InvoiceItem newItemCheck1 = proposed.get(1);
         assertEquals(newItemCheck1.getInvoiceId(), invoiceId);
         assertEquals(newItemCheck1.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(newItemCheck1.getAmount(), amount2);
 
-        InvoiceItem creditItemCheck = proposed.get(2);
+        final InvoiceItem creditItemCheck = proposed.get(2);
         assertEquals(creditItemCheck.getInvoiceId(), existingInvoiceId);
         assertEquals(creditItemCheck.getInvoiceItemType(), InvoiceItemType.CBA_ADJ);
         assertEquals(creditItemCheck.getAmount(), amount2.add(rate1.negate()));
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testConsumeNotEnoughExistingCredit() {
         testConsumeCreditInternal(new BigDecimal("12.00"), new BigDecimal("-10.00"));
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testConsumeTooMuchExistingCredit() {
         testConsumeCreditInternal(new BigDecimal("7.00"), new BigDecimal("-7.00"));
     }
 
-    private void testConsumeCreditInternal(BigDecimal newRate, BigDecimal expectedNewCba) {
-        DateTime startDate = clock.getUTCNow();
-        DateTime endDate = startDate.plusDays(30);
-        DateTime nextEndDate = startDate.plusMonths(1);
-
+    private void testConsumeCreditInternal(final BigDecimal newRate, final BigDecimal expectedNewCba) {
+        final DateTime startDate = clock.getUTCNow();
+        final DateTime endDate = startDate.plusDays(30);
+        final DateTime nextEndDate = startDate.plusMonths(1);
 
-        BigDecimal rate1 = new BigDecimal("20.00");
-        BigDecimal amount1 = rate1;
+        final BigDecimal rate1 = new BigDecimal("20.00");
+        final BigDecimal amount1 = rate1;
 
-        BigDecimal rate2 = new BigDecimal("10.00");
-        BigDecimal amount2 = rate2;
+        final BigDecimal rate2 = new BigDecimal("10.00");
+        final BigDecimal amount2 = rate2;
 
+        final UUID firstInvoiceId = UUID.randomUUID();
+        final List<InvoiceItem> existing = new LinkedList<InvoiceItem>();
+        final BigDecimal pcba1 = new BigDecimal("10.00");
 
-        UUID firstInvoiceId  = UUID.randomUUID();
-        List<InvoiceItem> existing =  new LinkedList<InvoiceItem>();
-        BigDecimal pcba1 = new BigDecimal("10.00");
-
-        InvoiceItem item1 = new RecurringInvoiceItem(firstInvoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
-        InvoiceItem reversedItem1 = new RepairAdjInvoiceItem(firstInvoiceId, accountId, startDate, nextEndDate, amount1.negate(), currency, item1.getId());
-        InvoiceItem newItem1 = new RecurringInvoiceItem(firstInvoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount2, rate2, currency, null);
-        InvoiceItem cba1 = new CreditBalanceAdjInvoiceItem(firstInvoiceId, accountId, startDate, pcba1, currency);
+        final InvoiceItem item1 = new RecurringInvoiceItem(firstInvoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount1, rate1, currency, null);
+        final InvoiceItem reversedItem1 = new RepairAdjInvoiceItem(firstInvoiceId, accountId, startDate, nextEndDate, amount1.negate(), currency, item1.getId());
+        final InvoiceItem newItem1 = new RecurringInvoiceItem(firstInvoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate, endDate, amount2, rate2, currency, null);
+        final InvoiceItem cba1 = new CreditBalanceAdjInvoiceItem(firstInvoiceId, accountId, startDate, pcba1, currency);
         existing.add(item1);
         existing.add(reversedItem1);
         existing.add(newItem1);
         existing.add(cba1);
 
+        final BigDecimal newRate2 = newRate;
+        final BigDecimal newAmount2 = newRate2;
 
-        BigDecimal newRate2 = newRate;
-        BigDecimal newAmount2 = newRate2;
-
-        List<InvoiceItem> proposed =  new LinkedList<InvoiceItem>();
-        InvoiceItem item2 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate.plusMonths(1), endDate.plusMonths(1), newAmount2, newRate2, currency, null);
+        final List<InvoiceItem> proposed = new LinkedList<InvoiceItem>();
+        final InvoiceItem item2 = new RecurringInvoiceItem(invoiceId, accountId, bundleId, subscriptionId, planName, phaseName, startDate.plusMonths(1), endDate.plusMonths(1), newAmount2, newRate2, currency, null);
         proposed.add(item2);
 
         gen.consumeExistingCredit(invoiceId, firstInvoiceId, existing, proposed, currency);
         assertEquals(proposed.size(), 2);
-        InvoiceItem item2Check = proposed.get(0);
+        final InvoiceItem item2Check = proposed.get(0);
         assertEquals(item2Check.getInvoiceId(), invoiceId);
         assertEquals(item2Check.getInvoiceItemType(), InvoiceItemType.RECURRING);
         assertEquals(item2Check.getAmount(), newAmount2);
 
-        InvoiceItem cbaCheck = proposed.get(1);
+        final InvoiceItem cbaCheck = proposed.get(1);
         assertEquals(cbaCheck.getInvoiceId(), invoiceId);
         assertEquals(cbaCheck.getInvoiceItemType(), InvoiceItemType.CBA_ADJ);
         assertEquals(cbaCheck.getAmount(), expectedNewCba);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithEmbeddedDb.java b/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithEmbeddedDb.java
index 5e2d0bb..34b74d5 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithEmbeddedDb.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithEmbeddedDb.java
@@ -22,6 +22,7 @@ import java.net.URL;
 import org.mockito.Mockito;
 import org.skife.jdbi.v2.IDBI;
 
+import com.ning.billing.KillbillTestSuiteWithEmbeddedDB;
 import com.ning.billing.account.api.AccountUserApi;
 import com.ning.billing.catalog.glue.CatalogModule;
 import com.ning.billing.dbi.MysqlTestingHelper;
@@ -48,7 +49,7 @@ import com.ning.billing.util.notificationq.NotificationQueueService;
 import static org.testng.Assert.assertNotNull;
 
 public class InvoiceModuleWithEmbeddedDb extends DefaultInvoiceModule {
-    private final MysqlTestingHelper helper = new MysqlTestingHelper();
+    private final MysqlTestingHelper helper = KillbillTestSuiteWithEmbeddedDB.getMysqlTestingHelper();
 
     private void installNotificationQueue() {
         bind(NotificationQueueService.class).to(MockNotificationQueueService.class).asEagerSingleton();
diff --git a/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithMocks.java b/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithMocks.java
index 1019710..3e2a772 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithMocks.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/glue/InvoiceModuleWithMocks.java
@@ -28,7 +28,6 @@ import com.ning.billing.util.globallocker.GlobalLocker;
 import com.ning.billing.util.globallocker.MockGlobalLocker;
 import com.ning.billing.util.template.translation.TranslatorConfig;
 
-
 public class InvoiceModuleWithMocks extends DefaultInvoiceModule {
     @Override
     protected void installInvoiceDao() {
@@ -39,7 +38,6 @@ public class InvoiceModuleWithMocks extends DefaultInvoiceModule {
 
     @Override
     protected void installInvoiceListener() {
-
     }
 
     @Override
@@ -52,11 +50,9 @@ public class InvoiceModuleWithMocks extends DefaultInvoiceModule {
 
     @Override
     protected void installInvoiceService() {
-
     }
 
     @Override
     public void installInvoiceMigrationApi() {
-
     }
 }
diff --git a/invoice/src/test/java/com/ning/billing/invoice/InvoiceTestSuite.java b/invoice/src/test/java/com/ning/billing/invoice/InvoiceTestSuite.java
new file mode 100644
index 0000000..7291fce
--- /dev/null
+++ b/invoice/src/test/java/com/ning/billing/invoice/InvoiceTestSuite.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2010-2012 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at:
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.invoice;
+
+import com.ning.billing.KillbillTestSuite;
+
+public abstract class InvoiceTestSuite extends KillbillTestSuite {
+}
diff --git a/invoice/src/test/java/com/ning/billing/invoice/InvoiceTestSuiteWithEmbeddedDB.java b/invoice/src/test/java/com/ning/billing/invoice/InvoiceTestSuiteWithEmbeddedDB.java
new file mode 100644
index 0000000..de4234f
--- /dev/null
+++ b/invoice/src/test/java/com/ning/billing/invoice/InvoiceTestSuiteWithEmbeddedDB.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2010-2012 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at:
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.invoice;
+
+import com.ning.billing.KillbillTestSuiteWithEmbeddedDB;
+
+public abstract class InvoiceTestSuiteWithEmbeddedDB extends KillbillTestSuiteWithEmbeddedDB {
+}
diff --git a/invoice/src/test/java/com/ning/billing/invoice/MockModule.java b/invoice/src/test/java/com/ning/billing/invoice/MockModule.java
index 0e1ff55..4b15dc3 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/MockModule.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/MockModule.java
@@ -16,8 +16,6 @@
 
 package com.ning.billing.invoice;
 
-import static org.testng.Assert.assertNotNull;
-
 import java.io.IOException;
 import java.net.URL;
 
@@ -25,6 +23,7 @@ import org.skife.config.ConfigurationObjectFactory;
 import org.skife.jdbi.v2.IDBI;
 
 import com.google.inject.AbstractModule;
+import com.ning.billing.KillbillTestSuiteWithEmbeddedDB;
 import com.ning.billing.catalog.glue.CatalogModule;
 import com.ning.billing.dbi.DBIProvider;
 import com.ning.billing.dbi.DbiConfig;
@@ -46,10 +45,11 @@ import com.ning.billing.util.glue.GlobalLockerModule;
 import com.ning.billing.util.glue.NotificationQueueModule;
 import com.ning.billing.util.glue.TagStoreModule;
 
+import static org.testng.Assert.assertNotNull;
+
 public class MockModule extends AbstractModule {
     @Override
     protected void configure() {
-
         loadSystemPropertiesFromClasspath("/resource.properties");
 
         bind(Clock.class).to(ClockMock.class).asEagerSingleton();
@@ -58,7 +58,7 @@ public class MockModule extends AbstractModule {
         install(new TagStoreModule());
         install(new CustomFieldModule());
 
-        final MysqlTestingHelper helper = new MysqlTestingHelper();
+        final MysqlTestingHelper helper = KillbillTestSuiteWithEmbeddedDB.getMysqlTestingHelper();
         bind(MysqlTestingHelper.class).toInstance(helper);
         if (helper.isUsingLocalInstance()) {
             bind(IDBI.class).toProvider(DBIProvider.class).asEagerSingleton();
@@ -79,14 +79,12 @@ public class MockModule extends AbstractModule {
         installInvoiceModule();
         install(new MockJunctionModule());
         install(new TemplateModule());
-
     }
 
     protected void installInvoiceModule() {
         install(new DefaultInvoiceModule());
     }
 
-
     private static void loadSystemPropertiesFromClasspath(final String resource) {
         final URL url = TestDefaultInvoiceMigrationApi.class.getResource(resource);
         assertNotNull(url);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/notification/TestNextBillingDateNotifier.java b/invoice/src/test/java/com/ning/billing/invoice/notification/TestNextBillingDateNotifier.java
index e2ac16c..e126ba2 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/notification/TestNextBillingDateNotifier.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/notification/TestNextBillingDateNotifier.java
@@ -30,13 +30,13 @@ import org.skife.jdbi.v2.TransactionStatus;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Stage;
+import com.ning.billing.KillbillTestSuiteWithEmbeddedDB;
 import com.ning.billing.catalog.MockCatalogModule;
 import com.ning.billing.config.InvoiceConfig;
 import com.ning.billing.dbi.DBIProvider;
@@ -47,6 +47,7 @@ import com.ning.billing.entitlement.api.user.EntitlementUserApiException;
 import com.ning.billing.entitlement.api.user.Subscription;
 import com.ning.billing.invoice.InvoiceDispatcher;
 import com.ning.billing.invoice.InvoiceListener;
+import com.ning.billing.invoice.InvoiceTestSuiteWithEmbeddedDB;
 import com.ning.billing.invoice.glue.InvoiceModuleWithMocks;
 import com.ning.billing.lifecycle.KillbillService;
 import com.ning.billing.mock.glue.MockClockModule;
@@ -60,20 +61,17 @@ import com.ning.billing.util.email.templates.TemplateModule;
 import com.ning.billing.util.glue.BusModule;
 import com.ning.billing.util.glue.BusModule.BusType;
 import com.ning.billing.util.glue.NotificationQueueModule;
-import com.ning.billing.util.io.IOUtils;
 import com.ning.billing.util.notificationq.DummySqlTest;
 import com.ning.billing.util.notificationq.NotificationQueueService;
-import com.ning.billing.util.notificationq.dao.NotificationSqlDao;
 
 import static com.jayway.awaitility.Awaitility.await;
 import static java.util.concurrent.TimeUnit.MINUTES;
 
-public class TestNextBillingDateNotifier {
+public class TestNextBillingDateNotifier extends InvoiceTestSuiteWithEmbeddedDB {
     private Clock clock;
     private DefaultNextBillingDateNotifier notifier;
     private DummySqlTest dao;
     private Bus eventBus;
-    private MysqlTestingHelper helper;
     private InvoiceListenerMock listener;
     private NotificationQueueService notificationQueueService;
 
@@ -102,16 +100,10 @@ public class TestNextBillingDateNotifier {
 
     }
 
-    @BeforeMethod(groups = {"slow"})
-    public void cleanDb() {
-        helper.cleanupAllTables();
-    }
-
     @BeforeClass(groups = {"slow"})
     public void setup() throws KillbillService.ServiceException, IOException, ClassNotFoundException, SQLException, EntitlementUserApiException {
         //TestApiBase.loadSystemPropertiesFromClasspath("/entitlement.properties");
         final Injector g = Guice.createInjector(Stage.PRODUCTION, new AbstractModule() {
-
             @Override
             protected void configure() {
                 install(new MockClockModule());
@@ -122,7 +114,7 @@ public class TestNextBillingDateNotifier {
                 install(new NotificationQueueModule());
                 install(new TemplateModule());
 
-                final MysqlTestingHelper helper = new MysqlTestingHelper();
+                final MysqlTestingHelper helper = KillbillTestSuiteWithEmbeddedDB.getMysqlTestingHelper();
                 bind(MysqlTestingHelper.class).toInstance(helper);
                 if (helper.isUsingLocalInstance()) {
                     bind(IDBI.class).toProvider(DBIProvider.class).asEagerSingleton();
@@ -132,8 +124,6 @@ public class TestNextBillingDateNotifier {
                     final IDBI dbi = helper.getDBI();
                     bind(IDBI.class).toInstance(dbi);
                 }
-
-
             }
         });
 
@@ -141,7 +131,6 @@ public class TestNextBillingDateNotifier {
         final IDBI dbi = g.getInstance(IDBI.class);
         dao = dbi.onDemand(DummySqlTest.class);
         eventBus = g.getInstance(Bus.class);
-        helper = g.getInstance(MysqlTestingHelper.class);
         notificationQueueService = g.getInstance(NotificationQueueService.class);
         final InvoiceDispatcher dispatcher = g.getInstance(InvoiceDispatcher.class);
 
@@ -152,18 +141,9 @@ public class TestNextBillingDateNotifier {
         final CallContextFactory factory = new DefaultCallContextFactory(clock);
         listener = new InvoiceListenerMock(factory, dispatcher);
         notifier = new DefaultNextBillingDateNotifier(notificationQueueService, g.getInstance(InvoiceConfig.class), entitlementUserApi, listener);
-        startMysql();
-    }
-
-    private void startMysql() throws IOException, ClassNotFoundException, SQLException {
-        final String ddl = IOUtils.toString(NotificationSqlDao.class.getResourceAsStream("/com/ning/billing/util/ddl.sql"));
-        final String testDdl = IOUtils.toString(NotificationSqlDao.class.getResourceAsStream("/com/ning/billing/util/ddl_test.sql"));
-        helper.startMysql();
-        helper.initDb(ddl);
-        helper.initDb(testDdl);
     }
 
-    @Test(enabled = true, groups = "slow")
+    @Test(groups = "slow")
     public void testInvoiceNotifier() throws Exception {
 
         final UUID accountId = UUID.randomUUID();
@@ -203,7 +183,5 @@ public class TestNextBillingDateNotifier {
     @AfterClass(groups = "slow")
     public void tearDown() throws Exception {
         notifier.stop();
-        helper.stopMysql();
     }
-
 }
diff --git a/invoice/src/test/java/com/ning/billing/invoice/TestHtmlInvoiceGenerator.java b/invoice/src/test/java/com/ning/billing/invoice/TestHtmlInvoiceGenerator.java
index 97dcd7f..56fa7fa 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/TestHtmlInvoiceGenerator.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/TestHtmlInvoiceGenerator.java
@@ -39,7 +39,7 @@ import com.ning.billing.util.email.templates.MustacheTemplateEngine;
 import com.ning.billing.util.email.templates.TemplateEngine;
 import com.ning.billing.util.template.translation.TranslatorConfig;
 
-public class TestHtmlInvoiceGenerator {
+public class TestHtmlInvoiceGenerator extends InvoiceTestSuite {
     private HtmlInvoiceGenerator g;
 
     @BeforeSuite(groups = "fast")
diff --git a/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java b/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java
index 0be1893..73acc50 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java
@@ -62,7 +62,6 @@ import com.ning.billing.util.callcontext.DefaultCallContextFactory;
 import com.ning.billing.util.callcontext.UserType;
 import com.ning.billing.util.clock.Clock;
 import com.ning.billing.util.globallocker.GlobalLocker;
-import com.ning.billing.util.io.IOUtils;
 
 @Guice(modules = {MockModule.class})
 public class TestInvoiceDispatcher extends InvoicingTestBase {
@@ -96,13 +95,6 @@ public class TestInvoiceDispatcher extends InvoicingTestBase {
 
     @BeforeSuite(groups = {"slow"})
     public void setup() throws Exception {
-        final String invoiceDdl = IOUtils.toString(TestInvoiceDispatcher.class.getResourceAsStream("/com/ning/billing/invoice/ddl.sql"));
-        final String utilDdl = IOUtils.toString(TestInvoiceDispatcher.class.getResourceAsStream("/com/ning/billing/util/ddl.sql"));
-
-        helper.startMysql();
-
-        helper.initDb(invoiceDdl);
-        helper.initDb(utilDdl);
         notifier.initialize();
         notifier.start();
 
@@ -116,7 +108,6 @@ public class TestInvoiceDispatcher extends InvoicingTestBase {
         try {
             ((DefaultBusService) busService).stopBus();
             notifier.stop();
-            helper.stopMysql();
         } catch (Exception e) {
             log.warn("Failed to tearDown test properly ", e);
         }
@@ -179,5 +170,4 @@ public class TestInvoiceDispatcher extends InvoicingTestBase {
     }
 
     //MDW add a test to cover when the account auto-invoice-off tag is present
-
 }
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestDoubleProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestDoubleProRation.java
index a16b26e..082b751 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestDoubleProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestDoubleProRation.java
@@ -31,7 +31,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.ANNUAL;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 1);
@@ -41,7 +41,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInFirstProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 7);
@@ -51,7 +51,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnFirstBillingCycleDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 15);
@@ -61,7 +61,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInFullBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 22);
@@ -74,7 +74,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnSecondBillingCycleDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2012, 1, 15);
@@ -89,7 +89,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInSecondProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2012, 1, 17);
@@ -104,7 +104,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2012, 1, 27);
@@ -119,7 +119,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2012, 3, 7);
@@ -134,7 +134,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRationWithMultiplePeriods_TargetDateInSecondFullBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2012, 2, 26);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestLeadingProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestLeadingProRation.java
index 1121a7b..bfe28ac 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestLeadingProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestLeadingProRation.java
@@ -31,7 +31,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.ANNUAL;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -42,7 +42,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 4);
@@ -53,7 +53,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateOnFirstBillingDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 13);
@@ -64,7 +64,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateAfterFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 13);
@@ -75,7 +75,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -87,7 +87,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 4);
@@ -99,7 +99,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnFirstBillingDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 13);
@@ -111,7 +111,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateInFinalBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 10);
@@ -123,7 +123,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2012, 2, 13);
@@ -135,7 +135,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2012, 4, 10);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestProRation.java
index 9b75501..b9afbeb 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestProRation.java
@@ -31,7 +31,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.ANNUAL;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_PrecedingProRation() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 31);
         final DateTime targetDate = buildDateTime(2011, 2, 24);
@@ -40,7 +40,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_PrecedingProRation_CrossingYearBoundary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 12, 15);
         final DateTime targetDate = buildDateTime(2011, 1, 13);
@@ -49,8 +49,8 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 4, expectedValue);
     }
 
-    // Test fails, needs to be investigated
-    @Test(groups = {"fast"}, enabled=false)
+    // TODO Test fails, needs to be investigated
+    @Test(groups = "fast", enabled=false)
     public void testSinglePlanDoubleProRation() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 10);
         final DateTime endDate = buildDateTime(2012, 3, 4);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestTrailingProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestTrailingProRation.java
index 35d35c1..798231a 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestTrailingProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/annual/TestTrailingProRation.java
@@ -25,14 +25,13 @@ import com.ning.billing.catalog.api.BillingPeriod;
 import com.ning.billing.invoice.model.InvalidDateSequenceException;
 import com.ning.billing.invoice.tests.inAdvance.ProRationInAdvanceTestBase;
 
-
 public class TestTrailingProRation extends ProRationInAdvanceTestBase {
     @Override
     protected BillingPeriod getBillingPeriod() {
         return BillingPeriod.ANNUAL;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2012, 6, 25);
@@ -41,7 +40,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateInFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2011, 6, 25);
@@ -50,7 +49,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateAtEndOfFirstBillingCycle() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2011, 6, 25);
@@ -60,7 +59,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2011, 6, 25);
@@ -70,7 +69,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2011, 6, 25);
@@ -79,7 +78,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, endDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2011, 6, 25);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/GenericProRationTestBase.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/GenericProRationTestBase.java
index ebf816e..500ffd0 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/GenericProRationTestBase.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/GenericProRationTestBase.java
@@ -31,14 +31,14 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
      */
     protected abstract BigDecimal getDaysInTestPeriod();
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_OnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 15);
 
         testCalculateNumberOfBillingCycles(startDate, startDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LessThanOnePeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 15);
         final DateTime targetDate = buildDateTime(2011, 3, 1);
@@ -46,7 +46,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_OnePeriodLessADayAfterStart() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 15);
         final DateTime targetDate = startDate.plusMonths(getBillingPeriod().getNumberOfMonths()).plusDays(-1);
@@ -54,7 +54,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_ExactlyOnePeriodAfterStart() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 15);
         final DateTime targetDate = startDate.plusMonths(getBillingPeriod().getNumberOfMonths());
@@ -62,7 +62,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_SlightlyMoreThanOnePeriodAfterStart() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 15);
         final DateTime targetDate = startDate.plusMonths(getBillingPeriod().getNumberOfMonths()).plusDays(1);
@@ -70,7 +70,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_CrossingYearBoundary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 12, 15);
         final DateTime oneCycleLater = startDate.plusMonths(getBillingPeriod().getNumberOfMonths());
@@ -85,7 +85,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, oneCycleLater.plusDays(1), 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_StartingMidFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 15);
         final DateTime targetDate = startDate.plusMonths(getBillingPeriod().getNumberOfMonths());
@@ -93,7 +93,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_StartingMidFebruaryOfLeapYear() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 2, 15);
         final DateTime targetDate = startDate.plusMonths(getBillingPeriod().getNumberOfMonths());
@@ -101,7 +101,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_MovingForwardThroughTime() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 31);
         BigDecimal expectedValue = ONE;
@@ -122,7 +122,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
     }
 
     // tests for cancellation in less than one period, beginning Jan 1
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testCancelledBeforeOnePeriod_TargetDateInStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 1);
@@ -132,7 +132,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testCancelledBeforeOnePeriod_TargetDateInSubscriptionPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 7);
@@ -142,7 +142,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testCancelledBeforeOnePeriod_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 15);
@@ -152,7 +152,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testCancelledBeforeOnePeriod_TargetDateAfterEndDateButInFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 17);
@@ -162,7 +162,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testCancelledBeforeOnePeriod_TargetDateAtEndOfFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -172,7 +172,7 @@ public abstract class GenericProRationTestBase extends ProRationInAdvanceTestBas
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testCancelledBeforeOnePeriod_TargetDateAfterFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 5);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestDoubleProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestDoubleProRation.java
index fb8a71c..06573d9 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestDoubleProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestDoubleProRation.java
@@ -31,7 +31,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.MONTHLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 1);
@@ -41,7 +41,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInFirstProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 7);
@@ -51,7 +51,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnFirstBillingCycleDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 15);
@@ -61,7 +61,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInFullBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 22);
@@ -74,7 +74,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnSecondBillingCycleDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 27);
@@ -88,7 +88,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInSecondProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 26);
@@ -102,7 +102,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 27);
@@ -116,7 +116,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 3, 7);
@@ -130,7 +130,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRationWithMultiplePeriods_TargetDateInSecondFullBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 26);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestLeadingProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestLeadingProRation.java
index c25721a..aa76033 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestLeadingProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestLeadingProRation.java
@@ -25,14 +25,13 @@ import com.ning.billing.catalog.api.BillingPeriod;
 import com.ning.billing.invoice.model.InvalidDateSequenceException;
 import com.ning.billing.invoice.tests.inAdvance.ProRationInAdvanceTestBase;
 
-
 public class TestLeadingProRation extends ProRationInAdvanceTestBase {
     @Override
     protected BillingPeriod getBillingPeriod() {
         return BillingPeriod.MONTHLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -43,7 +42,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 4);
@@ -54,7 +53,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateOnFirstBillingDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 13);
@@ -65,7 +64,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateAfterFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 13);
@@ -76,7 +75,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -88,7 +87,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 4);
@@ -100,7 +99,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnFirstBillingDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 13);
@@ -112,7 +111,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateInFinalBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 10);
@@ -124,7 +123,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 13);
@@ -136,7 +135,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 10);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestProRation.java
index 9fbf5b3..d0e4726 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestProRation.java
@@ -31,7 +31,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.MONTHLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 10);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 24);
@@ -41,7 +41,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 10, ONE_HALF);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange_BeforeBillCycleDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 3);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 17);
@@ -51,7 +51,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 3, ONE_HALF);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange_OnBillCycleDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 3);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 17);
@@ -61,7 +61,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 3, ONE_AND_A_HALF);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange_AfterBillCycleDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 3);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 17);
@@ -71,7 +71,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 3, ONE_AND_A_HALF);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_WithChangeOfBillCycleDayToLaterDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime planChangeDate = buildDateTime(2011, 2, 15);
@@ -81,7 +81,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_WithChangeOfBillCycleDayToEarlierDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 20);
         final DateTime planChangeDate = buildDateTime(2011, 3, 6);
@@ -91,7 +91,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 6, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_CrossingYearBoundary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 12, 15);
         final DateTime targetDate = buildDateTime(2011, 1, 16);
@@ -99,7 +99,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYear_StartingMidFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 2, 15);
         final DateTime targetDate = buildDateTime(2012, 3, 15);
@@ -107,7 +107,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYear_StartingBeforeFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 1, 15);
         final DateTime targetDate = buildDateTime(2012, 2, 3);
@@ -115,7 +115,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYear_IncludingAllOfFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 1, 30);
         final DateTime targetDate = buildDateTime(2012, 3, 1);
@@ -123,7 +123,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 30, TWO);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_ChangeBCDTo31() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime planChangeDate = buildDateTime(2011, 2, 14);
@@ -138,7 +138,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 31, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_ChangeBCD() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime planChangeDate = buildDateTime(2011, 2, 14);
@@ -153,7 +153,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 27, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYearFebruaryProRation() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 2, 1);
         final DateTime endDate = buildDateTime(2012, 2, 15);
@@ -165,7 +165,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_BeforeBillingDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 7);
         final DateTime changeDate = buildDateTime(2011, 2, 15);
@@ -179,7 +179,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(changeDate, targetDate, 15, THREE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_OnBillingDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 7);
         final DateTime changeDate = buildDateTime(2011, 3, 7);
@@ -192,7 +192,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(changeDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_AfterBillingDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 7);
         final DateTime changeDate = buildDateTime(2011, 3, 10);
@@ -207,7 +207,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(changeDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_DoubleProRation() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 31);
         final DateTime planChangeDate = buildDateTime(2011, 3, 10);
@@ -224,7 +224,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testStartTargetEnd() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 12, 15);
         final DateTime targetDate = buildDateTime(2011, 3, 15);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestTrailingProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestTrailingProRation.java
index 7f814df..40b62e8 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestTrailingProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/monthly/TestTrailingProRation.java
@@ -31,7 +31,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.MONTHLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 7, 25);
@@ -40,7 +40,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateInFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 7, 25);
@@ -49,7 +49,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateAtEndOfFirstBillingCycle() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 7, 25);
@@ -59,7 +59,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 7, 25);
@@ -69,7 +69,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 7, 25);
@@ -78,7 +78,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, endDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 7, 25);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestDoubleProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestDoubleProRation.java
index 3b2b78c..9fe0746 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestDoubleProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestDoubleProRation.java
@@ -25,14 +25,13 @@ import com.ning.billing.catalog.api.BillingPeriod;
 import com.ning.billing.invoice.model.InvalidDateSequenceException;
 import com.ning.billing.invoice.tests.inAdvance.ProRationInAdvanceTestBase;
 
-
 public class TestDoubleProRation extends ProRationInAdvanceTestBase {
     @Override
     protected BillingPeriod getBillingPeriod() {
         return BillingPeriod.QUARTERLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 1);
@@ -43,7 +42,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInFirstProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 7);
@@ -54,7 +53,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnFirstBillingCycleDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 15);
@@ -65,7 +64,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInFullBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 1, 22);
@@ -79,7 +78,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnSecondBillingCycleDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 15);
@@ -94,7 +93,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateInSecondProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 26);
@@ -109,7 +108,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 4, 27);
@@ -124,7 +123,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRation_TargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 5, 7);
@@ -139,7 +138,7 @@ public class TestDoubleProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testDoubleProRationWithMultiplePeriods_TargetDateInSecondFullBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 1);
         final DateTime targetDate = buildDateTime(2011, 6, 26);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestLeadingProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestLeadingProRation.java
index c2291ec..fc7e423 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestLeadingProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestLeadingProRation.java
@@ -31,7 +31,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.QUARTERLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -42,7 +42,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 4);
@@ -53,7 +53,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateOnFirstBillingDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 13);
@@ -64,7 +64,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_Evergreen_TargetDateAfterFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 6, 13);
@@ -75,7 +75,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 1);
@@ -87,7 +87,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 4);
@@ -99,7 +99,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnFirstBillingDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 2, 13);
@@ -111,7 +111,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateInFinalBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 8, 10);
@@ -123,7 +123,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 8, 13);
@@ -135,7 +135,7 @@ public class TestLeadingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 13, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testLeadingProRation_WithEndDate_TargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime targetDate = buildDateTime(2011, 9, 10);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestProRation.java
index e0ebba3..a2884c3 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestProRation.java
@@ -31,7 +31,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.QUARTERLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 10);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 24);
@@ -45,7 +45,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 10, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange_BeforeBillCycleDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 3);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 17);
@@ -59,7 +59,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 3, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange_OnBillCycleDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 3);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 17);
@@ -73,7 +73,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 3, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_WithPhaseChange_AfterBillCycleDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 3);
         final DateTime phaseChangeDate = buildDateTime(2011, 2, 17);
@@ -87,7 +87,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(phaseChangeDate, targetDate, 3, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_WithChangeOfBillCycleDayToLaterDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime planChangeDate = buildDateTime(2011, 2, 15);
@@ -98,7 +98,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_WithChangeOfBillCycleDayToEarlierDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 20);
         final DateTime planChangeDate = buildDateTime(2011, 3, 6);
@@ -109,7 +109,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 6, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_CrossingYearBoundary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 12, 15);
         final DateTime targetDate = buildDateTime(2011, 1, 16);
@@ -117,7 +117,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYear_StartingMidFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 2, 15);
         final DateTime targetDate = buildDateTime(2012, 3, 15);
@@ -125,7 +125,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYear_StartingBeforeFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 1, 15);
         final DateTime targetDate = buildDateTime(2012, 2, 3);
@@ -133,7 +133,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 15, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYear_IncludingAllOfFebruary() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 1, 30);
         final DateTime targetDate = buildDateTime(2012, 3, 1);
@@ -141,7 +141,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, targetDate, 30, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_ChangeBCDTo31() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime planChangeDate = buildDateTime(2011, 2, 14);
@@ -156,7 +156,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 31, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_ChangeBCD() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 1);
         final DateTime planChangeDate = buildDateTime(2011, 2, 14);
@@ -171,7 +171,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 27, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testSinglePlan_LeapYearFebruaryProRation() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2012, 2, 1);
         final DateTime endDate = buildDateTime(2012, 2, 15);
@@ -183,7 +183,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 1, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_BeforeBillingDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 7);
         final DateTime changeDate = buildDateTime(2011, 2, 15);
@@ -197,7 +197,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(changeDate, targetDate, 15, THREE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_OnBillingDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 7);
         final DateTime changeDate = buildDateTime(2011, 5, 7);
@@ -210,7 +210,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(changeDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_AfterBillingDay() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 2, 7);
         final DateTime changeDate = buildDateTime(2011, 5, 10);
@@ -225,7 +225,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(changeDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testPlanChange_DoubleProRation() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 31);
         final DateTime planChangeDate = buildDateTime(2011, 5, 10);
@@ -241,7 +241,7 @@ public class TestProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(planChangeDate, targetDate, 15, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testStartTargetEnd() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 12, 15);
         final DateTime targetDate = buildDateTime(2011, 6, 15);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestTrailingProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestTrailingProRation.java
index 15e63b2..bb40078 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestTrailingProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/quarterly/TestTrailingProRation.java
@@ -31,7 +31,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         return BillingPeriod.QUARTERLY;
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateOnStartDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 9, 25);
@@ -40,7 +40,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateInFirstBillingPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 9, 25);
@@ -49,7 +49,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, ONE);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateAtEndOfFirstBillingCycle() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 9, 25);
@@ -59,7 +59,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateInProRationPeriod() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 9, 25);
@@ -69,7 +69,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, targetDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateOnEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 9, 25);
@@ -78,7 +78,7 @@ public class TestTrailingProRation extends ProRationInAdvanceTestBase {
         testCalculateNumberOfBillingCycles(startDate, endDate, endDate, 17, expectedValue);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testTargetDateAfterEndDate() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2010, 6, 17);
         final DateTime endDate = buildDateTime(2010, 9, 25);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/TestValidationProRation.java b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/TestValidationProRation.java
index e00fad9..6dcf75a 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/TestValidationProRation.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/inAdvance/TestValidationProRation.java
@@ -40,7 +40,7 @@ public class TestValidationProRation extends ProRationTestBase {
         return new InAdvanceBillingMode();
     }
 
-    @Test(groups = {"fast"}, expectedExceptions = InvalidDateSequenceException.class)
+    @Test(groups = "fast", expectedExceptions = InvalidDateSequenceException.class)
     public void testTargetStartEnd() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 30);
         final DateTime endDate = buildDateTime(2011, 3, 15);
@@ -49,7 +49,7 @@ public class TestValidationProRation extends ProRationTestBase {
         calculateNumberOfBillingCycles(startDate, endDate, targetDate, 15);
     }
 
-    @Test(groups = {"fast"},expectedExceptions = InvalidDateSequenceException.class)
+    @Test(groups = "fast", expectedExceptions = InvalidDateSequenceException.class)
     public void testTargetEndStart() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 4, 30);
         final DateTime endDate = buildDateTime(2011, 3, 15);
@@ -58,7 +58,7 @@ public class TestValidationProRation extends ProRationTestBase {
         calculateNumberOfBillingCycles(startDate, endDate, targetDate, 15);
     }
 
-    @Test(groups = {"fast"},expectedExceptions = InvalidDateSequenceException.class)
+    @Test(groups = "fast", expectedExceptions = InvalidDateSequenceException.class)
     public void testEndTargetStart() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 3, 30);
         final DateTime endDate = buildDateTime(2011, 1, 15);
@@ -67,7 +67,7 @@ public class TestValidationProRation extends ProRationTestBase {
         calculateNumberOfBillingCycles(startDate, endDate, targetDate, 15);
     }
 
-    @Test(groups = {"fast"},expectedExceptions = InvalidDateSequenceException.class)
+    @Test(groups = "fast", expectedExceptions = InvalidDateSequenceException.class)
     public void testEndStartTarget() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 1, 30);
         final DateTime endDate = buildDateTime(2011, 1, 15);
@@ -76,7 +76,7 @@ public class TestValidationProRation extends ProRationTestBase {
         calculateNumberOfBillingCycles(startDate, endDate, targetDate, 15);
     }
 
-    @Test(groups = {"fast"},expectedExceptions = InvalidDateSequenceException.class)
+    @Test(groups = "fast", expectedExceptions = InvalidDateSequenceException.class)
     public void testTargetStart() throws InvalidDateSequenceException {
         final DateTime startDate = buildDateTime(2011, 4, 30);
         final DateTime targetDate = buildDateTime(2011, 2, 15);
@@ -84,7 +84,7 @@ public class TestValidationProRation extends ProRationTestBase {
         calculateNumberOfBillingCycles(startDate, targetDate, 15);
     }
 
-    @Test(groups = {"fast"})
+    @Test(groups = "fast")
     public void testBigDecimalTruncation() {
         final BigDecimal value = new BigDecimal("1.3349573498567");
         final BigDecimal truncated = value.setScale(0, BigDecimal.ROUND_DOWN).setScale(NUMBER_OF_DECIMALS);
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/InvoicingTestBase.java b/invoice/src/test/java/com/ning/billing/invoice/tests/InvoicingTestBase.java
index 1b4efdd..edb4450 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/InvoicingTestBase.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/InvoicingTestBase.java
@@ -31,9 +31,10 @@ import com.ning.billing.entitlement.api.SubscriptionTransitionType;
 import com.ning.billing.entitlement.api.billing.BillingEvent;
 import com.ning.billing.entitlement.api.billing.BillingModeType;
 import com.ning.billing.entitlement.api.user.Subscription;
+import com.ning.billing.invoice.InvoiceTestSuiteWithEmbeddedDB;
 import com.ning.billing.invoice.model.InvoicingConfiguration;
 
-public abstract class InvoicingTestBase {
+public abstract class InvoicingTestBase extends InvoiceTestSuiteWithEmbeddedDB {
     protected static final int NUMBER_OF_DECIMALS = InvoicingConfiguration.getNumberOfDecimals();
     protected static final int ROUNDING_METHOD = InvoicingConfiguration.getRoundingMode();
 
diff --git a/invoice/src/test/java/com/ning/billing/invoice/tests/TestChargeBacks.java b/invoice/src/test/java/com/ning/billing/invoice/tests/TestChargeBacks.java
index 069869d..7989167 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/tests/TestChargeBacks.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/tests/TestChargeBacks.java
@@ -29,8 +29,10 @@ import org.skife.jdbi.v2.exceptions.TransactionFailedException;
 import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.Test;
 
+import com.ning.billing.KillbillTestSuiteWithEmbeddedDB;
 import com.ning.billing.catalog.api.Currency;
 import com.ning.billing.dbi.MysqlTestingHelper;
+import com.ning.billing.invoice.InvoiceTestSuiteWithEmbeddedDB;
 import com.ning.billing.invoice.api.Invoice;
 import com.ning.billing.invoice.api.InvoiceApiException;
 import com.ning.billing.invoice.api.InvoiceItem;
@@ -50,7 +52,6 @@ import com.ning.billing.util.callcontext.CallContext;
 import com.ning.billing.util.callcontext.TestCallContext;
 import com.ning.billing.util.clock.Clock;
 import com.ning.billing.util.clock.ClockMock;
-import com.ning.billing.util.io.IOUtils;
 import com.ning.billing.util.tag.api.DefaultTagUserApi;
 import com.ning.billing.util.tag.dao.MockTagDao;
 import com.ning.billing.util.tag.dao.MockTagDefinitionDao;
@@ -62,7 +63,7 @@ import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
-public class TestChargeBacks {
+public class TestChargeBacks extends InvoiceTestSuiteWithEmbeddedDB {
     private static final BigDecimal FIFTEEN = new BigDecimal("15.00");
     private static final BigDecimal THIRTY = new BigDecimal("30.00");
     private static final BigDecimal ONE_MILLION = new BigDecimal("1000000.00");
@@ -72,20 +73,13 @@ public class TestChargeBacks {
     private final Clock clock = new ClockMock();
     private static final Currency CURRENCY = Currency.EUR;
 
-    @BeforeSuite(groups = {"slow"})
+    @BeforeSuite(groups = "slow")
     public void setup() throws IOException {
         loadSystemPropertiesFromClasspath("/resource.properties");
 
-        final MysqlTestingHelper helper = new MysqlTestingHelper();
+        final MysqlTestingHelper helper = KillbillTestSuiteWithEmbeddedDB.getMysqlTestingHelper();
         final IDBI dbi = helper.getDBI();
 
-        final String invoiceDdl = IOUtils.toString(DefaultInvoiceDao.class.getResourceAsStream("/com/ning/billing/invoice/ddl.sql"));
-        final String utilDdl = IOUtils.toString(DefaultInvoiceDao.class.getResourceAsStream("/com/ning/billing/util/ddl.sql"));
-
-        helper.startMysql();
-        helper.initDb(invoiceDdl);
-        helper.initDb(utilDdl);
-
         invoiceSqlDao = dbi.onDemand(InvoiceSqlDao.class);
         invoiceSqlDao.test();
 
@@ -109,7 +103,7 @@ public class TestChargeBacks {
         }
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testCompleteChargeBack() throws InvoiceApiException {
         final Invoice invoice = createAndPersistInvoice(THIRTY);
         final InvoicePayment payment = createAndPersistPayment(invoice.getId(), THIRTY);
@@ -122,7 +116,7 @@ public class TestChargeBacks {
         assertTrue(amount.compareTo(BigDecimal.ZERO) == 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testPartialChargeBack() throws InvoiceApiException {
         final Invoice invoice = createAndPersistInvoice(THIRTY);
         final InvoicePayment payment = createAndPersistPayment(invoice.getId(), THIRTY);
@@ -135,7 +129,7 @@ public class TestChargeBacks {
         assertTrue(amount.compareTo(FIFTEEN) == 0);
     }
 
-    @Test(groups = {"slow"}, expectedExceptions = InvoiceApiException.class)
+    @Test(groups = "slow", expectedExceptions = InvoiceApiException.class)
     public void testChargeBackLargerThanPaymentAmount() throws InvoiceApiException {
         try {
             final Invoice invoice = createAndPersistInvoice(THIRTY);
@@ -149,7 +143,7 @@ public class TestChargeBacks {
         }
     }
 
-    @Test(groups = {"slow"}, expectedExceptions = InvoiceApiException.class)
+    @Test(groups = "slow", expectedExceptions = InvoiceApiException.class)
     public void testNegativeChargeBackAmount() throws InvoiceApiException {
         try {
             final Invoice invoice = createAndPersistInvoice(THIRTY);
@@ -162,7 +156,7 @@ public class TestChargeBacks {
         }
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetAccountIdFromPaymentIdHappyPath() throws InvoiceApiException {
         final Invoice invoice = createAndPersistInvoice(THIRTY);
         final InvoicePayment payment = createAndPersistPayment(invoice.getId(), THIRTY);
@@ -170,19 +164,19 @@ public class TestChargeBacks {
         assertEquals(accountId, invoice.getAccountId());
     }
 
-    @Test(groups = {"slow"}, expectedExceptions = InvoiceApiException.class)
+    @Test(groups = "slow", expectedExceptions = InvoiceApiException.class)
     public void testGetAccountIdFromPaymentIdBadPaymentId() throws InvoiceApiException {
         invoicePaymentApi.getAccountIdFromInvoicePaymentId(UUID.randomUUID());
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetChargeBacksByAccountIdWithEmptyReturnSet() throws InvoiceApiException {
         final List<InvoicePayment> chargebacks = invoicePaymentApi.getChargebacksByAccountId(UUID.randomUUID());
         assertNotNull(chargebacks);
         assertEquals(chargebacks.size(), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetChargeBacksByAccountIdHappyPath() throws InvoiceApiException {
         final Invoice invoice = createAndPersistInvoice(THIRTY);
         final InvoicePayment payment = createAndPersistPayment(invoice.getId(), THIRTY);
@@ -196,14 +190,14 @@ public class TestChargeBacks {
         assertEquals(chargebacks.get(0).getLinkedInvoicePaymentId(), payment.getId());
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetChargeBacksByPaymentIdWithEmptyReturnSet() throws InvoiceApiException {
         final List<InvoicePayment> chargebacks = invoicePaymentApi.getChargebacksByPaymentId(UUID.randomUUID());
         assertNotNull(chargebacks);
         assertEquals(chargebacks.size(), 0);
     }
 
-    @Test(groups = {"slow"})
+    @Test(groups = "slow")
     public void testGetChargeBacksByInvoicePaymentIdHappyPath() throws InvoiceApiException {
         final Invoice invoice = createAndPersistInvoice(THIRTY);
         final InvoicePayment payment = createAndPersistPayment(invoice.getId(), THIRTY);