X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fmapping%2Foperations%2FDefaultCloseSessionTest.java;h=cacee6c986208c98894ecb23457b63c9fc28db2f;hb=refs%2Fchanges%2F13%2F23413%2F26;hp=b45b116b1262cbc67879de52a49482e0f7b43128;hpb=dea515c8870769408b9bea29f555d6b71ff43211;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSessionTest.java b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSessionTest.java index b45b116b12..cacee6c986 100644 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSessionTest.java +++ b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSessionTest.java @@ -23,14 +23,15 @@ import io.netty.util.concurrent.GenericFutureListener; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; +import org.opendaylight.controller.config.util.xml.DocumentedException; +import org.opendaylight.controller.config.util.xml.XmlElement; +import org.opendaylight.controller.config.util.xml.XmlUtil; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; import org.opendaylight.controller.netconf.api.NetconfMessage; import org.opendaylight.controller.netconf.api.NetconfTerminationReason; import org.opendaylight.controller.netconf.impl.NetconfServerSession; import org.opendaylight.controller.netconf.impl.NetconfServerSessionListener; import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader; -import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Document; public class DefaultCloseSessionTest { @@ -47,7 +48,7 @@ public class DefaultCloseSessionTest { doReturn(mock(ChannelFuture.class)).when(channel).close(); final ChannelFuture sendFuture = mock(ChannelFuture.class); - doAnswer(new Answer() { + doAnswer(new Answer() { @Override public Object answer(final InvocationOnMock invocation) throws Throwable { ((GenericFutureListener) invocation.getArguments()[0]).operationComplete(sendFuture); @@ -71,7 +72,7 @@ public class DefaultCloseSessionTest { verify(listener).onSessionTerminated(any(NetconfServerSession.class), any(NetconfTerminationReason.class)); } - @Test(expected = NetconfDocumentedException.class) + @Test(expected = DocumentedException.class) public void testDefaultCloseSession2() throws Exception { AutoCloseable res = mock(AutoCloseable.class); doThrow(NetconfDocumentedException.class).when(res).close();