Test code in java