Add cookie sample in java