Add testcase for hooks. Draft of ReferencesConsistencyHook. Running single
db