test code is added to check hook