use of com.hazelcast.core.IdGenerator in project hazelcast by hazelcast.
the class HazelcastOSGiInstanceTest method getIdGeneratorCalledSuccessfullyOverOSGiInstance.
@Test
public void getIdGeneratorCalledSuccessfullyOverOSGiInstance() {
IdGenerator mockIdGenerator = mock(IdGenerator.class);
HazelcastInstance mockHazelcastInstance = mock(HazelcastInstance.class);
HazelcastOSGiInstance hazelcastOSGiInstance = HazelcastOSGiTestUtil.createHazelcastOSGiInstance(mockHazelcastInstance);
when(mockHazelcastInstance.getIdGenerator("my-idgenerator")).thenReturn(mockIdGenerator);
assertEquals(mockIdGenerator, hazelcastOSGiInstance.getIdGenerator("my-idgenerator"));
verify(mockHazelcastInstance).getIdGenerator("my-idgenerator");
}
Aggregations