Add a first JUnit test case, and associated autoconf files.
Also add a test case and update the layout of the Java build.