killbill-memoizeit

payment: trivial cleanups Signed-off-by: Pierre-Alexandre

12/1/2015 11:53:45 AM

Details

diff --git a/payment/src/main/java/org/killbill/billing/payment/dispatcher/PluginDispatcher.java b/payment/src/main/java/org/killbill/billing/payment/dispatcher/PluginDispatcher.java
index e023d9f..a457e17 100644
--- a/payment/src/main/java/org/killbill/billing/payment/dispatcher/PluginDispatcher.java
+++ b/payment/src/main/java/org/killbill/billing/payment/dispatcher/PluginDispatcher.java
@@ -31,9 +31,11 @@ import org.killbill.commons.profiling.Profiling;
 import org.killbill.commons.profiling.ProfilingData;
 import org.killbill.commons.request.Request;
 
+import com.google.common.annotations.VisibleForTesting;
+
 public class PluginDispatcher<ReturnType> {
 
-    private final TimeUnit DEEFAULT_PLUGIN_TIMEOUT_UNIT = TimeUnit.SECONDS;
+    private final TimeUnit DEFAULT_PLUGIN_TIMEOUT_UNIT = TimeUnit.SECONDS;
 
     private final long timeoutSeconds;
     private final PaymentExecutors paymentExecutors;
@@ -45,10 +47,11 @@ public class PluginDispatcher<ReturnType> {
 
     // TODO Once we switch fully to automata, should this throw PaymentPluginApiException instead?
     public ReturnType dispatchWithTimeout(final Callable<PluginDispatcherReturnType<ReturnType>> task) throws TimeoutException, ExecutionException, InterruptedException {
-        return dispatchWithTimeout(task, timeoutSeconds, DEEFAULT_PLUGIN_TIMEOUT_UNIT);
+        return dispatchWithTimeout(task, timeoutSeconds, DEFAULT_PLUGIN_TIMEOUT_UNIT);
     }
 
-    public ReturnType dispatchWithTimeout(final Callable<PluginDispatcherReturnType<ReturnType>> task, final long timeout, final TimeUnit unit)
+    @VisibleForTesting
+    ReturnType dispatchWithTimeout(final Callable<PluginDispatcherReturnType<ReturnType>> task, final long timeout, final TimeUnit unit)
             throws TimeoutException, ExecutionException, InterruptedException {
 
         final ExecutorService pluginExecutor = paymentExecutors.getPluginExecutorService();
diff --git a/payment/src/test/java/org/killbill/billing/payment/dao/TestPaymentDao.java b/payment/src/test/java/org/killbill/billing/payment/dao/TestPaymentDao.java
index 93e85a2..94d024a 100644
--- a/payment/src/test/java/org/killbill/billing/payment/dao/TestPaymentDao.java
+++ b/payment/src/test/java/org/killbill/billing/payment/dao/TestPaymentDao.java
@@ -498,7 +498,6 @@ public class TestPaymentDao extends PaymentTestSuiteWithEmbeddedDB {
 
         final Iterator<PaymentTransactionModelDao> iterator = result.iterator();
         for (int i = 0; i < NB_ENTRIES; i++) {
-            System.out.println("i = " + i);
             Assert.assertTrue(iterator.hasNext());
             final PaymentTransactionModelDao nextEntry = iterator.next();
             Assert.assertEquals(nextEntry.getTransactionStatus(), TransactionStatus.UNKNOWN);