RegionMapCommitPut extends AbstractRegionMapPut { @Override protected boolean entryExists(RegionEntry regionEntry) { return regionEntry != null && !regionEntry.isDestroyedOrRemoved(); } RegionMapCommitPut(FocusedRegionMap focusedRegionMap, InternalRegion owner,
      @Released EntryEventImpl callbackEvent, Operation putOp, boolean didDestroy,
      TransactionId txId, TXRmtEvent txEvent, List<EntryEventImpl> pendingCallbacks,
      TXEntryState txEntryState);   }
@Test public void entryExistsWithNullReturnsFalse() { createInstance(Operation.UPDATE, false, txRmtEvent, null); boolean result = instance.entryExists(null); assertThat(result).isFalse(); }
@Test public void entryExistsWithRemovedEntryReturnsFalse() { createInstance(Operation.UPDATE, false, txRmtEvent, null); RegionEntry regionEntry = mock(RegionEntry.class); when(regionEntry.isDestroyedOrRemoved()).thenReturn(true); boolean result = instance.entryExists(regionEntry); assertThat(result).isFalse(); }
@Test public void entryExistsWithExistingEntryReturnsTrue() { createInstance(Operation.UPDATE, false, txRmtEvent, null); RegionEntry regionEntry = mock(RegionEntry.class); boolean result = instance.entryExists(regionEntry); assertThat(result).isTrue(); }