@Test
  public void invalidRegionStateParam() {
    final HttpServletRequest request = new MockRequestBuilder().setRegionState("foo").build();
    final MetaBrowser metaBrowser = new MetaBrowser(connection, request);
    assertNull(metaBrowser.getScanRegionState());
    assertThat(metaBrowser.getErrorMessages(),
      contains("Requested SCAN_REGION_STATE value 'foo' cannot be parsed as a RegionState."));
  }
Cluster-backed correctness tests for the functionality provided by {@link MetaBrowser}.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/http/TestMetaBrowserNoCluster.java