Test the retrieving task function