From a review of The Uncensored Bible:

In court we swear to tell the truth with a hand placed on the Bible. But in the book itself, Jacob, nearing death in Egypt, asks Joseph to swear an oath not to bury him there by “put[ting] your hand under my thigh” (Gen. 47:29). Earlier in Genesis, Jacob wrestles with God, who touches “the hollow of his [Jacob’s] thigh” (32:25). “Thigh” happens to be a biblical euphemism for male genitalia; it’s from Jacob’s “thigh” or “loins” that his numerous offspring sprang.

This was new to me:

The practice of swearing an oath while touching one’s or someone else’s testicles was common in the ancient Near East (Abraham also orders a servant to do just that in Genesis 24:2). Its linguistic memory survives in our word “testify”–testis being the Latin both for “witness” and the male generative gland.

I will never be able to listen to George Clinton and Parliament's funkadelic classic, "I just want to testify, what your love has done for me," in the same way again. The album title is interesting in this context also.