*/
package org.opendaylight.netconf.server.mapping.operations;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import io.netty.channel.ChannelPromise;
import io.netty.channel.EventLoop;
import io.netty.util.concurrent.GenericFutureListener;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.opendaylight.netconf.api.DocumentedException;
import org.opendaylight.netconf.api.NetconfDocumentedException;
import org.opendaylight.netconf.api.NetconfTerminationReason;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.w3c.dom.Document;
-public class DefaultCloseSessionTest {
+class DefaultCloseSessionTest {
private static void mockEventLoop(final Channel channel) {
final var eventLoop = mock(EventLoop.class);
}
@Test
- public void testDefaultCloseSession() throws Exception {
+ void testDefaultCloseSession() throws Exception {
AutoCloseable res = mock(AutoCloseable.class);
doNothing().when(res).close();
DefaultCloseSession close = new DefaultCloseSession(new SessionIdType(Uint32.TEN), res);
}
@Test
- public void testDefaultCloseSession2() throws Exception {
+ void testDefaultCloseSession2() throws Exception {
final var expectedCause = new NetconfDocumentedException("testMessage");
final var res = mock(AutoCloseable.class);
doThrow(expectedCause).when(res).close();
*/
package org.opendaylight.netconf.server.mapping.operations;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelPipeline;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.opendaylight.netconf.api.xml.XmlElement;
import org.opendaylight.netconf.api.xml.XmlUtil;
import org.opendaylight.netconf.server.NetconfServerSession;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.w3c.dom.Document;
-public class DefaultStopExiTest {
+class DefaultStopExiTest {
@Test
- public void testHandleWithNoSubsequentOperations() throws Exception {
+ void testHandleWithNoSubsequentOperations() throws Exception {
final DefaultStopExi exi = new DefaultStopExi(new SessionIdType(Uint32.ONE));
final Document doc = XmlUtil.newDocument();
Channel channel = mock(Channel.class);