SubmarineMetaStore { public Database getDatabase(String databaseName) throws NoSuchObjectException { Database database = rs.getDatabase(databaseName); return database; } SubmarineMetaStore(SubmarineConfiguration submarineConf); int getDatabaseCount(); List<String> getAllDatabases(); Database getDatabase(String databaseName); int getTableCount(); List<String> getAllTables(String databaseName); Table getTable(String databaseName, String tableName); void createDatabase(Database db); boolean alterDatabase(String dbName, Database db); boolean dropDatabase(String dbName); void createTable(Table table); boolean dropTable(String dbName, String tableName); int getPartitionCount(); Partition getPartition(String dbName, String tableName, List<String> partVals); List<TableMeta> getTableMeta(String dbNames, String tableNames, List<String> tableTypes); void createTableWithConstraints(Table tbl,
                                         List<SQLPrimaryKey> primaryKeys,
                                         List<SQLForeignKey> foreignKeys); boolean addPartitions(String dbName, String tblName, List<Partition> parts); boolean dropPartition(String dbName, String tableName, List<String> partVals); void alterTable(String dbname, String tableName, Table newTable); void alterIndex(String dbname, String baseTblName, String indexName, Index newIndex); void alterPartition(String dbname, String tableName, List<String> partVals, Partition newPart); void addPrimaryKeys(List<SQLPrimaryKey> pks); boolean addIndex(Index index); boolean dropIndex(String dbName, String origTableName, String indexName); Index getIndex(String dbName, String origTableName, String indexName);  }
@Test public void getDatabase() throws NoSuchObjectException { Database database = submarineMetaStore.getDatabase("testdb"); assertEquals("testdb", database.getName()); }