}
private Provider newProviderMockWithBuilder() {
Provider provider = mock(Provider.class);
ProviderBuilder providerBuilder = mock(ProviderBuilder.class);
when(providerBuilder.options(anyMapOf(String.class, String.class))).thenReturn(providerBuilder);
when(providerBuilder.createProvider()).thenReturn(provider);
when(provider.toBuilder()).thenReturn(providerBuilder);
return provider;
}