@Override
    public boolean isReachable(DeviceId deviceId) {
        String id = deviceId.uri().getSchemeSpecificPart();
        JID jid = new JID(id);
        XmppDeviceId xmppDeviceId = new XmppDeviceId(jid);
        return controller.getDevice(xmppDeviceId) != null;
    }
@Test
    public void testIsReachable() {
        assertTrue(provider.isReachable(DeviceId.deviceId("reachable@xmpp.org")));
        assertFalse(provider.isReachable(DeviceId.deviceId("non-reachable@xmpp.org")));
    }