public void setStaticCredential(Credentials credential) {
        if (watcher != null) {
            watcher.stop();
        }
        setCredential(credential);
    }
@Test
    void testSetStaticCredential() throws NoSuchFieldException, IllegalAccessException {
        CredentialService credentialService1 = CredentialService.getInstance();
        CredentialWatcher mockWatcher = mock(CredentialWatcher.class);
        Field watcherField = CredentialService.class.getDeclaredField("watcher");
        watcherField.setAccessible(true);
        watcherField.set(credentialService1, mockWatcher);
        Credentials credential = new Credentials();
        //when
        credentialService1.setStaticCredential(credential);
        //then
        assertEquals(credential, credentialService1.getCredential());
        verify(mockWatcher, times(1)).stop();
    }