@Override
    public List<Port> getPorts(DeviceId deviceId) {
        checkNotNull(deviceId, DEVICE_NULL);
        return manager.getVirtualPorts(this.networkId, deviceId)
                .stream()
                .collect(Collectors.toList());
    }
@Test(expected = NullPointerException.class)
    public void testGetPortsByNullId() {
        manager.registerTenantId(TenantId.tenantId(tenantIdValue1));
        VirtualNetwork virtualNetwork = manager.createVirtualNetwork(TenantId.tenantId(tenantIdValue1));
        DeviceService deviceService = manager.get(virtualNetwork.id(), DeviceService.class);

        // test the getPorts() method using a null device identifier
        deviceService.getPorts(null);
    }