Test Java program