public void registerCredentialListener(CredentialListener listener) {
        this.listener = listener;
    }
@Test
    void testRegisterCredentialListener() {
        CredentialListener expect = mock(CredentialListener.class);
        CredentialService credentialService1 = CredentialService.getInstance();
        credentialService1.registerCredentialListener(expect);
        Credentials newCredentials = new Credentials();
        newCredentials.setAccessKey("ak");
        credentialService1.setCredential(newCredentials);
        verify(expect, times(1)).onUpdateCredential();
    }