SweepTableIndices { public TableReference getTableReference(int tableId) { return tableRefs.get(tableId); } SweepTableIndices(IdsToNames idsToNames, NamesToIds namesToIds);  SweepTableIndices(KeyValueService kvs); int getTableId(TableReference table); TableReference getTableReference(int tableId);  }
@Test public void testThrowsIfUnknownTableId() { assertThatExceptionOfType(NoSuchElementException.class) .isThrownBy(() -> tableIndices.getTableReference(3)) .withMessage("Id 3 does not exist"); }