What are the functions performed by the testis in human beings?