I have worked on a kerberos smoke test for my team. I learned a few tips in the process.
The useTicketCache is a preferred use in case the java process dies while the KDC is down.
HBase Canary Testing runs on a kerberos enabled cluster using hbase canaryhttp://hbase.apache.org/book.html#trouble.client
If you are port forwarding over SSH, you’ll want to switch to tcp using this trick in your krb5.conf file. Thanks to IBM’s site, it’s an easy fix… https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/tsec_kerb_create_conf.html
A working example for Kerberos is as follows:
The site Kerberos Java site describes in detail how to build a kerberos client.