public void removePublisherIndexesByEmptyService(Service service) {
        if (publisherIndexes.containsKey(service) && publisherIndexes.get(service).isEmpty()) {
            publisherIndexes.remove(service);
        }
    }
@Test
    void testRemovePublisherIndexesByEmptyService() throws NoSuchFieldException, IllegalAccessException {
        clientServiceIndexesManager.removePublisherIndexesByEmptyService(service);
        
        Class<ClientServiceIndexesManager> clientServiceIndexesManagerClass = ClientServiceIndexesManager.class;
        Field publisherIndexesField = clientServiceIndexesManagerClass.getDeclaredField("publisherIndexes");
        publisherIndexesField.setAccessible(true);
        ConcurrentMap<Service, Set<String>> publisherIndexes = (ConcurrentMap<Service, Set<String>>) publisherIndexesField.get(
                clientServiceIndexesManager);
        
        assertEquals(1, publisherIndexes.size());
    }