Move null check from getTotalMemory()
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / ReplicatedLogImplTest.java
index 9bef4fb..c6ee950 100644 (file)
@@ -15,7 +15,6 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
 import akka.japi.Procedure;
 import java.util.Collections;
-import java.util.function.Supplier;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 import org.hamcrest.Matcher;
@@ -125,12 +124,7 @@ public class ReplicatedLogImplTest {
     public void testAppendAndPersistExpectingCaptureDueToDataSize() throws Exception {
         doReturn(1L).when(mockBehavior).getReplicatedToAllIndex();
 
-        context.setTotalMemoryRetriever(new Supplier<Long>() {
-            @Override
-            public Long get() {
-                return 100L;
-            }
-        });
+        context.setTotalMemoryRetriever(() -> 100);
 
         ReplicatedLog log = ReplicatedLogImpl.newInstance(context);
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.