TableRepositoryImpl extends AbstractCRUDRepository<Table> implements TableRepository { @Override public Table update(Table entity) { BoundStatement bs = new BoundStatement(updateStmt); bindUpdate(bs, entity); getSession().execute(bs); return entity; } 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 testUpdate() { System.out.println("update"); Table entity = Fixtures.createTestTable(); TableRepository instance = new TableRepositoryImpl(f.getSession()); Table created = instance.create(entity); assertEquals(entity, created); String newDesciption = "this is a new description"; created.setDescription(newDesciption); Table result = instance.update(entity); assertEquals(created, result); result.setName("new_name1"); Table resultNew = instance.update(entity); assertEquals(result, resultNew); instance.delete(resultNew.getId()); }