protected List<String> extractAuths(String user, List<Result> results) {
    List<String> auths = new ArrayList<>();
    for (Result result : results) {
      Cell labelCell = result.getColumnLatestCell(LABELS_TABLE_FAMILY, LABEL_QUALIFIER);
      Cell userAuthCell = result.getColumnLatestCell(LABELS_TABLE_FAMILY, Bytes.toBytes(user));
      if (userAuthCell != null) {
        auths.add(Bytes.toString(labelCell.getValueArray(), labelCell.getValueOffset(),
          labelCell.getValueLength()));
      }
    }
    return auths;
  }
Base test class for visibility labels basic features
hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java