public static PacketLinkRealizedByOptical create(ConnectPoint src, ConnectPoint dst,
                                                     OpticalCircuitIntent intent) {
        checkNotNull(src);
        checkNotNull(dst);
        checkNotNull(intent);

        long rate = intent.getSignalType().bitRate();
        return new PacketLinkRealizedByOptical(src, dst, intent.key(), Bandwidth.bps(rate));
    }
@Test
    public void testCreate() {
        ConnectPoint cp1 = new ConnectPoint(DeviceId.deviceId("of:0000000000000001"), PortNumber.portNumber(1L));
        ConnectPoint cp2 = new ConnectPoint(DeviceId.deviceId("of:0000000000000002"), PortNumber.portNumber(2L));
        Key key = Key.of(10L, appId);
        Bandwidth bandwidth = Bandwidth.bps(100L);

        PacketLinkRealizedByOptical plink = new PacketLinkRealizedByOptical(cp1, cp2, key, bandwidth);

        assertNotNull(plink);
        assertEquals(plink.src(), cp1);
        assertEquals(plink.dst(), cp2);
        assertEquals((long) plink.bandwidth().bps(), 100L);
    }