@Override
    public void registerRemote(final RemoteInstance remoteInstance) throws ServiceRegisterException {
        try {
            this.port = remoteInstance.getAddress().getPort();
            healthChecker.health();
        } catch (Throwable e) {
            healthChecker.unHealth(e);
            throw new ServiceRegisterException(e.getMessage());
        }
    }
@Test
    public void registerRemote() throws Exception {
        RemoteInstance instance = new RemoteInstance(addressA);
        withEnvironmentVariable(SELF_UID, SELF_UID).execute(() -> {
            providerA = createProvider(SELF_UID);
            coordinatorA = getClusterCoordinator(providerA);
            coordinatorA.start();
        });
        doReturn(Optional.of(Collections.singletonList(podA)))
                .when(NamespacedPodListInformer.INFORMER)
                .listPods();

        ClusterMockWatcher watcher = new ClusterMockWatcher();
        coordinatorA.registerWatcher(watcher);
        coordinatorA.registerRemote(instance);
        KubernetesCoordinator.K8sResourceEventHandler listener = coordinatorA.new K8sResourceEventHandler();
        listener.onAdd(podA);

        List<RemoteInstance> remoteInstances = watcher.getRemoteInstances();
        assertEquals(1, remoteInstances.size());
        assertEquals(1, coordinatorA.queryRemoteNodes().size());
        Address queryAddress = remoteInstances.get(0).getAddress();
        assertEquals(addressA, queryAddress);
        assertTrue(queryAddress.isSelf());
    }