@Test
public void testGetTableHandle() throws IOException {

  Path basePath = setupTest(conf, SESSION.getUser(), SpreadsheetMetadataTest.class);
  SpreadsheetMetadata spreadsheetMetadata = new SpreadsheetMetadata(ugi, conf, basePath, SPREADSHEETS, useFileCache,
      true);
  List<SchemaTableName> listTables = spreadsheetMetadata.listTables(SESSION, SCHEMA_NAME);
  for (SchemaTableName name : listTables) {
    ConnectorTableHandle tableHandle = spreadsheetMetadata.getTableHandle(SESSION, name);
    assertTrue(tableHandle instanceof SpreadsheetTableHandle);
    SpreadsheetTableHandle spreadsheetTableHandle = (SpreadsheetTableHandle) tableHandle;
    String filePath = new Path(new Path(new Path(basePath, SESSION.getUser()), SPREADSHEETS),
        PRESTO_EXAMPLE_XLSX).toString();
    assertEquals(filePath, spreadsheetTableHandle.getSpreadsheetPath());
    SchemaTableName tableName = spreadsheetTableHandle.getTableName();
    assertEquals(name, tableName);
    assertEquals(SESSION.getUser(), spreadsheetTableHandle.getUser());
  }
}