Code Clean Up
[bgpcep.git] / pcep / impl / src / test / java / org / opendaylight / protocol / pcep / impl / AbstractPCEPSessionTest.java
index f42aca5f751e7da532709349d888e931f2337b0b..933ffac672a003d8d25e61fd4b254ded1c3d2750 100644 (file)
@@ -82,13 +82,10 @@ public class AbstractPCEPSessionTest {
     public final void setUp() {
         MockitoAnnotations.initMocks(this);
         final ChannelFuture future = new DefaultChannelPromise(this.channel);
-        doAnswer(new Answer<Object>() {
-            @Override
-            public Object answer(final InvocationOnMock invocation) {
-                final Object[] args = invocation.getArguments();
-                AbstractPCEPSessionTest.this.msgsSend.add((Notification) args[0]);
-                return future;
-            }
+        doAnswer(invocation -> {
+            final Object[] args = invocation.getArguments();
+            AbstractPCEPSessionTest.this.msgsSend.add((Notification) args[0]);
+            return future;
         }).when(this.channel).writeAndFlush(any(Notification.class));
         doReturn(this.channelFuture).when(this.channel).closeFuture();
         doReturn(this.channelFuture).when(this.channelFuture).addListener(any(GenericFutureListener.class));