@Override
    public void unwatch(final String key) {
        try {
            ScheduledFuture<?> scheduledFuture = listenerThreadsMap.get(key);
            if (Objects.nonNull(scheduledFuture)) {
                scheduledFuture.cancel(true);
                listenerThreadsMap.remove(key);
                LOGGER.info("EurekaDiscoveryService unwatch key {} successfully", key);
            }
        } catch (Exception e) {
            LOGGER.error("Error removing eureka watch task for key '{}': {}", key, e.getMessage(), e);
            throw new ShenyuException(e);
        }
    }
@Test
    void testUnwatch() throws NoSuchFieldException, IllegalAccessException {
        final String key = "testService";

        final ScheduledFuture<?> mockFuture = mock(ScheduledFuture.class);
        final ConcurrentMap<String, ScheduledFuture<?>> mockListenerThreadsMap = new ConcurrentHashMap<>();
        mockListenerThreadsMap.put(key, mockFuture);
        setField(eurekaDiscoveryServiceUnderTest.getClass(), "listenerThreadsMap", mockListenerThreadsMap);

        eurekaDiscoveryServiceUnderTest.unwatch(key);

        verify(mockFuture, times(1)).cancel(true);
        assertFalse(mockListenerThreadsMap.containsKey(key));
    }