I am trying to test whether my certs and server certs work correctly by using openssl
openssl s_client -cert mycert -key mykey -CAfile CA.cert -connect host:name
-CAfile can actually contain more than one certificate if you use a PEM file. Simply copy and paste the root certificate plus any intermediate certificates in that file, then s_client will correctly present the entire chain instead of only the end entity certificate.
I don't know of a command line tool for testing SSL connections with Java, but it shouldn't be that hard to write your own using Http(s)URLConnection and a custom SSLSocketFactory.