### Question:
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public void delete(Delete.Where delete) { delete.and(eq(getColumnName(), bindMarker())); } SimpleKeyBinding(Facet facet, String columnName, Converter converter); @Override void describe(Table table, Schema schema); @Override void verifySchema(KeyspaceMetadata keyspaceMetadata, TableMetadata tableMetadata); @Override KeyComponent createClusteringColumnReferenceComponent(Facet referenceFacet, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy); @Override ColumnBinding createReferenceBinding(Facet referenceFacet, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy); @Override void delete(Delete.Where delete); @Override List<Object> elementToKeys(Object element); @Override DataType getElementDataType(); @Override Object getElementValue(Object pojo); @Override List<Object> getKeyParameters(List<Object> keys); @Override void selectWhere(Select.Where select);  }### Answer:
@Test @Cassandra public void testClusteringColumnReference() { PojoDao<SimpleEntity> refDao = createPojoDao(SimpleEntity.class); PojoDao<ClusteringColumnReferenceEntity> dao = createPojoDao(ClusteringColumnReferenceEntity.class); ClusteringColumnReferenceEntity entity = new ClusteringColumnReferenceEntity(); entity.setSimpleEntity(new SimpleEntity()); dao.save(entity); assertNotNull(refDao.findByKey(entity.getSimpleEntity().getId())); dao.delete(entity); assertNull(refDao.findByKey(entity.getSimpleEntity().getId())); }
@Test public void testDelete() { assertDeleteEquals(binding, "DELETE FROM foo WHERE id=?;"); }
@Test @Cassandra public void testNonCascadedDelete() { PojoDao<SimpleEntity> refDao = createPojoDao(SimpleEntity.class); SimpleEntity ref = new SimpleEntity(); refDao.save(ref); PojoDao<NonCascadedReferenceEntity> dao = createPojoDao(NonCascadedReferenceEntity.class); NonCascadedReferenceEntity entity = new NonCascadedReferenceEntity(); entity.setSimpleEntity(ref); dao.save(entity); dao.delete(entity); assertNotNull(refDao.findByKey(ref.getId())); }