Search in sources :

Example 1 with IAtomicReference

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");
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) IAtomicReference(com.hazelcast.core.IAtomicReference) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 IAtomicReference (com.hazelcast.core.IAtomicReference)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1