Search in sources :

Example 1 with DestroyMessage

use of org.apache.geode.internal.cache.wan.serial.BatchDestroyOperation.DestroyMessage in project geode by apache.

the class DestroyMessageTest method shouldBeMockable.

@Test
public void shouldBeMockable() throws Exception {
    DestroyMessage mockDestroyMessageX = mock(DestroyMessage.class);
    InternalCacheEvent mockInternalCacheEvent = mock(InternalCacheEvent.class);
    DistributedRegion mockDistributedRegion = mock(DistributedRegion.class);
    when(mockDestroyMessageX.createEvent(eq(mockDistributedRegion))).thenReturn(mockInternalCacheEvent);
    assertThat(mockDestroyMessageX.createEvent(mockDistributedRegion)).isSameAs(mockInternalCacheEvent);
}
Also used : DestroyMessage(org.apache.geode.internal.cache.wan.serial.BatchDestroyOperation.DestroyMessage) InternalCacheEvent(org.apache.geode.internal.cache.InternalCacheEvent) DistributedRegion(org.apache.geode.internal.cache.DistributedRegion) UnitTest(org.apache.geode.test.junit.categories.UnitTest) Test(org.junit.Test)

Aggregations

DistributedRegion (org.apache.geode.internal.cache.DistributedRegion)1 InternalCacheEvent (org.apache.geode.internal.cache.InternalCacheEvent)1 DestroyMessage (org.apache.geode.internal.cache.wan.serial.BatchDestroyOperation.DestroyMessage)1 UnitTest (org.apache.geode.test.junit.categories.UnitTest)1 Test (org.junit.Test)1