My sister recently asked me to do a little digging into the linguistic similarities between between the words "testimony" and "testicles." After doing some reading on the topic, it appears that there is definitely a strong connection.
[the best article I found on the topic is "Joshua T. Katz, "Testimonia Ritus Italici: Male Genitalia, Solemn Declarations, and a New Latin Sound Law" in Harvard Studies in Classical Philology 98 (1998): 183-217.]
In Latin, the word "testis," means both "testimony/witness" and "testicles." The word is probably derived from the Indo-European word *terstis, a combination of the words for "third" and "stand." So, "testis" seems to mean literally "standing as third." In legal terms, this probably refers to a witness being a "third party" or an onlooker who could provide information for the trial. However, the real difficulty with this etymology comes in understanding how a meaning dealing with "third" came to be equated to something that normally comes in pairs.
In brief, it looks like testicles were an important part of the oath sworn by a witness to tell the truth, and it looks like it has ancient Indo-European roots.
Two well known early examples of a relationship between oath-taking and genitals are found in Genesis 24 and in Genesis 47, where Abraham and Jacob have their servant and son (respectively) swear oaths by putting their hands under their master's/father's thigh. An oath with genitals in hand carried extra-strong signficance, the implication being that breaking it would curse not only the oath-taker, but all of his descendants.
In ancient Greece, it seems that this practice changed from holding human testicles to using animal genitals. Demosthenes, an ancient Greek orator, informs us that in Athenian homicide trials, the witness would swear an extra-powerful oath while standing over the severed genitals of three sacrificed animals (ram, boar, bull). An Umbrian inscription taken from a find called the Iuguvine tablets, that dates from the earliest days of Rome describes an Italian (not necessarily but probably similar to Roman) oath with similar language. This Umbrian oath, however, ambiguously asserts that the oath-taker must hold "the disk(s)" in his hand. Katz is sure that the word meaning "disk" ("urfeta" in Umbrian) must refer to testicles. Whether this refers to the oath-taker's own testicles or the testicles of the sacrificed animal is unclear. Regardless, there are still genitals in hand as the oath is sworn.
So, there seems to clearly be some strong connections between "testicles" and "testify," although the sometimes-repeated statement that Romans always did it in court is surely an exaggeration. More reasonably, there was an early connection that eventually diverged enough in meaning that we don't chuckle today when we hear the word "testimony," although playwrights such as Plautus punned on these words to great comic effect.
So, the next time you hear about "the power of a strong testimony", I hope the 13-year-old inside of you snickers just a little.