IndexRepositoryImpl extends AbstractCRUDRepository<Index> implements IndexRepository { @Override public void markActive(Index entity) { BoundStatement bs = new BoundStatement(markActiveStmt); bindIdentifier(bs, entity.getId()); getSession().execute(bs); } IndexRepositoryImpl(Session session); @Override boolean exists(Identifier identifier); @Override Index read(Identifier identifier); @Override Index create(Index entity); @Override void markActive(Index entity); @Override Index update(Index entity); @Override void delete(Identifier id); @Override void delete(Index entity); @Override List<Index> readAll(Identifier id); @Override List<Index> readAll(); @Override List<Index> readAllCached(Identifier id); @Override long countAll(Identifier id);  }
@Test public void testMarkActive() { System.out.println("markActive"); Index entity = Fixtures.createTestIndexOneField(); f.insertIndex(entity); IndexRepositoryImpl instance = new IndexRepositoryImpl(f.getSession()); Index result = instance.read(entity.getId()); assertFalse(result.isActive()); instance.markActive(entity); result = instance.read(entity.getId()); assertTrue(result.isActive()); }