@Test
public void benchmarkGetNowMicrosUtc() throws InterruptedException {

    CountDownLatch latch = new CountDownLatch(1);
    Thread[] threads = new Thread[NUM_THREADS];
    final Exception[] e = { null };
    for (int i = 0; i < threads.length; i++) {
        threads[i] = new Thread() {
            @Override
            public void run() {
                // Wait for test thread to give the start signal
                try {
                    latch.await();
                } catch (InterruptedException ie) {
                    e[0] = ie;
                    return;
                }
                long max = 0;
                for (int i = 0; i < NUM_ITERATIONS; i++) {
                    long now = Utils.getNowMicrosUtc();
                    if (now < max) {
                        e[0] = new Exception("Time moved backwards:" + now + " < " + max);
                        return;
                    }
                    max = now;
                }
            }
        };
        threads[i].start();
    }
    long start;
    long stop;
    start = System.nanoTime();
    latch.countDown();
    for (int i = 0; i < threads.length; i++) {
        threads[i].join();
    }
    stop = System.nanoTime();
    assertNull(e[0]);
    System.out.println(String.format("Elapsed: %dms",
            TimeUnit.NANOSECONDS.toMillis(stop - start)));
}