@Test public void lookupEndpointTest() { when(readOptional.isPresent()).thenReturn(true); when(readOptional.get()).thenReturn(endpoint); Endpoint result = EndpointHelper.lookupEndpoint(epKey, readTransaction); Assert.assertEquals(result, endpoint); }
@Test public void updateEndpointWithLocationTest() throws Exception { String nodeIdString = "nodeIdString"; String nodeConnectorIdString = "nodeConnectorIdString"; EndpointHelper.updateEndpointWithLocation( endpoint, nodeIdString, nodeConnectorIdString, writeTransaction); verify(submitFuture).checkedGet(); }
@Test public void updateEndpointRemoveLocationTest() throws Exception { EndpointHelper.updateEndpointRemoveLocation(endpoint, writeTransaction); verify(submitFuture).checkedGet(); }
@Test public void lookupEndpointTestNull() { when(readOptional.isPresent()).thenReturn(false); Endpoint result = EndpointHelper.lookupEndpoint(epKey, readTransaction); Assert.assertNull(result); }