@Test
  public void testWithRegions() throws IOException, ServiceException {
    TableDescriptor htd =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName())).build();
    List<RegionInfo> regions = Lists.newArrayList(
      RegionInfoBuilder.newBuilder(htd.getTableName()).setStartKey(Bytes.toBytes("a"))
        .setEndKey(Bytes.toBytes("d")).build(),
      RegionInfoBuilder.newBuilder(htd.getTableName()).setStartKey(Bytes.toBytes("d"))
        .setEndKey(Bytes.toBytes("z")).build());
    Mockito.doReturn(ResponseConverter.buildGetOnlineRegionResponse(regions)).when(rpcServices)
      .getOnlineRegion(Mockito.any(), Mockito.any());
    new RSStatusTmpl().render(new StringWriter(), rs);
  }
Tests for the region server status page and its template.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/http/TestRSStatusServlet.java