TableRepositoryImpl extends AbstractCRUDRepository<Table> implements TableRepository { @Override public Table read(Identifier identifier) { if (identifier == null || identifier.isEmpty()) { return null; } BoundStatement bs = new BoundStatement(readStmt); bindIdentifier(bs, identifier); Table response = marshalRow(getSession().execute(bs).one()); if (response == null) { throw new ItemNotFoundException("ID not found: " + identifier.toString()); } return response; } 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 testReadById() { System.out.println("readById"); Table testTable = Fixtures.createTestTable(); Identifier identifier = testTable.getId(); TableRepository instance = new TableRepositoryImpl(f.getSession()); f.insertTable(testTable); Table result = instance.read(identifier); assertNotNull(result); assertEquals(testTable, result); }