DistributedPutAllOperation extends AbstractUpdateOperation { public EntryEventImpl getBaseEvent() { return getEvent(); } DistributedPutAllOperation(CacheEvent event, int size, boolean isBridgeOp); boolean isBridgeOperation(); PutAllEntryData[] getPutAllEntryData(); void setPutAllEntryData(PutAllEntryData[] putAllEntryData); void addEntry(PutAllEntryData putAllEntry); void addEntry(EntryEventImpl ev); void addEntry(EntryEventImpl ev, boolean newCallbackInvoked); void addEntry(EntryEventImpl ev, Integer bucketId); void setUseFakeEventId(boolean status); Iterator eventIterator(); void freeOffHeapResources(); @Unretained EntryEventImpl getEventForPosition(int position); EntryEventImpl getBaseEvent(); PutAllPRMessage createPRMessagesNotifyOnly(int bucketId); HashMap createPRMessages(); public int putAllDataSize; }
@Test public void shouldBeMockable() throws Exception { DistributedPutAllOperation mockDistributedPutAllOperation = mock(DistributedPutAllOperation.class); EntryEventImpl mockEntryEventImpl = mock(EntryEventImpl.class); when(mockDistributedPutAllOperation.getBaseEvent()).thenReturn(mockEntryEventImpl); assertThat(mockDistributedPutAllOperation.getBaseEvent()).isSameAs(mockEntryEventImpl); }