MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / getRemoteAddressChanSet

Method getRemoteAddressChanSet

test/TestRegionClient.java:102–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 }
101
102 @Test
103 public void getRemoteAddressChanSet() throws Exception {
104 RegionClient rclient = mock(RegionClient.class);
105 PowerMockito.field(RegionClient.class, "chan").set(rclient, chan);
106 PowerMockito.when(chan.getRemoteAddress().toString()).thenReturn("127.0.0.1");
107 PowerMockito.when(rclient.getRemoteAddress()).thenCallRealMethod();
108
109 assertNotNull(Whitebox.getInternalState(rclient, "chan"));
110 String addy = rclient.getRemoteAddress();
111 assertNotNull(addy);
112 assertEquals(addy, "127.0.0.1");
113 }
114
115 @Test
116 public void exceptionCaught() throws Exception {

Callers

nothing calls this directly

Calls 3

getRemoteAddressMethod · 0.95
setMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected