TableRepositoryImpl extends AbstractCRUDRepository<Table> implements TableRepository { @Override public long countAllTables(String database) { BoundStatement bs = new BoundStatement(readAllCountStmt); bs.bind(database); return (getSession().execute(bs).one().getLong(0)); } TableRepositoryImpl(Session session); @Override boolean exists(Identifier identifier); @Override Table read(Identifier identifier); @Override Table create(Table entity); @Override Table update(Table entity); @Override void delete(Table entity); @Override void delete(Identifier id); @Override List<Table> readAll(Identifier id); @Override List<Table> readAll(); @Override long countAllTables(String database); @Override long countTableSize(String database, String tableName);  }
@Test public void testCountAllTables() { System.out.println("countAllTables"); TableRepository instance = new TableRepositoryImpl(f.getSession()); Table testTable = Fixtures.createTestTable(); String database = testTable.getDatabaseName(); long result = instance.countAllTables(database); long expResult = 0L; assertEquals(expResult, result); f.insertTable(testTable); expResult = 1L; result = instance.countAllTables(database); assertEquals(expResult, result); }