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();
}
Aggregations