@Test
  public void testReadNamespaceSnapshotSizes() throws Exception {
    String ns1 = "ns1";
    String ns2 = "ns2";
    String defaultNs = NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR;
    try (Table quotaTable = connection.getTable(QuotaTableUtil.QUOTA_TABLE_NAME)) {
      quotaTable.put(QuotaTableUtil.createPutForNamespaceSnapshotSize(ns1, 1024L));
      quotaTable.put(QuotaTableUtil.createPutForNamespaceSnapshotSize(ns2, 2048L));
      quotaTable.put(QuotaTableUtil.createPutForNamespaceSnapshotSize(defaultNs, 8192L));

      assertEquals(1024L, QuotaTableUtil.getNamespaceSnapshotSize(connection, ns1));
      assertEquals(2048L, QuotaTableUtil.getNamespaceSnapshotSize(connection, ns2));
      assertEquals(8192L, QuotaTableUtil.getNamespaceSnapshotSize(connection, defaultNs));

      cleanUpSnapshotSizes();
    }
  }
Test the quota table helpers (e.g. CRUD operations)
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaTableUtil.java