TableManager { public ReadWriteTable getTable(String tableId) { Preconditions.checkState(initialized, "TableManager has not been initialized."); TableCtx ctx = tableContexts.get(tableId); Preconditions.checkNotNull(ctx, "Unknown tableId " + tableId); if (ctx.table == null) { ctx.table = ctx.tableProvider.getTable(); } return ctx.table; } TableManager(Config config); void init(Context context); void flush(); void close(); ReadWriteTable getTable(String tableId);  }
@Test(expected = IllegalStateException.class) public void testInitFailsWithoutInitializingLocalStores() { TableManager tableManager = new TableManager(new MapConfig(new HashMap<>())); tableManager.getTable("dummy"); }