use of com.hazelcast.core.IAtomicReference in project hazelcast by hazelcast.
the class HazelcastOSGiInstanceTest method getAtomicReferenceCalledSuccessfullyOverOSGiInstance.
@Test
public void getAtomicReferenceCalledSuccessfullyOverOSGiInstance() {
IAtomicReference mockAtomicReference = mock(IAtomicReference.class);
HazelcastInstance mockHazelcastInstance = mock(HazelcastInstance.class);
HazelcastOSGiInstance hazelcastOSGiInstance = HazelcastOSGiTestUtil.createHazelcastOSGiInstance(mockHazelcastInstance);
when(mockHazelcastInstance.getAtomicReference("my-atomicreference")).thenReturn(mockAtomicReference);
assertEquals(mockAtomicReference, hazelcastOSGiInstance.getAtomicReference("my-atomicreference"));
verify(mockHazelcastInstance).getAtomicReference("my-atomicreference");
}
Aggregations