Test unit on the function