killbill-memoizeit

catalog: small cleanups in tests * Make sure to use the Guice

2/1/2013 8:38:20 PM

Changes

catalog/src/test/java/com/ning/billing/catalog/rules/MockPlanRules.java 33(+0 -33)

Details

diff --git a/catalog/src/test/java/com/ning/billing/catalog/CatalogTestSuiteNoDB.java b/catalog/src/test/java/com/ning/billing/catalog/CatalogTestSuiteNoDB.java
index a9c7512..3687ad1 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/CatalogTestSuiteNoDB.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/CatalogTestSuiteNoDB.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2012 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -20,12 +20,17 @@ import org.testng.annotations.BeforeClass;
 
 import com.ning.billing.GuicyKillbillTestSuiteNoDB;
 import com.ning.billing.catalog.glue.TestCatalogModuleNoDB;
+import com.ning.billing.catalog.io.VersionedCatalogLoader;
 
 import com.google.inject.Guice;
+import com.google.inject.Inject;
 import com.google.inject.Injector;
 
 public abstract class CatalogTestSuiteNoDB extends GuicyKillbillTestSuiteNoDB {
 
+    @Inject
+    protected VersionedCatalogLoader loader;
+
     @BeforeClass(groups = "fast")
     protected void setup() throws Exception {
         final Injector injector = Guice.createInjector(new TestCatalogModuleNoDB());
diff --git a/catalog/src/test/java/com/ning/billing/catalog/io/TestVersionedCatalogLoader.java b/catalog/src/test/java/com/ning/billing/catalog/io/TestVersionedCatalogLoader.java
index 97a74d3..ba28499 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/io/TestVersionedCatalogLoader.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/io/TestVersionedCatalogLoader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -16,8 +16,6 @@
 
 package com.ning.billing.catalog.io;
 
-import javax.xml.bind.JAXBException;
-import javax.xml.transform.TransformerException;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URI;
@@ -26,21 +24,23 @@ import java.net.URL;
 import java.util.Iterator;
 import java.util.List;
 
+import javax.xml.bind.JAXBException;
+import javax.xml.transform.TransformerException;
+
 import org.joda.time.DateTime;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 import org.xml.sax.SAXException;
 
-import com.google.common.io.Resources;
 import com.ning.billing.catalog.CatalogTestSuiteNoDB;
 import com.ning.billing.catalog.StandaloneCatalog;
 import com.ning.billing.catalog.VersionedCatalog;
 import com.ning.billing.catalog.api.InvalidConfigException;
 import com.ning.billing.lifecycle.KillbillService.ServiceException;
-import com.ning.billing.util.clock.DefaultClock;
+
+import com.google.common.io.Resources;
 
 public class TestVersionedCatalogLoader extends CatalogTestSuiteNoDB {
-    private final VersionedCatalogLoader loader = new VersionedCatalogLoader(new DefaultClock());
 
     @Test(groups = "fast")
     public void testAppendToURI() throws IOException, URISyntaxException {
@@ -54,9 +54,9 @@ public class TestVersionedCatalogLoader extends CatalogTestSuiteNoDB {
     @Test(groups = "fast")
     public void testFindXmlFileReferences() throws MalformedURLException, URISyntaxException {
         final String page = "dg.xml\n" +
-                "replica.foo\n" +
-                "snv1/\n" +
-                "viking.xml\n";
+                            "replica.foo\n" +
+                            "snv1/\n" +
+                            "viking.xml\n";
         final List<URI> urls = loader.findXmlFileReferences(page, new URL("http://ning.com/"));
         Assert.assertEquals(urls.size(), 2);
         Assert.assertEquals(urls.get(0).toString(), "http://ning.com/dg.xml");
@@ -66,22 +66,22 @@ public class TestVersionedCatalogLoader extends CatalogTestSuiteNoDB {
     @Test(groups = "fast")
     public void testExtractHrefs() {
         final String page = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">" +
-                "<html>" +
-                " <head>" +
-                "  <title>Index of /config/trunk/xno</title>" +
-                " </head>" +
-                " <body>" +
-                "<h1>Index of /config/trunk/xno</h1>" +
-                "<ul><li><a href=\"/config/trunk/\"> Parent Directory</a></li>" +
-                "<li><a href=\"dg.xml\"> dg.xml</a></li>" +
-                "<li><a href=\"replica.foo\"> replica/</a></li>" +
-                "<li><a href=\"replica2/\"> replica2/</a></li>" +
-                "<li><a href=\"replica_dyson/\"> replica_dyson/</a></li>" +
-                "<li><a href=\"snv1/\"> snv1/</a></li>" +
-                "<li><a href=\"viking.xml\"> viking.xml</a></li>" +
-                "</ul>" +
-                "<address>Apache/2.2.3 (CentOS) Server at <a href=\"mailto:kate@ning.com\">gepo.ningops.net</a> Port 80</address>" +
-                "</body></html>";
+                            "<html>" +
+                            " <head>" +
+                            "  <title>Index of /config/trunk/xno</title>" +
+                            " </head>" +
+                            " <body>" +
+                            "<h1>Index of /config/trunk/xno</h1>" +
+                            "<ul><li><a href=\"/config/trunk/\"> Parent Directory</a></li>" +
+                            "<li><a href=\"dg.xml\"> dg.xml</a></li>" +
+                            "<li><a href=\"replica.foo\"> replica/</a></li>" +
+                            "<li><a href=\"replica2/\"> replica2/</a></li>" +
+                            "<li><a href=\"replica_dyson/\"> replica_dyson/</a></li>" +
+                            "<li><a href=\"snv1/\"> snv1/</a></li>" +
+                            "<li><a href=\"viking.xml\"> viking.xml</a></li>" +
+                            "</ul>" +
+                            "<address>Apache/2.2.3 (CentOS) Server at <a href=\"mailto:kate@ning.com\">gepo.ningops.net</a> Port 80</address>" +
+                            "</body></html>";
         final List<String> hrefs = loader.extractHrefs(page);
         Assert.assertEquals(hrefs.size(), 8);
         Assert.assertEquals(hrefs.get(0), "/config/trunk/");
@@ -91,22 +91,22 @@ public class TestVersionedCatalogLoader extends CatalogTestSuiteNoDB {
     @Test(groups = "fast")
     public void testFindXmlUrlReferences() throws MalformedURLException, URISyntaxException {
         final String page = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">" +
-                "<html>" +
-                " <head>" +
-                "  <title>Index of /config/trunk/xno</title>" +
-                " </head>" +
-                " <body>" +
-                "<h1>Index of /config/trunk/xno</h1>" +
-                "<ul><li><a href=\"/config/trunk/\"> Parent Directory</a></li>" +
-                "<li><a href=\"dg.xml\"> dg.xml</a></li>" +
-                "<li><a href=\"replica.foo\"> replica/</a></li>" +
-                "<li><a href=\"replica2/\"> replica2/</a></li>" +
-                "<li><a href=\"replica_dyson/\"> replica_dyson/</a></li>" +
-                "<li><a href=\"snv1/\"> snv1/</a></li>" +
-                "<li><a href=\"viking.xml\"> viking.xml</a></li>" +
-                "</ul>" +
-                "<address>Apache/2.2.3 (CentOS) Server at <a href=\"mailto:kate@ning.com\">gepo.ningops.net</a> Port 80</address>" +
-                "</body></html>";
+                            "<html>" +
+                            " <head>" +
+                            "  <title>Index of /config/trunk/xno</title>" +
+                            " </head>" +
+                            " <body>" +
+                            "<h1>Index of /config/trunk/xno</h1>" +
+                            "<ul><li><a href=\"/config/trunk/\"> Parent Directory</a></li>" +
+                            "<li><a href=\"dg.xml\"> dg.xml</a></li>" +
+                            "<li><a href=\"replica.foo\"> replica/</a></li>" +
+                            "<li><a href=\"replica2/\"> replica2/</a></li>" +
+                            "<li><a href=\"replica_dyson/\"> replica_dyson/</a></li>" +
+                            "<li><a href=\"snv1/\"> snv1/</a></li>" +
+                            "<li><a href=\"viking.xml\"> viking.xml</a></li>" +
+                            "</ul>" +
+                            "<address>Apache/2.2.3 (CentOS) Server at <a href=\"mailto:kate@ning.com\">gepo.ningops.net</a> Port 80</address>" +
+                            "</body></html>";
         final List<URI> uris = loader.findXmlUrlReferences(page, new URL("http://ning.com/"));
         Assert.assertEquals(uris.size(), 2);
         Assert.assertEquals(uris.get(0).toString(), "http://ning.com/dg.xml");
diff --git a/catalog/src/test/java/com/ning/billing/catalog/io/TestXMLReader.java b/catalog/src/test/java/com/ning/billing/catalog/io/TestXMLReader.java
index acf588c..dd50f9d 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/io/TestXMLReader.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/io/TestXMLReader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -19,12 +19,14 @@ package com.ning.billing.catalog.io;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.io.Resources;
 import com.ning.billing.catalog.CatalogTestSuiteNoDB;
 import com.ning.billing.catalog.StandaloneCatalog;
 import com.ning.billing.util.config.catalog.XMLLoader;
 
+import com.google.common.io.Resources;
+
 public class TestXMLReader extends CatalogTestSuiteNoDB {
+
     @Test(groups = "fast")
     public void testCatalogLoad() {
         try {
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockCatalog.java b/catalog/src/test/java/com/ning/billing/catalog/MockCatalog.java
index c4e1f84..b51983e 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockCatalog.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockCatalog.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -42,6 +42,7 @@ import com.ning.billing.catalog.rules.CaseCreateAlignment;
 import com.ning.billing.catalog.rules.PlanRules;
 
 public class MockCatalog extends StandaloneCatalog implements Catalog {
+
     private static final String[] PRODUCT_NAMES = new String[]{"TestProduct1", "TestProduct2", "TestProduct3"};
     private boolean canCreatePlan;
     private PlanChangeResult planChange;
@@ -69,7 +70,6 @@ public class MockCatalog extends StandaloneCatalog implements Catalog {
 
     }
 
-
     public void populatePriceLists() {
         final DefaultPlan[] plans = getCurrentPlans();
 
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockCatalogModule.java b/catalog/src/test/java/com/ning/billing/catalog/MockCatalogModule.java
index 30435bb..9a5250b 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockCatalogModule.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockCatalogModule.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -18,11 +18,13 @@ package com.ning.billing.catalog;
 
 import org.mockito.Mockito;
 
-import com.google.inject.AbstractModule;
 import com.ning.billing.catalog.api.Catalog;
 import com.ning.billing.catalog.api.CatalogService;
 
+import com.google.inject.AbstractModule;
+
 public class MockCatalogModule extends AbstractModule {
+
     @Override
     protected void configure() {
         final Catalog catalog = Mockito.mock(Catalog.class);
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockCatalogService.java b/catalog/src/test/java/com/ning/billing/catalog/MockCatalogService.java
index ddd235c..2db3f77 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockCatalogService.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockCatalogService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -19,7 +19,6 @@ package com.ning.billing.catalog;
 import com.ning.billing.catalog.api.Catalog;
 import com.ning.billing.catalog.api.StaticCatalog;
 
-
 public class MockCatalogService extends DefaultCatalogService {
 
     private final MockCatalog catalog;
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockInternationalPrice.java b/catalog/src/test/java/com/ning/billing/catalog/MockInternationalPrice.java
index b94b713..381971d 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockInternationalPrice.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockInternationalPrice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockPlan.java b/catalog/src/test/java/com/ning/billing/catalog/MockPlan.java
index 7774d7c..d81d492 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockPlan.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockPlan.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -16,7 +16,6 @@
 
 package com.ning.billing.catalog;
 
-
 public class MockPlan extends DefaultPlan {
 
     public static MockPlan createBicycleTrialEvergreen1USD(final int trialDurationInDays) {
@@ -27,7 +26,6 @@ public class MockPlan extends DefaultPlan {
                             -1);
     }
 
-
     public static MockPlan createBicycleTrialEvergreen1USD() {
         return new MockPlan("BicycleTrialEvergreen1USD",
                             MockProduct.createBicycle(),
@@ -97,7 +95,6 @@ public class MockPlan extends DefaultPlan {
         }
     }
 
-
     public static MockPlan createBicycleNoTrialEvergreen1USD() {
         return new MockPlan("BicycleNoTrialEvergreen1USD",
                             MockProduct.createBicycle(),
@@ -122,7 +119,6 @@ public class MockPlan extends DefaultPlan {
         setPlansAllowedInBundle(1);
     }
 
-
     public static DefaultPlan[] createAll() {
         return new DefaultPlan[]{
                 createBicycleTrialEvergreen1USD(),
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockPlanPhase.java b/catalog/src/test/java/com/ning/billing/catalog/MockPlanPhase.java
index ed3e103..7336a78 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockPlanPhase.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockPlanPhase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -75,7 +75,6 @@ public class MockPlanPhase extends DefaultPlanPhase {
         setFixedPrice(fixedPrice);
     }
 
-
     public MockPlanPhase() {
         this(new MockInternationalPrice(), null);
     }
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockPriceList.java b/catalog/src/test/java/com/ning/billing/catalog/MockPriceList.java
index f482a93..c0a9f78 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockPriceList.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockPriceList.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
diff --git a/catalog/src/test/java/com/ning/billing/catalog/MockProduct.java b/catalog/src/test/java/com/ning/billing/catalog/MockProduct.java
index 5e8f0ec..a32ea93 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/MockProduct.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/MockProduct.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
diff --git a/catalog/src/test/java/com/ning/billing/catalog/rules/Result.java b/catalog/src/test/java/com/ning/billing/catalog/rules/Result.java
index 0df62d9..9dbf085 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/rules/Result.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/rules/Result.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
diff --git a/catalog/src/test/java/com/ning/billing/catalog/rules/TestCase.java b/catalog/src/test/java/com/ning/billing/catalog/rules/TestCase.java
index 4860670..a256ead 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/rules/TestCase.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/rules/TestCase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -35,7 +35,9 @@ import com.ning.billing.catalog.api.PriceListSet;
 import com.ning.billing.catalog.api.ProductCategory;
 
 public class TestCase extends CatalogTestSuiteNoDB {
+
     protected class CaseResult extends Case<Result> {
+
         @XmlElement(required = true)
         private final Result policy;
 
diff --git a/catalog/src/test/java/com/ning/billing/catalog/rules/TestCaseChange.java b/catalog/src/test/java/com/ning/billing/catalog/rules/TestCaseChange.java
index 1ac892a..f66c6a5 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/rules/TestCaseChange.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/rules/TestCaseChange.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -36,7 +36,9 @@ import com.ning.billing.catalog.api.PriceListSet;
 import com.ning.billing.catalog.api.ProductCategory;
 
 public class TestCaseChange extends CatalogTestSuiteNoDB {
+
     protected static class CaseChangeResult extends CaseChange<Result> {
+
         @XmlElement(required = true)
         private final Result result;
 
diff --git a/catalog/src/test/java/com/ning/billing/catalog/rules/TestCasePhase.java b/catalog/src/test/java/com/ning/billing/catalog/rules/TestCasePhase.java
index c20a103..6bdc5b8 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/rules/TestCasePhase.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/rules/TestCasePhase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -34,7 +34,9 @@ import com.ning.billing.catalog.api.PlanPhaseSpecifier;
 import com.ning.billing.catalog.api.ProductCategory;
 
 public class TestCasePhase extends CatalogTestSuiteNoDB {
+
     protected class CaseResult extends CasePhase<Result> {
+
         @XmlElement(required = true)
         private final Result policy;
 
diff --git a/catalog/src/test/java/com/ning/billing/catalog/rules/TestLoadRules.java b/catalog/src/test/java/com/ning/billing/catalog/rules/TestLoadRules.java
index b747abe..d9fe720 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/rules/TestLoadRules.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/rules/TestLoadRules.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -21,7 +21,6 @@ import java.net.URI;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.io.Resources;
 import com.ning.billing.catalog.CatalogTestSuiteNoDB;
 import com.ning.billing.catalog.StandaloneCatalog;
 import com.ning.billing.catalog.api.BillingPeriod;
@@ -30,7 +29,10 @@ import com.ning.billing.catalog.api.PlanSpecifier;
 import com.ning.billing.catalog.api.ProductCategory;
 import com.ning.billing.util.config.catalog.XMLLoader;
 
+import com.google.common.io.Resources;
+
 public class TestLoadRules extends CatalogTestSuiteNoDB {
+
     @Test(groups = "fast")
     public void test() throws Exception {
         final URI uri = new URI(Resources.getResource("WeaponsHireSmall.xml").toExternalForm());
diff --git a/catalog/src/test/java/com/ning/billing/catalog/rules/TestPlanRules.java b/catalog/src/test/java/com/ning/billing/catalog/rules/TestPlanRules.java
index bd468a0..58152dc 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/rules/TestPlanRules.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/rules/TestPlanRules.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -16,8 +16,6 @@
 
 package com.ning.billing.catalog.rules;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -38,11 +36,11 @@ import com.ning.billing.catalog.api.PlanSpecifier;
 import com.ning.billing.catalog.api.PriceListSet;
 
 public class TestPlanRules extends CatalogTestSuiteNoDB {
-    private final Logger log = LoggerFactory.getLogger(TestPlanRules.class);
+
     private MockCatalog cat = null;
 
     @BeforeTest(groups = "fast")
-    public void setup() {
+    public void setupTest() {
         cat = new MockCatalog();
 
         final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[0];
@@ -53,8 +51,8 @@ public class TestPlanRules extends CatalogTestSuiteNoDB {
 
         cat.getPlanRules().
                 setChangeCase(new CaseChangePlanPolicy[]{casePolicy}).
-                setChangeAlignmentCase(new CaseChangePlanAlignment[]{caseAlignment}).
-                setPriceListCase(new CasePriceList[]{casePriceList});
+                   setChangeAlignmentCase(new CaseChangePlanAlignment[]{caseAlignment}).
+                   setPriceListCase(new CasePriceList[]{casePriceList});
     }
 
     @Test(groups = "fast")
@@ -69,7 +67,7 @@ public class TestPlanRules extends CatalogTestSuiteNoDB {
             cat.getPlanRules().planChange(from, to, cat);
             Assert.fail("We did not see an exception when  trying to change plan to the same plan");
         } catch (IllegalPlanChange e) {
-            log.info("Correct - cannot change to the same plan:", e);
+            // Correct - cannot change to the same plan
         } catch (CatalogApiException e) {
             Assert.fail("", e);
         }
@@ -87,7 +85,6 @@ public class TestPlanRules extends CatalogTestSuiteNoDB {
         try {
             result = cat.getPlanRules().planChange(from, to, cat);
         } catch (IllegalPlanChange e) {
-            log.info("Correct - cannot change to the same plan:", e);
             Assert.fail("We should not have triggered this error");
         } catch (CatalogApiException e) {
             Assert.fail("", e);
@@ -112,7 +109,6 @@ public class TestPlanRules extends CatalogTestSuiteNoDB {
         try {
             result = cat.getPlanRules().planChange(from, to, cat);
         } catch (IllegalPlanChange e) {
-            log.info("Correct - cannot change to the same plan:", e);
             Assert.fail("We should not have triggered this error");
         } catch (CatalogApiException e) {
             Assert.fail("", e);
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestCatalogService.java b/catalog/src/test/java/com/ning/billing/catalog/TestCatalogService.java
index dc9e8e4..ad56af9 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestCatalogService.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestCatalogService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -20,11 +20,12 @@ import org.testng.Assert;
 import org.testng.annotations.Test;
 
 import com.ning.billing.catalog.io.VersionedCatalogLoader;
-import com.ning.billing.util.config.CatalogConfig;
 import com.ning.billing.lifecycle.KillbillService.ServiceException;
 import com.ning.billing.util.clock.DefaultClock;
+import com.ning.billing.util.config.CatalogConfig;
 
 public class TestCatalogService extends CatalogTestSuiteNoDB {
+
     @Test(groups = "fast")
     public void testCatalogServiceDirectory() throws ServiceException {
         final DefaultCatalogService service = new DefaultCatalogService(new CatalogConfig() {
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestInternationalPrice.java b/catalog/src/test/java/com/ning/billing/catalog/TestInternationalPrice.java
index 595ec3e..377e9a1 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestInternationalPrice.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestInternationalPrice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -20,8 +20,6 @@ import java.math.BigDecimal;
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -30,7 +28,6 @@ import com.ning.billing.catalog.api.Currency;
 import com.ning.billing.util.config.catalog.ValidationErrors;
 
 public class TestInternationalPrice extends CatalogTestSuiteNoDB {
-    private static final Logger log = LoggerFactory.getLogger(TestInternationalPrice.class);
 
     @Test(groups = "fast")
     public void testZeroValue() throws URISyntaxException, CatalogApiException {
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestPlan.java b/catalog/src/test/java/com/ning/billing/catalog/TestPlan.java
index 467ffee..1ef5322 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestPlan.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestPlan.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -19,8 +19,6 @@ package com.ning.billing.catalog;
 import java.util.Date;
 
 import org.joda.time.DateTime;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -28,7 +26,6 @@ import com.ning.billing.catalog.api.Currency;
 import com.ning.billing.util.config.catalog.ValidationErrors;
 
 public class TestPlan extends CatalogTestSuiteNoDB {
-    private static final Logger log = LoggerFactory.getLogger(TestPlan.class);
 
     @Test(groups = "fast")
     public void testDateValidation() {
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestPlanPhase.java b/catalog/src/test/java/com/ning/billing/catalog/TestPlanPhase.java
index 91ba925..89291b8 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestPlanPhase.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestPlanPhase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -16,8 +16,6 @@
 
 package com.ning.billing.catalog;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -27,12 +25,9 @@ import com.ning.billing.catalog.api.PhaseType;
 import com.ning.billing.util.config.catalog.ValidationErrors;
 
 public class TestPlanPhase extends CatalogTestSuiteNoDB {
-    private final Logger log = LoggerFactory.getLogger(TestPlanPhase.class);
 
     @Test(groups = "fast")
     public void testValidation() {
-        log.info("Testing Plan Phase Validation");
-
         DefaultPlanPhase pp = MockPlanPhase.createUSDMonthlyEvergreen(null, "1.00").setPlan(MockPlan.createBicycleNoTrialEvergreen1USD());//new MockPlanPhase().setBillCycleDuration(BillingPeriod.MONTHLY).setRecurringPrice(null).setFixedPrice(new DefaultInternationalPrice());
 
         ValidationErrors errors = pp.validate(new MockCatalog(), new ValidationErrors());
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestPriceListSet.java b/catalog/src/test/java/com/ning/billing/catalog/TestPriceListSet.java
index cc1783e..c7dcaf7 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestPriceListSet.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestPriceListSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -31,6 +31,7 @@ import static com.ning.billing.catalog.api.PhaseType.DISCOUNT;
 import static com.ning.billing.catalog.api.PhaseType.EVERGREEN;
 
 public class TestPriceListSet extends CatalogTestSuiteNoDB {
+
     @Test(groups = "fast")
     public void testOverriding() throws CatalogApiException {
         final DefaultProduct foo = new DefaultProduct("Foo", ProductCategory.BASE);
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestStandaloneCatalog.java b/catalog/src/test/java/com/ning/billing/catalog/TestStandaloneCatalog.java
index 645775d..28f6ba9 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestStandaloneCatalog.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestStandaloneCatalog.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -23,6 +23,7 @@ import com.ning.billing.catalog.api.CatalogApiException;
 import com.ning.billing.catalog.api.PhaseType;
 
 public class TestStandaloneCatalog extends CatalogTestSuiteNoDB {
+
     @Test(groups = "fast")
     public void testFindPhase() throws CatalogApiException {
         final DefaultPlanPhase phaseTrial1 = new MockPlanPhase().setPhaseType(PhaseType.TRIAL);
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java b/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java
index f568c35..31c4782 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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
@@ -16,34 +16,31 @@
 
 package com.ning.billing.catalog;
 
-import javax.xml.bind.JAXBException;
-import javax.xml.transform.TransformerException;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.net.URISyntaxException;
 import java.util.Date;
 
+import javax.xml.bind.JAXBException;
+import javax.xml.transform.TransformerException;
+
 import org.joda.time.DateTime;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 import org.xml.sax.SAXException;
 
-import com.google.common.io.Resources;
 import com.ning.billing.ErrorCode;
 import com.ning.billing.catalog.api.CatalogApiException;
 import com.ning.billing.catalog.api.Currency;
 import com.ning.billing.catalog.api.InvalidConfigException;
 import com.ning.billing.catalog.api.Plan;
-import com.ning.billing.catalog.io.VersionedCatalogLoader;
 import com.ning.billing.lifecycle.KillbillService.ServiceException;
-import com.ning.billing.util.clock.DefaultClock;
+
+import com.google.common.io.Resources;
 
 public class TestVersionedCatalog extends CatalogTestSuiteNoDB {
-    private static final Logger log = LoggerFactory.getLogger(TestVersionedCatalog.class);
-    private final VersionedCatalogLoader loader = new VersionedCatalogLoader(new DefaultClock());
+
     private VersionedCatalog vc;
 
     @BeforeClass(groups = "fast")
@@ -103,9 +100,7 @@ public class TestVersionedCatalog extends CatalogTestSuiteNoDB {
             vc.findPlan("foo", dt0);
             Assert.fail("Date is too early an exception should have been thrown");
         } catch (CatalogApiException e) {
-            e.printStackTrace();
             Assert.assertEquals(e.getCode(), ErrorCode.CAT_NO_CATALOG_FOR_GIVEN_DATE.getCode());
-
         }
     }
 }
diff --git a/catalog/src/test/java/com/ning/billing/catalog/util/CreateCatalogSchema.java b/catalog/src/test/java/com/ning/billing/catalog/util/CreateCatalogSchema.java
index 42c2883..b5277a9 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/util/CreateCatalogSchema.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/util/CreateCatalogSchema.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2011 Ning, Inc.
+ * Copyright 2010-2013 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