@Override
    public boolean isAvailable(DeviceId deviceId) {
        return getDevice(deviceId) != null;
    }
@Test(expected = NullPointerException.class)
    public void testIsAvailableByNullId() {
        manager.registerTenantId(TenantId.tenantId(tenantIdValue1));
        VirtualNetwork virtualNetwork = manager.createVirtualNetwork(TenantId.tenantId(tenantIdValue1));
        DeviceService deviceService = manager.get(virtualNetwork.id(), DeviceService.class);

        // test the isAvailable() method with null device id value.
        deviceService.isAvailable(null);
    }