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