The ant target test-java compiles the test code, run checkstyle, builds javadoc and then runs the unit tests. With poor or no internet connection, javadoc fails because it's not able to access java.sun.com or jackson.codehaus.org. These are used to create links in documentation for the JRE and Jackson APIs.
In the following patch, I create a new target unit-test-java and make test-java depend on it. With this the order of execution for test-java is compile test code, run unit tests, run checkstyle and then build javadoc. When, someone wants to just run the unit-tests, he/she can use unit-test-java.