Add a test example for JAVA Thread