HARegionQueue implements RegionQueue { protected void addClientCQsAndInterestList(ClientUpdateMessageImpl msg, HAEventWrapper haEventWrapper, Map haContainer, String regionName) { ClientProxyMembershipID proxyID = ((HAContainerWrapper) haContainer).getProxyID(regionName); if (proxyID != null) { if (haEventWrapper.getClientCqs() != null) { CqNameToOp clientCQ = haEventWrapper.getClientCqs().get(proxyID); if (clientCQ != null) { msg.addClientCqs(proxyID, clientCQ); } } ClientUpdateMessageImpl clientMsg = (ClientUpdateMessageImpl) haEventWrapper.getClientUpdateMessage(); if (clientMsg != null) { if (clientMsg.isClientInterestedInUpdates(proxyID)) { msg.addClientInterestList(proxyID, true); } else if (clientMsg.isClientInterestedInInvalidates(proxyID)) { msg.addClientInterestList(proxyID, false); } } } } protected  HARegionQueue(String regionName, InternalCache cache, Map haContainer,
      ClientProxyMembershipID clientProxyId, final byte clientConflation, boolean isPrimary,
      StatisticsClock statisticsClock); @VisibleForTesting  HARegionQueue(String regionName, HARegion haRegion, InternalCache cache, Map haContainer,
      ClientProxyMembershipID clientProxyId, final byte clientConflation, boolean isPrimary,
      HARegionQueueStats stats, StoppableReentrantReadWriteLock giiLock,
      StoppableReentrantReadWriteLock rwLock, CancelCriterion cancelCriterion,
      boolean puttingGIIDataInQueue, StatisticsClock statisticsClock); static String createRegionName(String regionName); boolean isQueueInitializedWithWait(long waitTime); @SuppressWarnings("synthetic-access") void recordEventState(InternalDistributedMember sender, Map eventState); @Override boolean put(Object object); void startGiiQueueing(); void endGiiQueueing(); Map getEventMapForGII(); static synchronized void stopHAServices(); static int getMessageSyncInterval(); static void setMessageSyncInterval(int seconds); boolean destroyFromAvailableIDs(Long position); @Override String toString(); @Override HARegion getRegion(); @Override Object take(); @Override List take(int batchSize); @Override void remove(); @Override Object peek(); @Override List peek(int batchSize); @Override List peek(int batchSize, int timeToWait); @Override void addCacheListener(CacheListener listener); @Override void removeCacheListener(); void addDispatchedMessage(ThreadIdentifier tid, long sequenceId); void createAckedEventsMap(); void setAckedEvents(); static Map getDispatchedMessagesMapForTesting(); HARegionQueueStats getStatistics(); @Override int size(); boolean isEmpty(); static HARegionQueue getHARegionQueueInstance(String regionName, InternalCache cache,
      final int haRgnQType, final boolean isDurable, StatisticsClock statisticsClock); static HARegionQueue getHARegionQueueInstance(String regionName, InternalCache cache,
      HARegionQueueAttributes hrqa, final int haRgnQType, final boolean isDurable, Map haContainer,
      ClientProxyMembershipID clientProxyId, final byte clientConflation, boolean isPrimary,
      boolean canHandleDelta, StatisticsClock statisticsClock); static HARegionQueue getHARegionQueueInstance(String regionName, InternalCache cache,
      HARegionQueueAttributes hrqa, final int haRgnQType, final boolean isDurable,
      StatisticsClock statisticsClock); boolean isEmptyAckList(); void closeClientCq(ClientProxyMembershipID clientId, InternalCqQuery cqToClose); Object updateHAEventWrapper(InternalDistributedMember sender,
      CachedDeserializable newValueCd, String regionName); void clearPeekedIDs(); @Override void remove(int top); void destroy(); boolean noPrimaryOrHasRegisteredInterest(); void setHasRegisteredInterest(boolean flag); boolean getHasRegisteredInterest(); Conflatable getAndRemoveFromHAContainer(Conflatable conflatable); void decAndRemoveFromHAContainer(HAEventWrapper wrapper); void decAndRemoveFromHAContainer(HAEventWrapper wrapper, String caller); boolean isPrimary(); boolean isQueueInitialized(); void setPrimary(boolean flag); void setClientConflation(byte value); void initializeTransients(); static boolean isTestMarkerMessageReceived(); static void setUsedByTest(boolean isUsedByTest); boolean isClientSlowReceiver(); @Override void close(); boolean isPeekInitialized(); Queue getGiiQueue(); synchronized void synchronizeQueueWithPrimary(InternalDistributedMember primary,
      InternalCache cache); public HARegionQueueStats stats; static final int BLOCKING_HA_QUEUE; static final int NON_BLOCKING_HA_QUEUE; static final String HA_EVICTION_POLICY_NONE; static final String HA_EVICTION_POLICY_MEMORY; static final String HA_EVICTION_POLICY_ENTRY; static final long INIT_OF_SEQUENCEID; static final int DEFAULT_MESSAGE_SYNC_INTERVAL; public boolean isClientSlowReceiver; }
@Test public void whenProxyIDisNullThenItIsNotAddedToClientInterestList() { ClientUpdateMessageImpl clientUpdateMessage = mock(ClientUpdateMessageImpl.class); HAEventWrapper haEventWrapper = mock(HAEventWrapper.class); HAContainerWrapper haContainerWrapper = mock(HAContainerWrapper.class); String regionName = "mockRegion"; when(haContainerWrapper.getProxyID(any())).thenReturn(null); haRegionQueue.addClientCQsAndInterestList(clientUpdateMessage, haEventWrapper, haContainerWrapper, regionName); verify(haEventWrapper, times(0)).getClientCqs(); verify(haEventWrapper, times(0)).getClientUpdateMessage(); }