package org.opendaylight.protocol.bgp.mvpn.spi.pojo.nlri;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.mvpn.MvpnChoice;
public final class SimpleMvpnNlriRegistryTest {
- @Test(expected = IllegalArgumentException.class)
+ @Test
public void registryParseTest() {
- SimpleMvpnNlriRegistry.getInstance().parseMvpn(NlriType.InterAsIPmsiAD, null);
+ assertThrows(IllegalArgumentException.class,
+ () -> SimpleMvpnNlriRegistry.getInstance().parseMvpn(NlriType.InterAsIPmsiAD, null));
}
@Test
assertEquals(0, body.readableBytes());
}
- private class NotRegistered implements MvpnChoice {
+ private static final class NotRegistered implements MvpnChoice {
@Override
public Class<NotRegistered> implementedInterface() {
return NotRegistered.class;