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

Method answer

test/BaseTestHBaseClient.java:177–186  ·  view source on GitHub ↗
(InvocationOnMock invocation)

Source from the content-addressed store, hash-verified

175
176 PowerMockito.doAnswer(new Answer<RegionClient>(){
177 @Override
178 public RegionClient answer(InvocationOnMock invocation) throws Throwable {
179 final Object[] args = invocation.getArguments();
180 final String endpoint = (String)args[0] + ":" + (Integer)args[1];
181 final RegionClient rc = mock(RegionClient.class);
182 when(rc.getRemoteAddress()).thenReturn(endpoint);
183 client2regions.put(rc, new ArrayList<RegionInfo>());
184 region_clients.add(rc);
185 return rc;
186 }
187 }).when(client, "newClient", anyString(), anyInt());
188 }
189

Callers

nothing calls this directly

Calls 4

getRemoteAddressMethod · 0.95
putMethod · 0.80
addMethod · 0.45
callbackMethod · 0.45

Tested by

no test coverage detected