public void stop() {
        if (stopped) {
            return;
        }
        if (executor != null) {
            synchronized (executor) {
                stopped = true;
                executor.shutdown();
            }
        }
        SPAS_LOGGER.info("[{}] {} is stopped", appName, this.getClass().getSimpleName());
    }
@Test
    void testStop() throws NoSuchFieldException, IllegalAccessException {
        credentialWatcher.stop();
        Field executorField = CredentialWatcher.class.getDeclaredField("executor");
        executorField.setAccessible(true);
        ScheduledExecutorService executor = (ScheduledExecutorService) executorField.get(credentialWatcher);
        assertTrue(executor.isShutdown());
    }