Added test for setDefaultCert bug