Search in sources :

Example 1 with SplitBrainProtectionService

use of com.hazelcast.splitbrainprotection.SplitBrainProtectionService in project hazelcast by hazelcast.

the class HazelcastOSGiInstanceTest method getSplitBrainProtectionServiceCalledSuccessfullyOverOSGiInstance.

@Test
public void getSplitBrainProtectionServiceCalledSuccessfullyOverOSGiInstance() {
    SplitBrainProtectionService mockSplitBrainProtectionService = mock(SplitBrainProtectionService.class);
    HazelcastInstance mockHazelcastInstance = mock(HazelcastInstance.class);
    HazelcastOSGiInstance hazelcastOSGiInstance = createHazelcastOSGiInstance(mockHazelcastInstance);
    when(mockHazelcastInstance.getSplitBrainProtectionService()).thenReturn(mockSplitBrainProtectionService);
    assertEquals(mockSplitBrainProtectionService, hazelcastOSGiInstance.getSplitBrainProtectionService());
    verify(mockHazelcastInstance).getSplitBrainProtectionService();
}
Also used : SplitBrainProtectionService(com.hazelcast.splitbrainprotection.SplitBrainProtectionService) HazelcastInstance(com.hazelcast.core.HazelcastInstance) HazelcastOSGiTestUtil.createHazelcastOSGiInstance(com.hazelcast.osgi.impl.HazelcastOSGiTestUtil.createHazelcastOSGiInstance) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 HazelcastOSGiTestUtil.createHazelcastOSGiInstance (com.hazelcast.osgi.impl.HazelcastOSGiTestUtil.createHazelcastOSGiInstance)1 SplitBrainProtectionService (com.hazelcast.splitbrainprotection.SplitBrainProtectionService)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1