Unit Testing Apigee Java Callouts with TestNG, JMockit and Easytesting!
If you use a Java Callout in Apigee then you should unit test it before you deploy it to Apigee; this is a best practice. I recently published an article and a Github repository on how to do this. It is significantly easier to debug and troubleshoot Java Callouts on your local machine rather than troubleshooting them remotely with Apigee trace. Check out the article and the Github repository to learn more.