snake in java test