Migrate MockitoJUnitRunner
[openflowplugin.git] / extension / openflowplugin-extension-nicira / src / test / java / org / opendaylight / openflowplugin / extension / vendor / nicira / convertor / match / NshMdtypeConvertorTest.java
index bfc2f5cee8096b690efeed2db5497aecc4010e2c..bd895964d14ea8af42771393b642bfa6aac2cc67 100644 (file)
@@ -14,9 +14,9 @@ import static org.mockito.Mockito.when;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
 import org.opendaylight.openflowplugin.extension.api.path.MatchPath;
@@ -34,6 +34,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.ni
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.nsh.mdtype.grouping.NxmNxNshMdtype;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.nsh.mdtype.grouping.NxmNxNshMdtypeBuilder;
 import org.opendaylight.yangtools.yang.binding.Augmentation;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 @RunWith(MockitoJUnitRunner.class)
 public class NshMdtypeConvertorTest {
@@ -42,17 +43,17 @@ public class NshMdtypeConvertorTest {
 
     private NshMdtypeConvertor convertor;
 
-    private static final Short MDTYPE_VALUE = (short) 0x7B;
+    private static final Uint8 MDTYPE_VALUE = Uint8.valueOf(0x7B);
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         NxmNxNshMdtype nxmNxNshMdtype = new NxmNxNshMdtypeBuilder()
                 .setValue(MDTYPE_VALUE)
                 .build();
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshMdtype(nxmNxNshMdtype)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         convertor = new NshMdtypeConvertor();