Add a test for entry_before_insert hook