@Test public void getSchemaVersion() throws Exception { when(metaStoreClient.getTable(DATABASE, TABLE)).thenReturn(table); when(hiveTableStrategy.getSchemaVersion(table)).thenReturn(1); int result = underTest.getSchemaVersion(TABLE); assertThat(result, is(1)); }
public int getSchemaVersion(String tableName) throws MetaStoreException { try { Table table = metaStoreClient.getTable(databaseName, tableName); return hiveTableStrategy.getSchemaVersion(table); } catch (TException e) { throw new MetaStoreException(e); } }
HiveTableManager { public int getSchemaVersion(String tableName) throws MetaStoreException { try { Table table = metaStoreClient.getTable(databaseName, tableName); return hiveTableStrategy.getSchemaVersion(table); } catch (TException e) { throw new MetaStoreException(e); } } }
HiveTableManager { public int getSchemaVersion(String tableName) throws MetaStoreException { try { Table table = metaStoreClient.getTable(databaseName, tableName); return hiveTableStrategy.getSchemaVersion(table); } catch (TException e) { throw new MetaStoreException(e); } }  }
HiveTableManager { public int getSchemaVersion(String tableName) throws MetaStoreException { try { Table table = metaStoreClient.getTable(databaseName, tableName); return hiveTableStrategy.getSchemaVersion(table); } catch (TException e) { throw new MetaStoreException(e); } }  boolean tableExists(String tableName); Table createTable(String tableName, String partitionColumnName, Schema schema, int version, String owner); void grantPublicSelect(String tableName, String grantor); void alterTable(String tableName, Schema schema, int version); int getSchemaVersion(String tableName); }
HiveTableManager { public int getSchemaVersion(String tableName) throws MetaStoreException { try { Table table = metaStoreClient.getTable(databaseName, tableName); return hiveTableStrategy.getSchemaVersion(table); } catch (TException e) { throw new MetaStoreException(e); } }  boolean tableExists(String tableName); Table createTable(String tableName, String partitionColumnName, Schema schema, int version, String owner); void grantPublicSelect(String tableName, String grantor); void alterTable(String tableName, Schema schema, int version); int getSchemaVersion(String tableName);  }