### Question:
SecureClientProvider implements ClientProvider<TransportClient> { @Override public TransportClient createClient() { Settings.Builder clientSettingsBuilder = Settings.builder(); auth.configure(clientSettingsBuilder); clientSettings.applyTo(clientSettingsBuilder); return TransportClient.builder() .addPlugin(ShieldPlugin.class) .settings(clientSettingsBuilder.build()) .build(); } SecureClientProvider(Auth<Settings.Builder> auth);  SecureClientProvider(Auth<Settings.Builder> auth, ClientSettings clientSettings); @Override TransportClient createClient();  }### Answer:
@Test public void providedAuthIsUsedToCustomizeClient() { Auth<Settings.Builder> auth = mock(Auth.class); ClientProvider<TransportClient> clientProvider = new SecureClientProvider(auth); clientProvider.createClient(); Mockito.verify(auth).configure(any()); }
@Test public void providedClientSettingsAreUsedToCustomizeClient() { Auth<Settings.Builder> auth = mock(Auth.class); ClientSettings clientSettings = mock(ClientSettings.class); ClientProvider clientProvider = new SecureClientProvider(auth, clientSettings); clientProvider.createClient(); Mockito.verify(clientSettings).applyTo(any()); }