@Test
  public void testScanningUnknownColumnJson() throws IOException {
    // Test scanning particular columns with limit.
    StringBuilder builder = new StringBuilder();
    builder.append("/*");
    builder.append("?");
    builder.append(Constants.SCAN_COLUMN + "=a:test");
    Response response = client.get("/" + TABLE + builder.toString(), Constants.MIMETYPE_JSON);
    assertEquals(200, response.getCode());
    assertEquals(Constants.MIMETYPE_JSON, response.getHeader("content-type"));
    ObjectMapper mapper = new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,
      MediaType.APPLICATION_JSON_TYPE);
    CellSetModel model = mapper.readValue(response.getStream(), CellSetModel.class);
    int count = TestScannerResource.countCellSet(model);
    assertEquals(0, count);
  }
Read protobuf stream.
@param inputStream the input stream
@return The number of rows in the cell set model.
@throws IOException Signals that an I/O exception has occurred.
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java