Certificates can be stored in Java KeyStore files. You will likely need a self-signed certificate for testing purposes, and here is how to create one in a KeyStore where the password is :

    We can point a web browser to , but since the certificate is a self-signed one any good browser will rightfully yield a security warning:

    Last but not least, we need to update the test case in since the original code was made for issuing HTTP requests with the web client: