InternalCacheBuilder { public InternalCacheBuilder setIsClient(boolean isClient) { this.isClient = isClient; metricsSessionBuilder.setIsClient(isClient); return this; } InternalCacheBuilder();  InternalCacheBuilder(Properties configProperties);  InternalCacheBuilder(CacheConfig cacheConfig); private  InternalCacheBuilder(Properties configProperties, CacheConfig cacheConfig); @VisibleForTesting  InternalCacheBuilder(Properties configProperties,
      CacheConfig cacheConfig,
      MetricsService.Builder metricsSessionBuilder,
      Supplier<InternalDistributedSystem> singletonSystemSupplier,
      InternalDistributedSystemConstructor internalDistributedSystemConstructor,
      Supplier<InternalCache> singletonCacheSupplier,
      InternalCacheConstructor internalCacheConstructor); InternalCache create(); InternalCache create(InternalDistributedSystem internalDistributedSystem); InternalCacheBuilder set(String name, String value); InternalCacheBuilder setPdxReadSerialized(boolean readSerialized); InternalCacheBuilder setSecurityManager(SecurityManager securityManager); InternalCacheBuilder setPostProcessor(PostProcessor postProcessor); InternalCacheBuilder setPdxSerializer(PdxSerializer serializer); InternalCacheBuilder setPdxDiskStore(String diskStoreName); InternalCacheBuilder setPdxPersistent(boolean isPersistent); InternalCacheBuilder setPdxIgnoreUnreadFields(boolean ignore); InternalCacheBuilder setCacheXMLDescription(String cacheXML); InternalCacheBuilder setIsExistingOk(boolean isExistingOk); InternalCacheBuilder setIsClient(boolean isClient); InternalCacheBuilder setUseAsyncEventListeners(boolean useAsyncEventListeners); InternalCacheBuilder setPoolFactory(PoolFactory poolFactory); InternalCacheBuilder setTypeRegistry(TypeRegistry typeRegistry); InternalCacheBuilder addMeterSubregistry(MeterRegistry subregistry);  }
@Test public void setsMetricsServiceBuilderIsClientFalseByDefault() { MetricsService.Builder theMetricsServiceBuilder = mock(MetricsService.Builder.class); new InternalCacheBuilder(new Properties(), new CacheConfig(), theMetricsServiceBuilder, nullSingletonSystemSupplier, constructorOf(constructedSystem()), nullSingletonCacheSupplier, constructorOf(constructedCache())); verify(theMetricsServiceBuilder).setIsClient(false); }
@Test public void setIsClient_setsIsClientInMetricsServiceBuilder() { MetricsService.Builder theMetricsServiceBuilder = mock(MetricsService.Builder.class); InternalCacheBuilder internalCacheBuilder = new InternalCacheBuilder( new Properties(), new CacheConfig(), theMetricsServiceBuilder, nullSingletonSystemSupplier, constructorOf(constructedSystem()), nullSingletonCacheSupplier, constructorOf(constructedCache())); internalCacheBuilder.setIsClient(true); verify(theMetricsServiceBuilder).setIsClient(true); }