### Question:
AzureKeyVaultClientFactory { KeyVaultClient getAuthenticatedClient() { return new KeyVaultClient(clientCredentials); } AzureKeyVaultClientFactory(ServiceClientCredentials clientCredentials);   }### Answer:
@Test public void injectedCredentialsUsedToGetClient() { AzureKeyVaultClientCredentials clientCredentials = mock(AzureKeyVaultClientCredentials.class); keyVaultClientFactory = new AzureKeyVaultClientFactory(clientCredentials); keyVaultClientFactory.getAuthenticatedClient(); verify(clientCredentials).applyCredentialsFilter(any()); }