Add Java unit tests.