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;
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 {
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();