X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-client%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fclient%2FNetconfClientSessionNegotiatorTest.java;h=eb45a4dcd4b8075dbbdbeb7ce04709371d328407;hp=9993f48a4d2029977c62c35a4e28de7a122ac422;hb=b2e81149739c87f0ecc2ce7f06448d7a5d3162b8;hpb=5a13583d01c187cf7589753636a21e6354be0f83 diff --git a/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorTest.java b/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorTest.java index 9993f48a4d..eb45a4dcd4 100644 --- a/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorTest.java +++ b/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorTest.java @@ -61,10 +61,9 @@ public class NetconfClientSessionNegotiatorTest { pipeline = mockChannelPipeline(); future = mockChannelFuture(); channel = mockChannel(); - System.out.println("setup done"); } - private ChannelHandler mockChannelHandler() { + private static ChannelHandler mockChannelHandler() { ChannelHandler handler = mock(ChannelHandler.class); return handler; } @@ -83,13 +82,13 @@ public class NetconfClientSessionNegotiatorTest { return channel; } - private ChannelFuture mockChannelFuture() { + private static ChannelFuture mockChannelFuture() { ChannelFuture future = mock(ChannelFuture.class); doReturn(future).when(future).addListener(any(GenericFutureListener.class)); return future; } - private ChannelPipeline mockChannelPipeline() { + private static ChannelPipeline mockChannelPipeline() { ChannelPipeline pipeline = mock(ChannelPipeline.class); ChannelHandler handler = mock(ChannelHandler.class); doReturn(pipeline).when(pipeline).addAfter(anyString(), anyString(), any(ChannelHandler.class)); @@ -103,7 +102,7 @@ public class NetconfClientSessionNegotiatorTest { return pipeline; } - private NetconfClientSessionNegotiator createNetconfClientSessionNegotiator(final Promise promise, + private NetconfClientSessionNegotiator createNetconfClientSessionNegotiator(final Promise promise, final NetconfMessage startExi) { ChannelProgressivePromise progressivePromise = mock(ChannelProgressivePromise.class); NetconfClientSessionPreferences preferences = new NetconfClientSessionPreferences(helloMessage, startExi); @@ -122,7 +121,7 @@ public class NetconfClientSessionNegotiatorTest { NetconfClientSessionNegotiator negotiator = createNetconfClientSessionNegotiator(promise, null); negotiator.channelActive(null); - Set caps = Sets.newSet("a", "b"); + Set caps = Sets.newSet("a", "b"); NetconfHelloMessage helloServerMessage = NetconfHelloMessage.createServerHello(caps, 10); negotiator.handleMessage(helloServerMessage); verify(promise).setSuccess(anyObject()); @@ -137,7 +136,7 @@ public class NetconfClientSessionNegotiatorTest { NetconfClientSessionNegotiator negotiator = createNetconfClientSessionNegotiator(promise, exiMessage); negotiator.channelActive(null); - Set caps = Sets.newSet("exi:1.0"); + Set caps = Sets.newSet("exi:1.0"); NetconfHelloMessage helloMessage = NetconfHelloMessage.createServerHello(caps, 10); doAnswer(new Answer() {