<BUG>String cert = URLEncoder.encode(readFileToString(new File(certFile)), "UTF-8");String key = URLEncoder.encode(readFileToString(new File(keyFile)), "UTF-8");CertServiceImpl certService = new CertServiceImpl();</BUG><CONTEXT>}@Testpublic void runUploadSslCertBadkeyAlgo() throws IOException, IllegalAccessException, NoSuchFieldException {String certFile = getClass().getResource("/certs/rsa_self_signed.crt").getFile();String keyFile = getClass().getResource("/certs/dsa_self_signed.key").getFile();<extra_id_0>certService._accountMgr = Mockito.mock(AccountManager.class);Account account = new AccountVO("testaccount", 1, "networkdomain", (short)0, UUID.randomUUID().toString());</CONTEXT>
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException {Assume.assumeTrue(isOpenJdk() || isJCEInstalled());String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile();String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile();String password = "user";String cert = readFileToString(new File(certFile));String key = readFileToString(new File(keyFile));CertServiceImpl certService = new CertServiceImpl();