Merge "Removing { } from NormalizedNodeJsonBodyWriter"
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / FollowerLogInformationImplTest.java
index 7df9f3713ffc302dcf100c45a93b8fd034b0fffa..84d1545a65e3302462b69f9ee96f8dd982955654 100644 (file)
@@ -7,14 +7,12 @@
  */
 package org.opendaylight.controller.cluster.raft;
 
-
 import com.google.common.base.Stopwatch;
 import com.google.common.util.concurrent.Uninterruptibles;
 import org.junit.Test;
 import scala.concurrent.duration.FiniteDuration;
 
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -29,7 +27,7 @@ public class FollowerLogInformationImplTest {
 
         FollowerLogInformation followerLogInformation =
             new FollowerLogInformationImpl(
-                "follower1", new AtomicLong(10), new AtomicLong(9), timeoutDuration);
+                "follower1", 10, 9, timeoutDuration);
 
 
 
@@ -57,8 +55,7 @@ public class FollowerLogInformationImplTest {
     // hence getting the actual elapsed time and do a match.
     // if the sleep has spilled over, then return the test gracefully
     private long sleepWithElaspsedTimeReturned(long millis) {
-        Stopwatch stopwatch = new Stopwatch();
-        stopwatch.start();
+        Stopwatch stopwatch = Stopwatch.createStarted();
         Uninterruptibles.sleepUninterruptibly(millis, TimeUnit.MILLISECONDS);
         stopwatch.stop();
         return stopwatch.elapsed(TimeUnit.MILLISECONDS);