A lot of things extend GeneralSecurityException.
Move the SSL stuff out of SparkTestUtil.
Inline the sleep method of SparkTestUtil, and make the duplicates read better.
Unit tests can throw checked exceptions.