@Override
    public void subscribeService(Service service, Subscriber subscriber, String clientId) {
        Service singleton = ServiceManager.getInstance().getSingletonIfExist(service).orElse(service);
        Client client = clientManager.getClient(clientId);
        checkClientIsLegal(client, clientId);
        client.addServiceSubscriber(singleton, subscriber);
        client.setLastUpdatedTime();
        NotifyCenter.publishEvent(new ClientOperationEvent.ClientSubscribeServiceEvent(singleton, clientId));
    }
@Test
    void testSubscribeWhenClientNull() {
        assertThrows(NacosRuntimeException.class, () -> {
            when(clientManager.getClient(anyString())).thenReturn(null);
            // Excepted exception
            ephemeralClientOperationServiceImpl.subscribeService(service, subscriber, ipPortBasedClientId);
        });
    }