@Test
  public void testCreateTableDefaultValuesView() throws Exception {
    Table table = new Table();
    StorageDescriptor sd = new StorageDescriptor();
    List<FieldSchema> cols = new ArrayList<>();

    table.setDbName(DEFAULT_DATABASE);
    table.setTableName("test_table_2");
    table.setTableType("VIRTUAL_VIEW");
    cols.add(new FieldSchema("column_name", "int", null));
    sd.setCols(cols);
    sd.setSerdeInfo(new SerDeInfo());
    table.setSd(sd);

    client.createTable(table);
    Table createdTable = client.getTable(table.getDbName(), table.getTableName());

    // No location should be created for views
    Assert.assertNull("Storage descriptor location should be null",
        createdTable.getSd().getLocation());
  }
This test creates and queries a table and then drops it. Good for testing the happy path
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java