Search in sources :

Example 1 with Endpoint

use of com.hazelcast.cluster.Endpoint in project hazelcast by hazelcast.

the class HazelcastOSGiInstanceTest method getLocalEndpointCalledSuccessfullyOverOSGiInstance.

@Test
public void getLocalEndpointCalledSuccessfullyOverOSGiInstance() {
    Endpoint mockEndpoint = mock(Endpoint.class);
    HazelcastInstance mockHazelcastInstance = mock(HazelcastInstance.class);
    HazelcastOSGiInstance hazelcastOSGiInstance = createHazelcastOSGiInstance(mockHazelcastInstance);
    when(mockHazelcastInstance.getLocalEndpoint()).thenReturn(mockEndpoint);
    assertEquals(mockEndpoint, hazelcastOSGiInstance.getLocalEndpoint());
    verify(mockHazelcastInstance).getLocalEndpoint();
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) Endpoint(com.hazelcast.cluster.Endpoint) 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

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