Fix unit test regressions:
* missing implementation for constant collection in ConditionChecks.
* fix harmless "session already closed" message due to close() outside transaction boundaries.