killbill-memoizeit

Details

diff --git a/account/src/test/java/com/ning/billing/account/api/TestDefaultAccount.java b/account/src/test/java/com/ning/billing/account/api/TestDefaultAccount.java
index e9fe421..b8d4dcc 100644
--- a/account/src/test/java/com/ning/billing/account/api/TestDefaultAccount.java
+++ b/account/src/test/java/com/ning/billing/account/api/TestDefaultAccount.java
@@ -30,7 +30,7 @@ import com.ning.billing.catalog.api.Currency;
 
 public class TestDefaultAccount extends AccountTestSuiteNoDB {
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test if Account constructor can accept null values")
     public void testConstructorAcceptsNullValues() throws Exception {
         final AccountData accountData = getNullAccountData();
         final Account account = new DefaultAccount(UUID.randomUUID(), accountData);
@@ -56,7 +56,7 @@ public class TestDefaultAccount extends AccountTestSuiteNoDB {
         Assert.assertEquals(account.isNotifiedForInvoices(), DefaultAccount.DEFAULT_NOTIFIED_FOR_INVOICES_VALUE);
     }
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test mergeWithDelegate Account api")
     public void testMergeWithDelegate() throws Exception {
         final AccountData accountData = getNullAccountData();
         final Account account = new DefaultAccount(UUID.randomUUID(), accountData);
@@ -68,7 +68,7 @@ public class TestDefaultAccount extends AccountTestSuiteNoDB {
         checkAccountEquals(finalAccount, secondAccount);
     }
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test Account BCD merge")
     public void testBCDMerges() throws Exception {
         final UUID accountId = UUID.randomUUID();
         final Currency currency = Currency.BRL;
diff --git a/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApi.java b/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApi.java
index b0a1187..8e3de00 100644
--- a/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApi.java
+++ b/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApi.java
@@ -36,7 +36,7 @@ import static com.ning.billing.account.AccountTestUtils.createTestAccount;
 
 public class TestDefaultAccountUserApi extends AccountTestSuiteWithEmbeddedDB {
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account update with null values")
     public void testShouldBeAbleToPassNullForSomeFieldsToAvoidUpdate() throws Exception {
         final Account account = accountUserApi.createAccount(new DefaultAccount(createTestAccount()), callContext);
 
@@ -57,7 +57,7 @@ public class TestDefaultAccountUserApi extends AccountTestSuiteWithEmbeddedDB {
         Assert.assertEquals(retrievedAccount.getBillCycleDayLocal(), account.getBillCycleDayLocal());
     }
 
-    @Test(groups = "slow", expectedExceptions = IllegalArgumentException.class)
+    @Test(groups = "slow", expectedExceptions = IllegalArgumentException.class, description="Test updating Account BCD does throws an exception")
     public void testShouldntBeAbleToUpdateBillCycleDay() throws Exception {
         final Account account = accountUserApi.createAccount(new DefaultAccount(createTestAccount()), callContext);
 
@@ -67,7 +67,7 @@ public class TestDefaultAccountUserApi extends AccountTestSuiteWithEmbeddedDB {
         accountUserApi.updateAccount(new DefaultAccount(account.getId(), otherAccount), callContext);
     }
 
-    @Test(groups = "slow", expectedExceptions = IllegalArgumentException.class)
+    @Test(groups = "slow", expectedExceptions = IllegalArgumentException.class, description="Test updating Account currency throws an exception")
     public void testShouldntBeAbleToUpdateCurrency() throws Exception {
         final Account account = accountUserApi.createAccount(new DefaultAccount(createTestAccount()), callContext);
 
@@ -77,7 +77,7 @@ public class TestDefaultAccountUserApi extends AccountTestSuiteWithEmbeddedDB {
         accountUserApi.updateAccount(new DefaultAccount(account.getId(), otherAccount), callContext);
     }
 
-    @Test(groups = "slow", expectedExceptions = IllegalArgumentException.class)
+    @Test(groups = "slow", expectedExceptions = IllegalArgumentException.class, description="Test updating Account externalKey throws an exception")
     public void testShouldntBeAbleToUpdateExternalKey() throws Exception {
         final Account account = accountUserApi.createAccount(new DefaultAccount(createTestAccount()), callContext);
 
@@ -86,26 +86,4 @@ public class TestDefaultAccountUserApi extends AccountTestSuiteWithEmbeddedDB {
 
         accountUserApi.updateAccount(new DefaultAccount(account.getId(), otherAccount), callContext);
     }
-
-    private class TestMigrationAccountData extends DefaultMutableAccountData implements MigrationAccountData {
-
-        public TestMigrationAccountData(final AccountData accountData) {
-            super(accountData);
-        }
-
-        @Override
-        public DateTime getCreatedDate() {
-            return null;
-        }
-
-        @Override
-        public DateTime getUpdatedDate() {
-            return null;
-        }
-
-        @Override
-        public List<String> getAdditionalContactEmails() {
-            return null;
-        }
-    }
 }
diff --git a/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApiWithMocks.java b/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApiWithMocks.java
index 071c039..4b10feb 100644
--- a/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApiWithMocks.java
+++ b/account/src/test/java/com/ning/billing/account/api/user/TestDefaultAccountUserApiWithMocks.java
@@ -55,7 +55,7 @@ public class TestDefaultAccountUserApiWithMocks extends AccountTestSuiteNoDB {
         accountUserApi = new DefaultAccountUserApi(factory, internalFactory, accountDao);
     }
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test Account create API")
     public void testCreateAccount() throws Exception {
         final UUID id = UUID.randomUUID();
         final String externalKey = UUID.randomUUID().toString();
@@ -105,7 +105,7 @@ public class TestDefaultAccountUserApiWithMocks extends AccountTestSuiteNoDB {
         Assert.assertEquals(account.getIsNotifiedForInvoices(), isNotifiedForInvoices);
     }
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test ability to add email to Account")
     public void testAddEmail() throws Exception {
         final UUID accountId = UUID.randomUUID();
 
diff --git a/account/src/test/java/com/ning/billing/account/api/user/TestEventJson.java b/account/src/test/java/com/ning/billing/account/api/user/TestEventJson.java
index 4b4005f..58cc20f 100644
--- a/account/src/test/java/com/ning/billing/account/api/user/TestEventJson.java
+++ b/account/src/test/java/com/ning/billing/account/api/user/TestEventJson.java
@@ -34,7 +34,7 @@ public class TestEventJson extends AccountTestSuiteNoDB {
 
     private final ObjectMapper mapper = new ObjectMapper();
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test Account event deserialization")
     public void testDefaultAccountChangeEvent() throws Exception {
         final List<ChangedField> changes = new ArrayList<ChangedField>();
         changes.add(new DefaultChangedField("fieldXX", "valueX", "valueXXX"));
@@ -48,7 +48,7 @@ public class TestEventJson extends AccountTestSuiteNoDB {
         Assert.assertTrue(obj.equals(e));
     }
 
-    @Test(groups = "fast")
+    @Test(groups = "fast", description="Test Account event serialization")
     public void testAccountCreationEvent() throws Exception {
         final DefaultAccountData data = new DefaultAccountData("dsfdsf", "bobo", 3, "bobo@yahoo.com", 12, "USD", UUID.randomUUID(),
                                                                "UTC", "US", "21 avenue", "", "Gling", "San Franciso", "CA", "94110", "USA", "4126789887", false, false);
diff --git a/account/src/test/java/com/ning/billing/account/dao/TestAccountDao.java b/account/src/test/java/com/ning/billing/account/dao/TestAccountDao.java
index 17df3eb..d407232 100644
--- a/account/src/test/java/com/ning/billing/account/dao/TestAccountDao.java
+++ b/account/src/test/java/com/ning/billing/account/dao/TestAccountDao.java
@@ -54,7 +54,7 @@ import static com.ning.billing.account.AccountTestUtils.createTestAccount;
 
 public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account: basic DAO calls")
     public void testBasic() throws AccountApiException {
         final AccountModelDao account = createTestAccount();
         accountDao.create(account, internalCallContext);
@@ -80,7 +80,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
     }
 
     // Simple test to ensure long phone numbers can be stored
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: long numbers")
     public void testLongPhoneNumber() throws AccountApiException {
         final AccountModelDao account = createTestAccount("123456789012345678901234");
         accountDao.create(account, internalCallContext);
@@ -90,7 +90,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
     }
 
     // Simple test to ensure excessively long phone numbers cannot be stored
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: very long numbers")
     public void testOverlyLongPhoneNumber() throws AccountApiException {
         final AccountModelDao account = createTestAccount("12345678901234567890123456");
         try {
@@ -101,7 +101,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         }
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: custom fields")
     public void testCustomFields() throws CustomFieldApiException {
         final UUID accountId = UUID.randomUUID();
         final String fieldName = UUID.randomUUID().toString().substring(0, 4);
@@ -118,7 +118,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         Assert.assertEquals(customField.getFieldValue(), fieldValue);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: tags")
     public void testTags() throws TagApiException, TagDefinitionApiException {
         final AccountModelDao account = createTestAccount();
         final TagDefinitionModelDao tagDefinition = tagDefinitionDao.create(UUID.randomUUID().toString().substring(0, 4), UUID.randomUUID().toString(), internalCallContext);
@@ -132,7 +132,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         Assert.assertEquals(tags.get(0).getObjectType(), ObjectType.ACCOUNT);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: retrieve by externalKey")
     public void testGetIdFromKey() throws AccountApiException {
         final AccountModelDao account = createTestAccount();
         accountDao.create(account, internalCallContext);
@@ -141,12 +141,12 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         Assert.assertEquals(accountId, account.getId());
     }
 
-    @Test(groups = "slow", expectedExceptions = AccountApiException.class)
+    @Test(groups = "slow", expectedExceptions = AccountApiException.class, description="Test Account DAO: retrieve by null externalKey throws an exception")
     public void testGetIdFromKeyForNullKey() throws AccountApiException {
         accountDao.getIdFromKey(null, internalCallContext);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: basic update (1)")
     public void testUpdate() throws Exception {
         final AccountModelDao account = createTestAccount();
         accountDao.create(account, internalCallContext);
@@ -163,7 +163,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         checkAccountsEqual(retrievedAccount, updatedAccount);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: payment method update")
     public void testUpdatePaymentMethod() throws Exception {
         final AccountModelDao account = createTestAccount();
         accountDao.create(account, internalCallContext);
@@ -181,7 +181,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         Assert.assertNull(newAccountWithPMNull.getPaymentMethodId());
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: basic update (2)")
     public void testShouldBeAbleToUpdateSomeFields() throws Exception {
         final AccountModelDao account = createTestAccount();
         accountDao.create(account, internalCallContext);
@@ -196,7 +196,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         checkAccountsEqual(retrievedAccount, newAccount);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: BCD of 0")
     public void testShouldBeAbleToHandleBCDOfZero() throws Exception {
         final AccountModelDao account = createTestAccount(0);
         accountDao.create(account, internalCallContext);
@@ -206,7 +206,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         checkAccountsEqual(retrievedAccount, account);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: duplicate emails throws an exception")
     public void testHandleDuplicateEmails() throws AccountApiException {
         final UUID accountId = UUID.randomUUID();
         final AccountEmail email = new DefaultAccountEmail(accountId, "test@gmail.com");
@@ -224,7 +224,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         }
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: add and remove email")
     public void testAddRemoveAccountEmail() throws AccountApiException {
         final UUID accountId = UUID.randomUUID();
 
@@ -247,7 +247,7 @@ public class TestAccountDao extends AccountTestSuiteWithEmbeddedDB {
         Assert.assertEquals(accountDao.getEmailsByAccountId(accountId, internalCallContext).size(), 0);
     }
 
-    @Test(groups = "slow")
+    @Test(groups = "slow", description="Test Account DAO: add and remove multiple emails")
     public void testAddAndRemoveMultipleAccountEmails() throws AccountApiException {
         final UUID accountId = UUID.randomUUID();
         final String email1 = UUID.randomUUID().toString();