Apple simply have to plug it in to their systems and it says if it's water damaged.
They can be really nice, I would advise making an appointment and seeing them about it. I know DH thought his was water damaged and he was completely honest that there was a possibility. They actually were really nice to him because he was honest about it.
Replacements are normally refurbished handsets (but look brand new, so I'm not sure if it's always the case!)
Alex damaged her 3GS and they let us buy a new one for £55 even out of warranty.