assertTrue(ref instanceof InternalReference);
InternalReference r = (InternalReference) ref;
assertNotNull(r.choose(registry));
assertFalse(r.choose(registry).iterator().hasNext());
registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
assertNotNull(r.choose(registry));
assertTrue(r.choose(registry).iterator().hasNext());
registry.unregister(endpoint, null);
assertNotNull(r.choose(registry));
assertFalse(r.choose(registry).iterator().hasNext());
}