Java Test code