Add unit tests for expire hook
expire() is not static anymore
Merge branch 'fix-expire-hook' into stable7

* fix-expire-hook:
  expire() is not static anymore
  Add unit tests for expire hook