Add convenience function for test hook