protected static void createTable(TableName tableName, String columnFamilyName) {
    assertNotNull("HBaseAdmin is not initialized successfully.", admin);
    TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(tableName)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(Bytes.toBytes(columnFamilyName))).build();

    try {
      admin.createTable(tableDescriptor);
      createdTables.add(tableName);
      assertTrue("Fail to create the table", admin.tableExists(tableName));
    } catch (IOException e) {
      assertNull("Exception found while creating table", e);
    }
  }
By using this class as the super class of a set of tests you will have a HBase testing cluster
available that is very suitable for writing tests for scanning and filtering against.
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/FilterTestingCluster.java