@Override
      public Void run() throws Exception {
        String[] auths = { SECRET, CONFIDENTIAL };
        try (Connection conn = ConnectionFactory.createConnection(conf)) {
          VisibilityClient.setAuths(conn, auths, user);
        } catch (Throwable e) {
          throw new IOException(e);
        }
        return null;
      }
Base test class for visibility labels basic features
hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java