Test function implementation