Testing USB Flash devices like USB Keys and micro Sd cards is very easy with H2testw, a Software developed by ct, a german Computer magazine.
The Software tries to write on all sectors of the flashdrive and verifies every written bit.
http://www.heise.de/software/download/h2testw/50539