added static function registerHooks() for better unit tests handling
added trash bin tests