@Test public void onDestroyShutsDownExecutor() { ExecutorService executorService = mock(ExecutorService.class); credentials = new AzureKeyVaultClientCredentials("id", "secret", executorService); credentials.onDestroy(); verify(executorService).shutdown(); }
@PreDestroy public void onDestroy() { executorService.shutdown(); }
AzureKeyVaultClientCredentials extends KeyVaultCredentials { @PreDestroy public void onDestroy() { executorService.shutdown(); } }
AzureKeyVaultClientCredentials extends KeyVaultCredentials { @PreDestroy public void onDestroy() { executorService.shutdown(); } AzureKeyVaultClientCredentials(String clientId, String clientSecret, ExecutorService executorService); }
AzureKeyVaultClientCredentials extends KeyVaultCredentials { @PreDestroy public void onDestroy() { executorService.shutdown(); } AzureKeyVaultClientCredentials(String clientId, String clientSecret, ExecutorService executorService); @Override String doAuthenticate(String authorization, String resource, String scope); @PreDestroy void onDestroy(); }
AzureKeyVaultClientCredentials extends KeyVaultCredentials { @PreDestroy public void onDestroy() { executorService.shutdown(); } AzureKeyVaultClientCredentials(String clientId, String clientSecret, ExecutorService executorService); @Override String doAuthenticate(String authorization, String resource, String scope); @PreDestroy void onDestroy();  }