+1 for these unit tests. Is just a matter of choose between Exception and CertificateException but +1 for your scenarios