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.opendaylight.openflowplugin.extension.api.ExtensionAugment;
private TunIdConvertor tunIdConvertor;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
final NxmNxTunIdBuilder nxmNxTunIdBuilder = new NxmNxTunIdBuilder()
.setValue(BigInteger.ONE);
final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder =
nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunId(nxmNxTunIdBuilder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
- when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+ when(extension.augmentation(ArgumentMatchers.any()))
.thenReturn(extensionAugmentation);
tunIdConvertor = new TunIdConvertor();
}
@Test
- public void testConvert() throws Exception {
+ public void testConvert() {
final MatchEntry converted = tunIdConvertor.convert(extension);
Assert.assertEquals(BigInteger.ONE, ((TunIdCaseValue)converted.getMatchEntryValue())
.getTunIdValues().getValue());
}
@Test
- public void testConvert1() throws Exception {
+ public void testConvert1() {
final TunIdValuesBuilder tunIdValuesBuilder = new TunIdValuesBuilder()
.setValue(BigInteger.TEN);
final TunIdCaseValueBuilder tunIdCaseValueBuilder = new TunIdCaseValueBuilder()