this.stats = statisticsProvider.createStatistics(distributedSystem, location);
CacheClientUpdater.CCUStats ccuStats = mock(CacheClientUpdater.CCUStats.class); when(statisticsProvider .createStatistics(distributedSystem, location)) .thenReturn(ccuStats);
/** * Creates a new {@code CacheClientUpdater} with a given name that waits for a server to connect * on a given port. * * @param name descriptive name, used for our ThreadGroup * @param location the endpoint we represent * @param primary true if our endpoint is primary * @param ids the system we are distributing messages through * * @throws AuthenticationRequiredException when client is not configured to send credentials using * security-* system properties but server expects credentials * @throws AuthenticationFailedException when authentication of the client fails * @throws ServerRefusedConnectionException when handshake fails for other reasons like using * durable client ID that is already in use by another client or some server side * exception while reading handshake/verifying credentials */ public CacheClientUpdater(String name, ServerLocation location, boolean primary, DistributedSystem ids, ClientSideHandshake handshake, QueueManager qManager, EndpointManager eManager, Endpoint endpoint, int handshakeTimeout, SocketCreator socketCreator) throws AuthenticationRequiredException, AuthenticationFailedException, ServerRefusedConnectionException { this(name, location, primary, ids, handshake, qManager, eManager, endpoint, handshakeTimeout, socketCreator, new StatisticsProvider()); }