package com.yelp.clientlib.util;

import org.junit.Assert;

import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;


public class AsyncTestUtil {

    public static int defaultAsyncRequestTimeoutMilliseconds = 1000;

    public static void waitAndCheckAsyncRequestStatus(ArrayList returnedObjectWrapper)
            throws InterruptedException {
        waitAndCheckAsyncRequestStatus(returnedObjectWrapper, defaultAsyncRequestTimeoutMilliseconds);
    }

    public static void waitAndCheckAsyncRequestStatus(ArrayList returnedObjectWrapper, int timeoutMilliseconds)
            throws InterruptedException {
        CountDownLatch countDownTimer = new CountDownLatch(1);

        countDownTimer.await(timeoutMilliseconds, TimeUnit.MILLISECONDS);
        Assert.assertFalse(
                String.format("No response got in %d milliseconds.", timeoutMilliseconds),
                returnedObjectWrapper.isEmpty()
        );
    }
}

@@ -194,17 +194,16 @@
 tUtil %7B%0A
-%0A
     publ
@@ -216,50 +216,52 @@
 tic 
+f
 in
-t defaultAsyncRequestTimeoutMilliseconds
+al int DEFAULT_ASYNC_TIMEOUT_MILLISECONDS
  = 1
@@ -461,46 +461,42 @@
 er, 
-defaultAsyncRequestTimeoutMilliseconds
+DEFAULT_ASYNC_TIMEOUT_MILLISECONDS
 );%0A 

rename final variable in AsynTestUtil to fit naming convention