// Fake master that there is a regionserver out there. Report in.
RegionServerStartupRequest.Builder request = RegionServerStartupRequest.newBuilder();
request.setPort(rs0.getServerName().getPort());
request.setServerStartCode(rs0.getServerName().getStartcode());
request.setServerCurrentTime(now);
RegionServerStartupResponse result =
master.regionServerStartup(null, request.build());
String rshostname = new String();
for (NameStringPair e : result.getMapEntriesList()) {
if (e.getName().toString().equals(HConstants.KEY_FOR_HOSTNAME_SEEN_BY_MASTER)) {
rshostname = e.getValue();
}
}
// Assert hostname is as expected.