Using -Dsun.security.ssl.allowUnsafeRenegotiation=true is wrong and is not a fix for this issue. You are getting the same error, and you're more vulnerable to man in the middle attacks now.
The Apache story is nonsense, of course SSL key/certificate can be adjusted in the configuration.
A 'proper certificate' to be used is a certificate with matching hostname, signed by an Authority that is trusted by the client.
For testing, it would be possible to set up a test Certificate Authority, used to sign test certificates with the right names and validity dates. The test Certificate Authority Certificate could be imported in the keystore your JVM uses.
Alternatively, you can circumvent Certificate checking by overriding the Validation code, something like: http://exampledepot.com/egs/javax.net.ssl/TrustAll.html (not tested)
You can open the certificate (double click in windows) and see which domain name it should match. It seems you're connecting to some test server (since it says "No name matching test.<xxxx>.com found") and they probably did not give you a certificate for this url. There may be workarounds but I don't know of any other than what Samet already mentioned. I'd try getting them to give you a proper certificate for the test url.